diff --git a/src/adc0.rs b/src/adc0.rs index 22ead7abe5a26570145192a84e7b7aa34642e7c2..764e65142f0649c07753fd824a6009f8c497ccea 100644 --- a/src/adc0.rs +++ b/src/adc0.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - status register"] @@ -41,133 +41,228 @@ pub struct RegisterBlock { pub idata3: IDATA3, #[doc = "0x4c - regular data register"] pub rdata: RDATA, - _reserved0: [u8; 48usize], + _reserved20: [u8; 48usize], #[doc = "0x80 - Oversample control register"] pub ovsampctl: OVSAMPCTL, } -#[doc = "status register"] -pub struct STAT { - register: ::vcell::VolatileCell, -} +#[doc = "status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [stat](stat) module"] +pub type STAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _STAT; +#[doc = "`read()` method returns [stat::R](stat::R) reader structure"] +impl crate::Readable for STAT {} +#[doc = "`write(|w| ..)` method takes [stat::W](stat::W) writer structure"] +impl crate::Writable for STAT {} #[doc = "status register"] pub mod stat; -#[doc = "control register 0"] -pub struct CTL0 { - register: ::vcell::VolatileCell, -} +#[doc = "control register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl0](ctl0) module"] +pub type CTL0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL0; +#[doc = "`read()` method returns [ctl0::R](ctl0::R) reader structure"] +impl crate::Readable for CTL0 {} +#[doc = "`write(|w| ..)` method takes [ctl0::W](ctl0::W) writer structure"] +impl crate::Writable for CTL0 {} #[doc = "control register 0"] pub mod ctl0; -#[doc = "control register 1"] -pub struct CTL1 { - register: ::vcell::VolatileCell, -} +#[doc = "control register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl1](ctl1) module"] +pub type CTL1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL1; +#[doc = "`read()` method returns [ctl1::R](ctl1::R) reader structure"] +impl crate::Readable for CTL1 {} +#[doc = "`write(|w| ..)` method takes [ctl1::W](ctl1::W) writer structure"] +impl crate::Writable for CTL1 {} #[doc = "control register 1"] pub mod ctl1; -#[doc = "Sample time register 0"] -pub struct SAMPT0 { - register: ::vcell::VolatileCell, -} +#[doc = "Sample time register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sampt0](sampt0) module"] +pub type SAMPT0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _SAMPT0; +#[doc = "`read()` method returns [sampt0::R](sampt0::R) reader structure"] +impl crate::Readable for SAMPT0 {} +#[doc = "`write(|w| ..)` method takes [sampt0::W](sampt0::W) writer structure"] +impl crate::Writable for SAMPT0 {} #[doc = "Sample time register 0"] pub mod sampt0; -#[doc = "Sample time register 1"] -pub struct SAMPT1 { - register: ::vcell::VolatileCell, -} +#[doc = "Sample time register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sampt1](sampt1) module"] +pub type SAMPT1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _SAMPT1; +#[doc = "`read()` method returns [sampt1::R](sampt1::R) reader structure"] +impl crate::Readable for SAMPT1 {} +#[doc = "`write(|w| ..)` method takes [sampt1::W](sampt1::W) writer structure"] +impl crate::Writable for SAMPT1 {} #[doc = "Sample time register 1"] pub mod sampt1; -#[doc = "Inserted channel data offset register 0"] -pub struct IOFF0 { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted channel data offset register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ioff0](ioff0) module"] +pub type IOFF0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _IOFF0; +#[doc = "`read()` method returns [ioff0::R](ioff0::R) reader structure"] +impl crate::Readable for IOFF0 {} +#[doc = "`write(|w| ..)` method takes [ioff0::W](ioff0::W) writer structure"] +impl crate::Writable for IOFF0 {} #[doc = "Inserted channel data offset register 0"] pub mod ioff0; -#[doc = "Inserted channel data offset register 1"] -pub struct IOFF1 { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted channel data offset register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ioff1](ioff1) module"] +pub type IOFF1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _IOFF1; +#[doc = "`read()` method returns [ioff1::R](ioff1::R) reader structure"] +impl crate::Readable for IOFF1 {} +#[doc = "`write(|w| ..)` method takes [ioff1::W](ioff1::W) writer structure"] +impl crate::Writable for IOFF1 {} #[doc = "Inserted channel data offset register 1"] pub mod ioff1; -#[doc = "Inserted channel data offset register 2"] -pub struct IOFF2 { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted channel data offset register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ioff2](ioff2) module"] +pub type IOFF2 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _IOFF2; +#[doc = "`read()` method returns [ioff2::R](ioff2::R) reader structure"] +impl crate::Readable for IOFF2 {} +#[doc = "`write(|w| ..)` method takes [ioff2::W](ioff2::W) writer structure"] +impl crate::Writable for IOFF2 {} #[doc = "Inserted channel data offset register 2"] pub mod ioff2; -#[doc = "Inserted channel data offset register 3"] -pub struct IOFF3 { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted channel data offset register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ioff3](ioff3) module"] +pub type IOFF3 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _IOFF3; +#[doc = "`read()` method returns [ioff3::R](ioff3::R) reader structure"] +impl crate::Readable for IOFF3 {} +#[doc = "`write(|w| ..)` method takes [ioff3::W](ioff3::W) writer structure"] +impl crate::Writable for IOFF3 {} #[doc = "Inserted channel data offset register 3"] pub mod ioff3; -#[doc = "watchdog higher threshold register"] -pub struct WDHT { - register: ::vcell::VolatileCell, -} +#[doc = "watchdog higher threshold register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [wdht](wdht) module"] +pub type WDHT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _WDHT; +#[doc = "`read()` method returns [wdht::R](wdht::R) reader structure"] +impl crate::Readable for WDHT {} +#[doc = "`write(|w| ..)` method takes [wdht::W](wdht::W) writer structure"] +impl crate::Writable for WDHT {} #[doc = "watchdog higher threshold register"] pub mod wdht; -#[doc = "watchdog lower threshold register"] -pub struct WDLT { - register: ::vcell::VolatileCell, -} +#[doc = "watchdog lower threshold register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [wdlt](wdlt) module"] +pub type WDLT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _WDLT; +#[doc = "`read()` method returns [wdlt::R](wdlt::R) reader structure"] +impl crate::Readable for WDLT {} +#[doc = "`write(|w| ..)` method takes [wdlt::W](wdlt::W) writer structure"] +impl crate::Writable for WDLT {} #[doc = "watchdog lower threshold register"] pub mod wdlt; -#[doc = "regular sequence register 0"] -pub struct RSQ0 { - register: ::vcell::VolatileCell, -} +#[doc = "regular sequence register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rsq0](rsq0) module"] +pub type RSQ0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RSQ0; +#[doc = "`read()` method returns [rsq0::R](rsq0::R) reader structure"] +impl crate::Readable for RSQ0 {} +#[doc = "`write(|w| ..)` method takes [rsq0::W](rsq0::W) writer structure"] +impl crate::Writable for RSQ0 {} #[doc = "regular sequence register 0"] pub mod rsq0; -#[doc = "regular sequence register 1"] -pub struct RSQ1 { - register: ::vcell::VolatileCell, -} +#[doc = "regular sequence register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rsq1](rsq1) module"] +pub type RSQ1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RSQ1; +#[doc = "`read()` method returns [rsq1::R](rsq1::R) reader structure"] +impl crate::Readable for RSQ1 {} +#[doc = "`write(|w| ..)` method takes [rsq1::W](rsq1::W) writer structure"] +impl crate::Writable for RSQ1 {} #[doc = "regular sequence register 1"] pub mod rsq1; -#[doc = "regular sequence register 2"] -pub struct RSQ2 { - register: ::vcell::VolatileCell, -} +#[doc = "regular sequence register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rsq2](rsq2) module"] +pub type RSQ2 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RSQ2; +#[doc = "`read()` method returns [rsq2::R](rsq2::R) reader structure"] +impl crate::Readable for RSQ2 {} +#[doc = "`write(|w| ..)` method takes [rsq2::W](rsq2::W) writer structure"] +impl crate::Writable for RSQ2 {} #[doc = "regular sequence register 2"] pub mod rsq2; -#[doc = "Inserted sequence register"] -pub struct ISQ { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted sequence register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [isq](isq) module"] +pub type ISQ = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _ISQ; +#[doc = "`read()` method returns [isq::R](isq::R) reader structure"] +impl crate::Readable for ISQ {} +#[doc = "`write(|w| ..)` method takes [isq::W](isq::W) writer structure"] +impl crate::Writable for ISQ {} #[doc = "Inserted sequence register"] pub mod isq; -#[doc = "Inserted data register 0"] -pub struct IDATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted data register 0\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [idata0](idata0) module"] +pub type IDATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _IDATA0; +#[doc = "`read()` method returns [idata0::R](idata0::R) reader structure"] +impl crate::Readable for IDATA0 {} #[doc = "Inserted data register 0"] pub mod idata0; -#[doc = "Inserted data register 1"] -pub struct IDATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted data register 1\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [idata1](idata1) module"] +pub type IDATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _IDATA1; +#[doc = "`read()` method returns [idata1::R](idata1::R) reader structure"] +impl crate::Readable for IDATA1 {} #[doc = "Inserted data register 1"] pub mod idata1; -#[doc = "Inserted data register 2"] -pub struct IDATA2 { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted data register 2\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [idata2](idata2) module"] +pub type IDATA2 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _IDATA2; +#[doc = "`read()` method returns [idata2::R](idata2::R) reader structure"] +impl crate::Readable for IDATA2 {} #[doc = "Inserted data register 2"] pub mod idata2; -#[doc = "Inserted data register 3"] -pub struct IDATA3 { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted data register 3\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [idata3](idata3) module"] +pub type IDATA3 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _IDATA3; +#[doc = "`read()` method returns [idata3::R](idata3::R) reader structure"] +impl crate::Readable for IDATA3 {} #[doc = "Inserted data register 3"] pub mod idata3; -#[doc = "regular data register"] -pub struct RDATA { - register: ::vcell::VolatileCell, -} +#[doc = "regular data register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rdata](rdata) module"] +pub type RDATA = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RDATA; +#[doc = "`read()` method returns [rdata::R](rdata::R) reader structure"] +impl crate::Readable for RDATA {} #[doc = "regular data register"] pub mod rdata; -#[doc = "Oversample control register"] -pub struct OVSAMPCTL { - register: ::vcell::VolatileCell, -} +#[doc = "Oversample control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ovsampctl](ovsampctl) module"] +pub type OVSAMPCTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _OVSAMPCTL; +#[doc = "`read()` method returns [ovsampctl::R](ovsampctl::R) reader structure"] +impl crate::Readable for OVSAMPCTL {} +#[doc = "`write(|w| ..)` method takes [ovsampctl::W](ovsampctl::W) writer structure"] +impl crate::Writable for OVSAMPCTL {} #[doc = "Oversample control register"] pub mod ovsampctl; diff --git a/src/adc0/ctl0.rs b/src/adc0/ctl0.rs index c22127e395505eb14ed7723e28fedfac57d89130..acea06d42652a7bf4f1a9dad5d162605135b487c 100644 --- a/src/adc0/ctl0.rs +++ b/src/adc0/ctl0.rs @@ -1,777 +1,428 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RWDENR { - bits: bool, -} -impl RWDENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IWDENR { - bits: bool, -} -impl IWDENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SYNCMR { - bits: u8, -} -impl SYNCMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DISNUMR { - bits: u8, -} -impl DISNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DISICR { - bits: bool, -} -impl DISICR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DISRCR { - bits: bool, -} -impl DISRCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ICAR { - bits: bool, -} -impl ICAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WDSCR { - bits: bool, -} -impl WDSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SMR { - bits: bool, -} -impl SMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EOICIER { - bits: bool, -} -impl EOICIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WDEIER { - bits: bool, -} -impl WDEIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EOCIER { - bits: bool, -} -impl EOCIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WDCHSELR { - bits: u8, -} -impl WDCHSELR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _RWDENW<'a> { +#[doc = "Reader of register CTL0"] +pub type R = crate::R; +#[doc = "Writer for register CTL0"] +pub type W = crate::W; +#[doc = "Register CTL0 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `RWDEN`"] +pub type RWDEN_R = crate::R; +#[doc = "Write proxy for field `RWDEN`"] +pub struct RWDEN_W<'a> { w: &'a mut W, } -impl<'a> _RWDENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RWDEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _IWDENW<'a> { +#[doc = "Reader of field `IWDEN`"] +pub type IWDEN_R = crate::R; +#[doc = "Write proxy for field `IWDEN`"] +pub struct IWDEN_W<'a> { w: &'a mut W, } -impl<'a> _IWDENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IWDEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _SYNCMW<'a> { +#[doc = "Reader of field `SYNCM`"] +pub type SYNCM_R = crate::R; +#[doc = "Write proxy for field `SYNCM`"] +pub struct SYNCM_W<'a> { w: &'a mut W, } -impl<'a> _SYNCMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SYNCM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 16)) | (((value as u32) & 0x0f) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _DISNUMW<'a> { +#[doc = "Reader of field `DISNUM`"] +pub type DISNUM_R = crate::R; +#[doc = "Write proxy for field `DISNUM`"] +pub struct DISNUM_W<'a> { w: &'a mut W, } -impl<'a> _DISNUMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DISNUM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 13)) | (((value as u32) & 0x07) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _DISICW<'a> { +#[doc = "Reader of field `DISIC`"] +pub type DISIC_R = crate::R; +#[doc = "Write proxy for field `DISIC`"] +pub struct DISIC_W<'a> { w: &'a mut W, } -impl<'a> _DISICW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DISIC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _DISRCW<'a> { +#[doc = "Reader of field `DISRC`"] +pub type DISRC_R = crate::R; +#[doc = "Write proxy for field `DISRC`"] +pub struct DISRC_W<'a> { w: &'a mut W, } -impl<'a> _DISRCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DISRC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _ICAW<'a> { +#[doc = "Reader of field `ICA`"] +pub type ICA_R = crate::R; +#[doc = "Write proxy for field `ICA`"] +pub struct ICA_W<'a> { w: &'a mut W, } -impl<'a> _ICAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ICA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _WDSCW<'a> { +#[doc = "Reader of field `WDSC`"] +pub type WDSC_R = crate::R; +#[doc = "Write proxy for field `WDSC`"] +pub struct WDSC_W<'a> { w: &'a mut W, } -impl<'a> _WDSCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WDSC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _SMW<'a> { +#[doc = "Reader of field `SM`"] +pub type SM_R = crate::R; +#[doc = "Write proxy for field `SM`"] +pub struct SM_W<'a> { w: &'a mut W, } -impl<'a> _SMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _EOICIEW<'a> { +#[doc = "Reader of field `EOICIE`"] +pub type EOICIE_R = crate::R; +#[doc = "Write proxy for field `EOICIE`"] +pub struct EOICIE_W<'a> { w: &'a mut W, } -impl<'a> _EOICIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EOICIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _WDEIEW<'a> { +#[doc = "Reader of field `WDEIE`"] +pub type WDEIE_R = crate::R; +#[doc = "Write proxy for field `WDEIE`"] +pub struct WDEIE_W<'a> { w: &'a mut W, } -impl<'a> _WDEIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WDEIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _EOCIEW<'a> { +#[doc = "Reader of field `EOCIE`"] +pub type EOCIE_R = crate::R; +#[doc = "Write proxy for field `EOCIE`"] +pub struct EOCIE_W<'a> { w: &'a mut W, } -impl<'a> _EOCIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EOCIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _WDCHSELW<'a> { +#[doc = "Reader of field `WDCHSEL`"] +pub type WDCHSEL_R = crate::R; +#[doc = "Write proxy for field `WDCHSEL`"] +pub struct WDCHSEL_W<'a> { w: &'a mut W, } -impl<'a> _WDCHSELW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> WDCHSEL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x1f) | ((value as u32) & 0x1f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 23 - Regular channel analog watchdog enable"] - #[inline] - pub fn rwden(&self) -> RWDENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RWDENR { bits } + #[inline(always)] + pub fn rwden(&self) -> RWDEN_R { + RWDEN_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 22 - Inserted channel analog watchdog enable"] - #[inline] - pub fn iwden(&self) -> IWDENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IWDENR { bits } + #[inline(always)] + pub fn iwden(&self) -> IWDEN_R { + IWDEN_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bits 16:19 - sync mode selection"] - #[inline] - pub fn syncm(&self) -> SYNCMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SYNCMR { bits } + #[inline(always)] + pub fn syncm(&self) -> SYNCM_R { + SYNCM_R::new(((self.bits >> 16) & 0x0f) as u8) } #[doc = "Bits 13:15 - Number of conversions in discontinuous mode"] - #[inline] - pub fn disnum(&self) -> DISNUMR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DISNUMR { bits } + #[inline(always)] + pub fn disnum(&self) -> DISNUM_R { + DISNUM_R::new(((self.bits >> 13) & 0x07) as u8) } #[doc = "Bit 12 - Discontinuous mode on inserted channels"] - #[inline] - pub fn disic(&self) -> DISICR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DISICR { bits } + #[inline(always)] + pub fn disic(&self) -> DISIC_R { + DISIC_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Discontinuous mode on regular channels"] - #[inline] - pub fn disrc(&self) -> DISRCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DISRCR { bits } + #[inline(always)] + pub fn disrc(&self) -> DISRC_R { + DISRC_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Inserted channel group convert automatically"] - #[inline] - pub fn ica(&self) -> ICAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ICAR { bits } + #[inline(always)] + pub fn ica(&self) -> ICA_R { + ICA_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - When in scan mode, analog watchdog is effective on a single channel"] - #[inline] - pub fn wdsc(&self) -> WDSCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WDSCR { bits } + #[inline(always)] + pub fn wdsc(&self) -> WDSC_R { + WDSC_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Scan mode"] - #[inline] - pub fn sm(&self) -> SMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SMR { bits } + #[inline(always)] + pub fn sm(&self) -> SM_R { + SM_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - Interrupt enable for EOIC"] - #[inline] - pub fn eoicie(&self) -> EOICIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOICIER { bits } + #[inline(always)] + pub fn eoicie(&self) -> EOICIE_R { + EOICIE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Interrupt enable for WDE"] - #[inline] - pub fn wdeie(&self) -> WDEIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WDEIER { bits } + #[inline(always)] + pub fn wdeie(&self) -> WDEIE_R { + WDEIE_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Interrupt enable for EOC"] - #[inline] - pub fn eocie(&self) -> EOCIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOCIER { bits } + #[inline(always)] + pub fn eocie(&self) -> EOCIE_R { + EOCIE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bits 0:4 - Analog watchdog channel select"] - #[inline] - pub fn wdchsel(&self) -> WDCHSELR { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - WDCHSELR { bits } + #[inline(always)] + pub fn wdchsel(&self) -> WDCHSEL_R { + WDCHSEL_R::new((self.bits & 0x1f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 23 - Regular channel analog watchdog enable"] - #[inline] - pub fn rwden(&mut self) -> _RWDENW { - _RWDENW { w: self } + #[inline(always)] + pub fn rwden(&mut self) -> RWDEN_W { + RWDEN_W { w: self } } #[doc = "Bit 22 - Inserted channel analog watchdog enable"] - #[inline] - pub fn iwden(&mut self) -> _IWDENW { - _IWDENW { w: self } + #[inline(always)] + pub fn iwden(&mut self) -> IWDEN_W { + IWDEN_W { w: self } } #[doc = "Bits 16:19 - sync mode selection"] - #[inline] - pub fn syncm(&mut self) -> _SYNCMW { - _SYNCMW { w: self } + #[inline(always)] + pub fn syncm(&mut self) -> SYNCM_W { + SYNCM_W { w: self } } #[doc = "Bits 13:15 - Number of conversions in discontinuous mode"] - #[inline] - pub fn disnum(&mut self) -> _DISNUMW { - _DISNUMW { w: self } + #[inline(always)] + pub fn disnum(&mut self) -> DISNUM_W { + DISNUM_W { w: self } } #[doc = "Bit 12 - Discontinuous mode on inserted channels"] - #[inline] - pub fn disic(&mut self) -> _DISICW { - _DISICW { w: self } + #[inline(always)] + pub fn disic(&mut self) -> DISIC_W { + DISIC_W { w: self } } #[doc = "Bit 11 - Discontinuous mode on regular channels"] - #[inline] - pub fn disrc(&mut self) -> _DISRCW { - _DISRCW { w: self } + #[inline(always)] + pub fn disrc(&mut self) -> DISRC_W { + DISRC_W { w: self } } #[doc = "Bit 10 - Inserted channel group convert automatically"] - #[inline] - pub fn ica(&mut self) -> _ICAW { - _ICAW { w: self } + #[inline(always)] + pub fn ica(&mut self) -> ICA_W { + ICA_W { w: self } } #[doc = "Bit 9 - When in scan mode, analog watchdog is effective on a single channel"] - #[inline] - pub fn wdsc(&mut self) -> _WDSCW { - _WDSCW { w: self } + #[inline(always)] + pub fn wdsc(&mut self) -> WDSC_W { + WDSC_W { w: self } } #[doc = "Bit 8 - Scan mode"] - #[inline] - pub fn sm(&mut self) -> _SMW { - _SMW { w: self } + #[inline(always)] + pub fn sm(&mut self) -> SM_W { + SM_W { w: self } } #[doc = "Bit 7 - Interrupt enable for EOIC"] - #[inline] - pub fn eoicie(&mut self) -> _EOICIEW { - _EOICIEW { w: self } + #[inline(always)] + pub fn eoicie(&mut self) -> EOICIE_W { + EOICIE_W { w: self } } #[doc = "Bit 6 - Interrupt enable for WDE"] - #[inline] - pub fn wdeie(&mut self) -> _WDEIEW { - _WDEIEW { w: self } + #[inline(always)] + pub fn wdeie(&mut self) -> WDEIE_W { + WDEIE_W { w: self } } #[doc = "Bit 5 - Interrupt enable for EOC"] - #[inline] - pub fn eocie(&mut self) -> _EOCIEW { - _EOCIEW { w: self } + #[inline(always)] + pub fn eocie(&mut self) -> EOCIE_W { + EOCIE_W { w: self } } #[doc = "Bits 0:4 - Analog watchdog channel select"] - #[inline] - pub fn wdchsel(&mut self) -> _WDCHSELW { - _WDCHSELW { w: self } + #[inline(always)] + pub fn wdchsel(&mut self) -> WDCHSEL_W { + WDCHSEL_W { w: self } } } diff --git a/src/adc0/ctl1.rs b/src/adc0/ctl1.rs index 10138e031b8cf2c0c6967992e4b45cf0a04e8dd0..f91ebb28ec8147bbdf2e4da61a6d82b33ae6d9f4 100644 --- a/src/adc0/ctl1.rs +++ b/src/adc0/ctl1.rs @@ -1,795 +1,438 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TSVRENR { - bits: bool, -} -impl TSVRENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWRCSTR { - bits: bool, -} -impl SWRCSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWICSTR { - bits: bool, -} -impl SWICSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ETERCR { - bits: bool, -} -impl ETERCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ETSRCR { - bits: u8, -} -impl ETSRCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ETEICR { - bits: bool, -} -impl ETEICR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ETSICR { - bits: u8, -} -impl ETSICR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DALR { - bits: bool, -} -impl DALR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DMAR { - bits: bool, -} -impl DMAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RSTCLBR { - bits: bool, -} -impl RSTCLBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CLBR { - bits: bool, -} -impl CLBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CTNR { - bits: bool, -} -impl CTNR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ADCONR { - bits: bool, -} -impl ADCONR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TSVRENW<'a> { +#[doc = "Reader of register CTL1"] +pub type R = crate::R; +#[doc = "Writer for register CTL1"] +pub type W = crate::W; +#[doc = "Register CTL1 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TSVREN`"] +pub type TSVREN_R = crate::R; +#[doc = "Write proxy for field `TSVREN`"] +pub struct TSVREN_W<'a> { w: &'a mut W, } -impl<'a> _TSVRENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TSVREN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _SWRCSTW<'a> { +#[doc = "Reader of field `SWRCST`"] +pub type SWRCST_R = crate::R; +#[doc = "Write proxy for field `SWRCST`"] +pub struct SWRCST_W<'a> { w: &'a mut W, } -impl<'a> _SWRCSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWRCST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _SWICSTW<'a> { +#[doc = "Reader of field `SWICST`"] +pub type SWICST_R = crate::R; +#[doc = "Write proxy for field `SWICST`"] +pub struct SWICST_W<'a> { w: &'a mut W, } -impl<'a> _SWICSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWICST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _ETERCW<'a> { +#[doc = "Reader of field `ETERC`"] +pub type ETERC_R = crate::R; +#[doc = "Write proxy for field `ETERC`"] +pub struct ETERC_W<'a> { w: &'a mut W, } -impl<'a> _ETERCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ETERC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _ETSRCW<'a> { +#[doc = "Reader of field `ETSRC`"] +pub type ETSRC_R = crate::R; +#[doc = "Write proxy for field `ETSRC`"] +pub struct ETSRC_W<'a> { w: &'a mut W, } -impl<'a> _ETSRCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ETSRC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 17)) | (((value as u32) & 0x07) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _ETEICW<'a> { +#[doc = "Reader of field `ETEIC`"] +pub type ETEIC_R = crate::R; +#[doc = "Write proxy for field `ETEIC`"] +pub struct ETEIC_W<'a> { w: &'a mut W, } -impl<'a> _ETEICW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ETEIC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _ETSICW<'a> { +#[doc = "Reader of field `ETSIC`"] +pub type ETSIC_R = crate::R; +#[doc = "Write proxy for field `ETSIC`"] +pub struct ETSIC_W<'a> { w: &'a mut W, } -impl<'a> _ETSICW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ETSIC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 12)) | (((value as u32) & 0x07) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _DALW<'a> { +#[doc = "Reader of field `DAL`"] +pub type DAL_R = crate::R; +#[doc = "Write proxy for field `DAL`"] +pub struct DAL_W<'a> { w: &'a mut W, } -impl<'a> _DALW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DAL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _DMAW<'a> { +#[doc = "Reader of field `DMA`"] +pub type DMA_R = crate::R; +#[doc = "Write proxy for field `DMA`"] +pub struct DMA_W<'a> { w: &'a mut W, } -impl<'a> _DMAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DMA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _RSTCLBW<'a> { +#[doc = "Reader of field `RSTCLB`"] +pub type RSTCLB_R = crate::R; +#[doc = "Write proxy for field `RSTCLB`"] +pub struct RSTCLB_W<'a> { w: &'a mut W, } -impl<'a> _RSTCLBW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RSTCLB_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _CLBW<'a> { +#[doc = "Reader of field `CLB`"] +pub type CLB_R = crate::R; +#[doc = "Write proxy for field `CLB`"] +pub struct CLB_W<'a> { w: &'a mut W, } -impl<'a> _CLBW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CLB_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CTNW<'a> { +#[doc = "Reader of field `CTN`"] +pub type CTN_R = crate::R; +#[doc = "Write proxy for field `CTN`"] +pub struct CTN_W<'a> { w: &'a mut W, } -impl<'a> _CTNW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CTN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _ADCONW<'a> { +#[doc = "Reader of field `ADCON`"] +pub type ADCON_R = crate::R; +#[doc = "Write proxy for field `ADCON`"] +pub struct ADCON_W<'a> { w: &'a mut W, } -impl<'a> _ADCONW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ADCON_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 23 - Channel 16 and 17 enable of ADC0"] - #[inline] - pub fn tsvren(&self) -> TSVRENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TSVRENR { bits } + #[inline(always)] + pub fn tsvren(&self) -> TSVREN_R { + TSVREN_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 22 - Start on regular channel"] - #[inline] - pub fn swrcst(&self) -> SWRCSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWRCSTR { bits } + #[inline(always)] + pub fn swrcst(&self) -> SWRCST_R { + SWRCST_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 21 - Start on inserted channel"] - #[inline] - pub fn swicst(&self) -> SWICSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWICSTR { bits } + #[inline(always)] + pub fn swicst(&self) -> SWICST_R { + SWICST_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 20 - External trigger enable for regular channel"] - #[inline] - pub fn eterc(&self) -> ETERCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ETERCR { bits } + #[inline(always)] + pub fn eterc(&self) -> ETERC_R { + ETERC_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bits 17:19 - External trigger select for regular channel"] - #[inline] - pub fn etsrc(&self) -> ETSRCR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ETSRCR { bits } + #[inline(always)] + pub fn etsrc(&self) -> ETSRC_R { + ETSRC_R::new(((self.bits >> 17) & 0x07) as u8) } #[doc = "Bit 15 - External trigger select for inserted channel"] - #[inline] - pub fn eteic(&self) -> ETEICR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ETEICR { bits } + #[inline(always)] + pub fn eteic(&self) -> ETEIC_R { + ETEIC_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bits 12:14 - External trigger select for inserted channel"] - #[inline] - pub fn etsic(&self) -> ETSICR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ETSICR { bits } + #[inline(always)] + pub fn etsic(&self) -> ETSIC_R { + ETSIC_R::new(((self.bits >> 12) & 0x07) as u8) } #[doc = "Bit 11 - Data alignment"] - #[inline] - pub fn dal(&self) -> DALR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DALR { bits } + #[inline(always)] + pub fn dal(&self) -> DAL_R { + DAL_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 8 - DMA request enable"] - #[inline] - pub fn dma(&self) -> DMAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DMAR { bits } + #[inline(always)] + pub fn dma(&self) -> DMA_R { + DMA_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 3 - Reset calibration"] - #[inline] - pub fn rstclb(&self) -> RSTCLBR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RSTCLBR { bits } + #[inline(always)] + pub fn rstclb(&self) -> RSTCLB_R { + RSTCLB_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - ADC calibration"] - #[inline] - pub fn clb(&self) -> CLBR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CLBR { bits } + #[inline(always)] + pub fn clb(&self) -> CLB_R { + CLB_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Continuous mode"] - #[inline] - pub fn ctn(&self) -> CTNR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CTNR { bits } + #[inline(always)] + pub fn ctn(&self) -> CTN_R { + CTN_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - ADC on"] - #[inline] - pub fn adcon(&self) -> ADCONR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ADCONR { bits } + #[inline(always)] + pub fn adcon(&self) -> ADCON_R { + ADCON_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 23 - Channel 16 and 17 enable of ADC0"] - #[inline] - pub fn tsvren(&mut self) -> _TSVRENW { - _TSVRENW { w: self } + #[inline(always)] + pub fn tsvren(&mut self) -> TSVREN_W { + TSVREN_W { w: self } } #[doc = "Bit 22 - Start on regular channel"] - #[inline] - pub fn swrcst(&mut self) -> _SWRCSTW { - _SWRCSTW { w: self } + #[inline(always)] + pub fn swrcst(&mut self) -> SWRCST_W { + SWRCST_W { w: self } } #[doc = "Bit 21 - Start on inserted channel"] - #[inline] - pub fn swicst(&mut self) -> _SWICSTW { - _SWICSTW { w: self } + #[inline(always)] + pub fn swicst(&mut self) -> SWICST_W { + SWICST_W { w: self } } #[doc = "Bit 20 - External trigger enable for regular channel"] - #[inline] - pub fn eterc(&mut self) -> _ETERCW { - _ETERCW { w: self } + #[inline(always)] + pub fn eterc(&mut self) -> ETERC_W { + ETERC_W { w: self } } #[doc = "Bits 17:19 - External trigger select for regular channel"] - #[inline] - pub fn etsrc(&mut self) -> _ETSRCW { - _ETSRCW { w: self } + #[inline(always)] + pub fn etsrc(&mut self) -> ETSRC_W { + ETSRC_W { w: self } } #[doc = "Bit 15 - External trigger select for inserted channel"] - #[inline] - pub fn eteic(&mut self) -> _ETEICW { - _ETEICW { w: self } + #[inline(always)] + pub fn eteic(&mut self) -> ETEIC_W { + ETEIC_W { w: self } } #[doc = "Bits 12:14 - External trigger select for inserted channel"] - #[inline] - pub fn etsic(&mut self) -> _ETSICW { - _ETSICW { w: self } + #[inline(always)] + pub fn etsic(&mut self) -> ETSIC_W { + ETSIC_W { w: self } } #[doc = "Bit 11 - Data alignment"] - #[inline] - pub fn dal(&mut self) -> _DALW { - _DALW { w: self } + #[inline(always)] + pub fn dal(&mut self) -> DAL_W { + DAL_W { w: self } } #[doc = "Bit 8 - DMA request enable"] - #[inline] - pub fn dma(&mut self) -> _DMAW { - _DMAW { w: self } + #[inline(always)] + pub fn dma(&mut self) -> DMA_W { + DMA_W { w: self } } #[doc = "Bit 3 - Reset calibration"] - #[inline] - pub fn rstclb(&mut self) -> _RSTCLBW { - _RSTCLBW { w: self } + #[inline(always)] + pub fn rstclb(&mut self) -> RSTCLB_W { + RSTCLB_W { w: self } } #[doc = "Bit 2 - ADC calibration"] - #[inline] - pub fn clb(&mut self) -> _CLBW { - _CLBW { w: self } + #[inline(always)] + pub fn clb(&mut self) -> CLB_W { + CLB_W { w: self } } #[doc = "Bit 1 - Continuous mode"] - #[inline] - pub fn ctn(&mut self) -> _CTNW { - _CTNW { w: self } + #[inline(always)] + pub fn ctn(&mut self) -> CTN_W { + CTN_W { w: self } } #[doc = "Bit 0 - ADC on"] - #[inline] - pub fn adcon(&mut self) -> _ADCONW { - _ADCONW { w: self } + #[inline(always)] + pub fn adcon(&mut self) -> ADCON_W { + ADCON_W { w: self } } } diff --git a/src/adc0/idata0.rs b/src/adc0/idata0.rs index 20c8125baa1f46227f5b84d50369c979afca1504..ed00b3ffa14d44805e2303f0ff764b205f8e62cb 100644 --- a/src/adc0/idata0.rs +++ b/src/adc0/idata0.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::IDATA0 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct IDATANR { - bits: u16, -} -impl IDATANR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register IDATA0"] +pub type R = crate::R; +#[doc = "Reader of field `IDATAn`"] +pub type IDATAN_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Inserted number n conversion data"] - #[inline] - pub fn idatan(&self) -> IDATANR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IDATANR { bits } + #[inline(always)] + pub fn idatan(&self) -> IDATAN_R { + IDATAN_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/adc0/idata1.rs b/src/adc0/idata1.rs index c5f04f33c851964b18e3fffcd8fc6c0b8df31f00..9abec9e43af738a6a00550dc7d4d0f823d77156b 100644 --- a/src/adc0/idata1.rs +++ b/src/adc0/idata1.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::IDATA1 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct IDATANR { - bits: u16, -} -impl IDATANR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register IDATA1"] +pub type R = crate::R; +#[doc = "Reader of field `IDATAn`"] +pub type IDATAN_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Inserted number n conversion data"] - #[inline] - pub fn idatan(&self) -> IDATANR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IDATANR { bits } + #[inline(always)] + pub fn idatan(&self) -> IDATAN_R { + IDATAN_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/adc0/idata2.rs b/src/adc0/idata2.rs index 3501a85ec0882f2fdb681c4769c53ff56a413275..d38223fbe7a375ed359a0a1a265f0c50cbebbb30 100644 --- a/src/adc0/idata2.rs +++ b/src/adc0/idata2.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::IDATA2 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct IDATANR { - bits: u16, -} -impl IDATANR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register IDATA2"] +pub type R = crate::R; +#[doc = "Reader of field `IDATAn`"] +pub type IDATAN_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Inserted number n conversion data"] - #[inline] - pub fn idatan(&self) -> IDATANR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IDATANR { bits } + #[inline(always)] + pub fn idatan(&self) -> IDATAN_R { + IDATAN_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/adc0/idata3.rs b/src/adc0/idata3.rs index 4fcc31c2a91605571cf6feddb924fc0b8c8c7989..42ae14668cb81e28d37d5c730128d9aef5f8e94c 100644 --- a/src/adc0/idata3.rs +++ b/src/adc0/idata3.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::IDATA3 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct IDATANR { - bits: u16, -} -impl IDATANR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register IDATA3"] +pub type R = crate::R; +#[doc = "Reader of field `IDATAn`"] +pub type IDATAN_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Inserted number n conversion data"] - #[inline] - pub fn idatan(&self) -> IDATANR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IDATANR { bits } + #[inline(always)] + pub fn idatan(&self) -> IDATAN_R { + IDATAN_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/adc0/ioff0.rs b/src/adc0/ioff0.rs index a5917bfd9e47b2e52f5ebcebfa6aa6a4e746834c..d051e3aa0985a41bd074ac30fe5fd5f97b4c81fc 100644 --- a/src/adc0/ioff0.rs +++ b/src/adc0/ioff0.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::IOFF0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IOFFR { - bits: u16, -} -impl IOFFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _IOFFW<'a> { +#[doc = "Reader of register IOFF0"] +pub type R = crate::R; +#[doc = "Writer for register IOFF0"] +pub type W = crate::W; +#[doc = "Register IOFF0 `reset()`'s with value 0"] +impl crate::ResetValue for super::IOFF0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `IOFF`"] +pub type IOFF_R = crate::R; +#[doc = "Write proxy for field `IOFF`"] +pub struct IOFF_W<'a> { w: &'a mut W, } -impl<'a> _IOFFW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IOFF_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - Data offset for inserted channel 0"] - #[inline] - pub fn ioff(&self) -> IOFFR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IOFFR { bits } + #[inline(always)] + pub fn ioff(&self) -> IOFF_R { + IOFF_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - Data offset for inserted channel 0"] - #[inline] - pub fn ioff(&mut self) -> _IOFFW { - _IOFFW { w: self } + #[inline(always)] + pub fn ioff(&mut self) -> IOFF_W { + IOFF_W { w: self } } } diff --git a/src/adc0/ioff1.rs b/src/adc0/ioff1.rs index e7278eb152d5e6c3c45d9a769e110022bf89898c..e38a9803c81afdc117b6a1e554b897aba66feb8d 100644 --- a/src/adc0/ioff1.rs +++ b/src/adc0/ioff1.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::IOFF1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IOFFR { - bits: u16, -} -impl IOFFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _IOFFW<'a> { +#[doc = "Reader of register IOFF1"] +pub type R = crate::R; +#[doc = "Writer for register IOFF1"] +pub type W = crate::W; +#[doc = "Register IOFF1 `reset()`'s with value 0"] +impl crate::ResetValue for super::IOFF1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `IOFF`"] +pub type IOFF_R = crate::R; +#[doc = "Write proxy for field `IOFF`"] +pub struct IOFF_W<'a> { w: &'a mut W, } -impl<'a> _IOFFW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IOFF_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - Data offset for inserted channel 1"] - #[inline] - pub fn ioff(&self) -> IOFFR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IOFFR { bits } + #[inline(always)] + pub fn ioff(&self) -> IOFF_R { + IOFF_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - Data offset for inserted channel 1"] - #[inline] - pub fn ioff(&mut self) -> _IOFFW { - _IOFFW { w: self } + #[inline(always)] + pub fn ioff(&mut self) -> IOFF_W { + IOFF_W { w: self } } } diff --git a/src/adc0/ioff2.rs b/src/adc0/ioff2.rs index 1a114095a638cb25951b12b05bce31010ea69cf7..308c8e18f72e12e0d4a09d3347de001ea1dc5dd7 100644 --- a/src/adc0/ioff2.rs +++ b/src/adc0/ioff2.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::IOFF2 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IOFFR { - bits: u16, -} -impl IOFFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _IOFFW<'a> { +#[doc = "Reader of register IOFF2"] +pub type R = crate::R; +#[doc = "Writer for register IOFF2"] +pub type W = crate::W; +#[doc = "Register IOFF2 `reset()`'s with value 0"] +impl crate::ResetValue for super::IOFF2 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `IOFF`"] +pub type IOFF_R = crate::R; +#[doc = "Write proxy for field `IOFF`"] +pub struct IOFF_W<'a> { w: &'a mut W, } -impl<'a> _IOFFW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IOFF_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - Data offset for inserted channel 2"] - #[inline] - pub fn ioff(&self) -> IOFFR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IOFFR { bits } + #[inline(always)] + pub fn ioff(&self) -> IOFF_R { + IOFF_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - Data offset for inserted channel 2"] - #[inline] - pub fn ioff(&mut self) -> _IOFFW { - _IOFFW { w: self } + #[inline(always)] + pub fn ioff(&mut self) -> IOFF_W { + IOFF_W { w: self } } } diff --git a/src/adc0/ioff3.rs b/src/adc0/ioff3.rs index fe998c0bcdbc87ad0811121c79d686b41c096459..70c5453e4f8667d1580f7340b62762e9d22853d8 100644 --- a/src/adc0/ioff3.rs +++ b/src/adc0/ioff3.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::IOFF3 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IOFFR { - bits: u16, -} -impl IOFFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _IOFFW<'a> { +#[doc = "Reader of register IOFF3"] +pub type R = crate::R; +#[doc = "Writer for register IOFF3"] +pub type W = crate::W; +#[doc = "Register IOFF3 `reset()`'s with value 0"] +impl crate::ResetValue for super::IOFF3 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `IOFF`"] +pub type IOFF_R = crate::R; +#[doc = "Write proxy for field `IOFF`"] +pub struct IOFF_W<'a> { w: &'a mut W, } -impl<'a> _IOFFW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IOFF_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - Data offset for inserted channel 3"] - #[inline] - pub fn ioff(&self) -> IOFFR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IOFFR { bits } + #[inline(always)] + pub fn ioff(&self) -> IOFF_R { + IOFF_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - Data offset for inserted channel 3"] - #[inline] - pub fn ioff(&mut self) -> _IOFFW { - _IOFFW { w: self } + #[inline(always)] + pub fn ioff(&mut self) -> IOFF_W { + IOFF_W { w: self } } } diff --git a/src/adc0/isq.rs b/src/adc0/isq.rs index b35c616689f8e1ab420d74a89a56e35b41b5e753..6be658177d80d508e9c4071d299e41659a035395 100644 --- a/src/adc0/isq.rs +++ b/src/adc0/isq.rs @@ -1,269 +1,136 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::ISQ { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct ILR { - bits: u8, -} -impl ILR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ISQ3R { - bits: u8, -} -impl ISQ3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ISQ2R { - bits: u8, -} -impl ISQ2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ISQ1R { - bits: u8, -} -impl ISQ1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ISQ0R { - bits: u8, -} -impl ISQ0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _ILW<'a> { +#[doc = "Reader of register ISQ"] +pub type R = crate::R; +#[doc = "Writer for register ISQ"] +pub type W = crate::W; +#[doc = "Register ISQ `reset()`'s with value 0"] +impl crate::ResetValue for super::ISQ { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `IL`"] +pub type IL_R = crate::R; +#[doc = "Write proxy for field `IL`"] +pub struct IL_W<'a> { w: &'a mut W, } -impl<'a> _ILW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 20)) | (((value as u32) & 0x03) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _ISQ3W<'a> { +#[doc = "Reader of field `ISQ3`"] +pub type ISQ3_R = crate::R; +#[doc = "Write proxy for field `ISQ3`"] +pub struct ISQ3_W<'a> { w: &'a mut W, } -impl<'a> _ISQ3W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ISQ3_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 15)) | (((value as u32) & 0x1f) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _ISQ2W<'a> { +#[doc = "Reader of field `ISQ2`"] +pub type ISQ2_R = crate::R; +#[doc = "Write proxy for field `ISQ2`"] +pub struct ISQ2_W<'a> { w: &'a mut W, } -impl<'a> _ISQ2W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ISQ2_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 10)) | (((value as u32) & 0x1f) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _ISQ1W<'a> { +#[doc = "Reader of field `ISQ1`"] +pub type ISQ1_R = crate::R; +#[doc = "Write proxy for field `ISQ1`"] +pub struct ISQ1_W<'a> { w: &'a mut W, } -impl<'a> _ISQ1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ISQ1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 5)) | (((value as u32) & 0x1f) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _ISQ0W<'a> { +#[doc = "Reader of field `ISQ0`"] +pub type ISQ0_R = crate::R; +#[doc = "Write proxy for field `ISQ0`"] +pub struct ISQ0_W<'a> { w: &'a mut W, } -impl<'a> _ISQ0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ISQ0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x1f) | ((value as u32) & 0x1f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 20:21 - Inserted channel group length"] - #[inline] - pub fn il(&self) -> ILR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ILR { bits } + #[inline(always)] + pub fn il(&self) -> IL_R { + IL_R::new(((self.bits >> 20) & 0x03) as u8) } #[doc = "Bits 15:19 - 4th conversion in inserted sequence"] - #[inline] - pub fn isq3(&self) -> ISQ3R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ISQ3R { bits } + #[inline(always)] + pub fn isq3(&self) -> ISQ3_R { + ISQ3_R::new(((self.bits >> 15) & 0x1f) as u8) } #[doc = "Bits 10:14 - 3rd conversion in inserted sequence"] - #[inline] - pub fn isq2(&self) -> ISQ2R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ISQ2R { bits } + #[inline(always)] + pub fn isq2(&self) -> ISQ2_R { + ISQ2_R::new(((self.bits >> 10) & 0x1f) as u8) } #[doc = "Bits 5:9 - 2nd conversion in inserted sequence"] - #[inline] - pub fn isq1(&self) -> ISQ1R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ISQ1R { bits } + #[inline(always)] + pub fn isq1(&self) -> ISQ1_R { + ISQ1_R::new(((self.bits >> 5) & 0x1f) as u8) } #[doc = "Bits 0:4 - 1st conversion in inserted sequence"] - #[inline] - pub fn isq0(&self) -> ISQ0R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ISQ0R { bits } + #[inline(always)] + pub fn isq0(&self) -> ISQ0_R { + ISQ0_R::new((self.bits & 0x1f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 20:21 - Inserted channel group length"] - #[inline] - pub fn il(&mut self) -> _ILW { - _ILW { w: self } + #[inline(always)] + pub fn il(&mut self) -> IL_W { + IL_W { w: self } } #[doc = "Bits 15:19 - 4th conversion in inserted sequence"] - #[inline] - pub fn isq3(&mut self) -> _ISQ3W { - _ISQ3W { w: self } + #[inline(always)] + pub fn isq3(&mut self) -> ISQ3_W { + ISQ3_W { w: self } } #[doc = "Bits 10:14 - 3rd conversion in inserted sequence"] - #[inline] - pub fn isq2(&mut self) -> _ISQ2W { - _ISQ2W { w: self } + #[inline(always)] + pub fn isq2(&mut self) -> ISQ2_W { + ISQ2_W { w: self } } #[doc = "Bits 5:9 - 2nd conversion in inserted sequence"] - #[inline] - pub fn isq1(&mut self) -> _ISQ1W { - _ISQ1W { w: self } + #[inline(always)] + pub fn isq1(&mut self) -> ISQ1_W { + ISQ1_W { w: self } } #[doc = "Bits 0:4 - 1st conversion in inserted sequence"] - #[inline] - pub fn isq0(&mut self) -> _ISQ0W { - _ISQ0W { w: self } + #[inline(always)] + pub fn isq0(&mut self) -> ISQ0_W { + ISQ0_W { w: self } } } diff --git a/src/adc0/ovsampctl.rs b/src/adc0/ovsampctl.rs index 1bb6d9b9b2cc261f0a7bfd3cbe03724e9297493c..92f58ed5160e06939c4e976f719b857b43863170 100644 --- a/src/adc0/ovsampctl.rs +++ b/src/adc0/ovsampctl.rs @@ -1,305 +1,156 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::OVSAMPCTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DRESR { - bits: u8, -} -impl DRESR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct TOVSR { - bits: bool, -} -impl TOVSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OVSSR { - bits: u8, -} -impl OVSSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct OVSRR { - bits: u8, -} -impl OVSRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct OVSENR { - bits: bool, -} -impl OVSENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _DRESW<'a> { +#[doc = "Reader of register OVSAMPCTL"] +pub type R = crate::R; +#[doc = "Writer for register OVSAMPCTL"] +pub type W = crate::W; +#[doc = "Register OVSAMPCTL `reset()`'s with value 0"] +impl crate::ResetValue for super::OVSAMPCTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DRES`"] +pub type DRES_R = crate::R; +#[doc = "Write proxy for field `DRES`"] +pub struct DRES_W<'a> { w: &'a mut W, } -impl<'a> _DRESW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DRES_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _TOVSW<'a> { +#[doc = "Reader of field `TOVS`"] +pub type TOVS_R = crate::R; +#[doc = "Write proxy for field `TOVS`"] +pub struct TOVS_W<'a> { w: &'a mut W, } -impl<'a> _TOVSW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TOVS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _OVSSW<'a> { +#[doc = "Reader of field `OVSS`"] +pub type OVSS_R = crate::R; +#[doc = "Write proxy for field `OVSS`"] +pub struct OVSS_W<'a> { w: &'a mut W, } -impl<'a> _OVSSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> OVSS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 5)) | (((value as u32) & 0x0f) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _OVSRW<'a> { +#[doc = "Reader of field `OVSR`"] +pub type OVSR_R = crate::R; +#[doc = "Write proxy for field `OVSR`"] +pub struct OVSR_W<'a> { w: &'a mut W, } -impl<'a> _OVSRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> OVSR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 2)) | (((value as u32) & 0x07) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _OVSENW<'a> { +#[doc = "Reader of field `OVSEN`"] +pub type OVSEN_R = crate::R; +#[doc = "Write proxy for field `OVSEN`"] +pub struct OVSEN_W<'a> { w: &'a mut W, } -impl<'a> _OVSENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OVSEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 12:13 - ADC resolution"] - #[inline] - pub fn dres(&self) -> DRESR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DRESR { bits } + #[inline(always)] + pub fn dres(&self) -> DRES_R { + DRES_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bit 9 - Triggered Oversampling"] - #[inline] - pub fn tovs(&self) -> TOVSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TOVSR { bits } + #[inline(always)] + pub fn tovs(&self) -> TOVS_R { + TOVS_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bits 5:8 - Oversampling shift"] - #[inline] - pub fn ovss(&self) -> OVSSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - OVSSR { bits } + #[inline(always)] + pub fn ovss(&self) -> OVSS_R { + OVSS_R::new(((self.bits >> 5) & 0x0f) as u8) } #[doc = "Bits 2:4 - Oversampling ratio"] - #[inline] - pub fn ovsr(&self) -> OVSRR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - OVSRR { bits } + #[inline(always)] + pub fn ovsr(&self) -> OVSR_R { + OVSR_R::new(((self.bits >> 2) & 0x07) as u8) } #[doc = "Bit 0 - Oversampler Enable"] - #[inline] - pub fn ovsen(&self) -> OVSENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OVSENR { bits } + #[inline(always)] + pub fn ovsen(&self) -> OVSEN_R { + OVSEN_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 12:13 - ADC resolution"] - #[inline] - pub fn dres(&mut self) -> _DRESW { - _DRESW { w: self } + #[inline(always)] + pub fn dres(&mut self) -> DRES_W { + DRES_W { w: self } } #[doc = "Bit 9 - Triggered Oversampling"] - #[inline] - pub fn tovs(&mut self) -> _TOVSW { - _TOVSW { w: self } + #[inline(always)] + pub fn tovs(&mut self) -> TOVS_W { + TOVS_W { w: self } } #[doc = "Bits 5:8 - Oversampling shift"] - #[inline] - pub fn ovss(&mut self) -> _OVSSW { - _OVSSW { w: self } + #[inline(always)] + pub fn ovss(&mut self) -> OVSS_W { + OVSS_W { w: self } } #[doc = "Bits 2:4 - Oversampling ratio"] - #[inline] - pub fn ovsr(&mut self) -> _OVSRW { - _OVSRW { w: self } + #[inline(always)] + pub fn ovsr(&mut self) -> OVSR_W { + OVSR_W { w: self } } #[doc = "Bit 0 - Oversampler Enable"] - #[inline] - pub fn ovsen(&mut self) -> _OVSENW { - _OVSENW { w: self } + #[inline(always)] + pub fn ovsen(&mut self) -> OVSEN_W { + OVSEN_W { w: self } } } diff --git a/src/adc0/rdata.rs b/src/adc0/rdata.rs index 23d5dd596c26625137479d32ae517fa57021b515..a0f4acb9d38f582c3feea03247fc4a3bfb1546a1 100644 --- a/src/adc0/rdata.rs +++ b/src/adc0/rdata.rs @@ -1,62 +1,18 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::RDATA { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct ADC1RDTRR { - bits: u16, -} -impl ADC1RDTRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RDATAR { - bits: u16, -} -impl RDATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register RDATA"] +pub type R = crate::R; +#[doc = "Reader of field `ADC1RDTR`"] +pub type ADC1RDTR_R = crate::R; +#[doc = "Reader of field `RDATA`"] +pub type RDATA_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 16:31 - ADC regular channel data"] - #[inline] - pub fn adc1rdtr(&self) -> ADC1RDTRR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - ADC1RDTRR { bits } + #[inline(always)] + pub fn adc1rdtr(&self) -> ADC1RDTR_R { + ADC1RDTR_R::new(((self.bits >> 16) & 0xffff) as u16) } #[doc = "Bits 0:15 - Regular channel data"] - #[inline] - pub fn rdata(&self) -> RDATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - RDATAR { bits } + #[inline(always)] + pub fn rdata(&self) -> RDATA_R { + RDATA_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/adc0/rsq0.rs b/src/adc0/rsq0.rs index 31db46bd9f313b10beab200db90a33873bdcb34c..0b4ea40289bb9d96f2730ad0bb8739b3c90a8c86 100644 --- a/src/adc0/rsq0.rs +++ b/src/adc0/rsq0.rs @@ -1,269 +1,136 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::RSQ0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RLR { - bits: u8, -} -impl RLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ15R { - bits: u8, -} -impl RSQ15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ14R { - bits: u8, -} -impl RSQ14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ13R { - bits: u8, -} -impl RSQ13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ12R { - bits: u8, -} -impl RSQ12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _RLW<'a> { +#[doc = "Reader of register RSQ0"] +pub type R = crate::R; +#[doc = "Writer for register RSQ0"] +pub type W = crate::W; +#[doc = "Register RSQ0 `reset()`'s with value 0"] +impl crate::ResetValue for super::RSQ0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `RL`"] +pub type RL_R = crate::R; +#[doc = "Write proxy for field `RL`"] +pub struct RL_W<'a> { w: &'a mut W, } -impl<'a> _RLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 20)) | (((value as u32) & 0x0f) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ15W<'a> { +#[doc = "Reader of field `RSQ15`"] +pub type RSQ15_R = crate::R; +#[doc = "Write proxy for field `RSQ15`"] +pub struct RSQ15_W<'a> { w: &'a mut W, } -impl<'a> _RSQ15W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ15_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 15)) | (((value as u32) & 0x1f) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ14W<'a> { +#[doc = "Reader of field `RSQ14`"] +pub type RSQ14_R = crate::R; +#[doc = "Write proxy for field `RSQ14`"] +pub struct RSQ14_W<'a> { w: &'a mut W, } -impl<'a> _RSQ14W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ14_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 10)) | (((value as u32) & 0x1f) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ13W<'a> { +#[doc = "Reader of field `RSQ13`"] +pub type RSQ13_R = crate::R; +#[doc = "Write proxy for field `RSQ13`"] +pub struct RSQ13_W<'a> { w: &'a mut W, } -impl<'a> _RSQ13W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ13_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 5)) | (((value as u32) & 0x1f) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ12W<'a> { +#[doc = "Reader of field `RSQ12`"] +pub type RSQ12_R = crate::R; +#[doc = "Write proxy for field `RSQ12`"] +pub struct RSQ12_W<'a> { w: &'a mut W, } -impl<'a> _RSQ12W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ12_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x1f) | ((value as u32) & 0x1f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 20:23 - Regular channel group length"] - #[inline] - pub fn rl(&self) -> RLR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RLR { bits } + #[inline(always)] + pub fn rl(&self) -> RL_R { + RL_R::new(((self.bits >> 20) & 0x0f) as u8) } #[doc = "Bits 15:19 - 16th conversion in regular sequence"] - #[inline] - pub fn rsq15(&self) -> RSQ15R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ15R { bits } + #[inline(always)] + pub fn rsq15(&self) -> RSQ15_R { + RSQ15_R::new(((self.bits >> 15) & 0x1f) as u8) } #[doc = "Bits 10:14 - 15th conversion in regular sequence"] - #[inline] - pub fn rsq14(&self) -> RSQ14R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ14R { bits } + #[inline(always)] + pub fn rsq14(&self) -> RSQ14_R { + RSQ14_R::new(((self.bits >> 10) & 0x1f) as u8) } #[doc = "Bits 5:9 - 14th conversion in regular sequence"] - #[inline] - pub fn rsq13(&self) -> RSQ13R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ13R { bits } + #[inline(always)] + pub fn rsq13(&self) -> RSQ13_R { + RSQ13_R::new(((self.bits >> 5) & 0x1f) as u8) } #[doc = "Bits 0:4 - 13th conversion in regular sequence"] - #[inline] - pub fn rsq12(&self) -> RSQ12R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ12R { bits } + #[inline(always)] + pub fn rsq12(&self) -> RSQ12_R { + RSQ12_R::new((self.bits & 0x1f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 20:23 - Regular channel group length"] - #[inline] - pub fn rl(&mut self) -> _RLW { - _RLW { w: self } + #[inline(always)] + pub fn rl(&mut self) -> RL_W { + RL_W { w: self } } #[doc = "Bits 15:19 - 16th conversion in regular sequence"] - #[inline] - pub fn rsq15(&mut self) -> _RSQ15W { - _RSQ15W { w: self } + #[inline(always)] + pub fn rsq15(&mut self) -> RSQ15_W { + RSQ15_W { w: self } } #[doc = "Bits 10:14 - 15th conversion in regular sequence"] - #[inline] - pub fn rsq14(&mut self) -> _RSQ14W { - _RSQ14W { w: self } + #[inline(always)] + pub fn rsq14(&mut self) -> RSQ14_W { + RSQ14_W { w: self } } #[doc = "Bits 5:9 - 14th conversion in regular sequence"] - #[inline] - pub fn rsq13(&mut self) -> _RSQ13W { - _RSQ13W { w: self } + #[inline(always)] + pub fn rsq13(&mut self) -> RSQ13_W { + RSQ13_W { w: self } } #[doc = "Bits 0:4 - 13th conversion in regular sequence"] - #[inline] - pub fn rsq12(&mut self) -> _RSQ12W { - _RSQ12W { w: self } + #[inline(always)] + pub fn rsq12(&mut self) -> RSQ12_W { + RSQ12_W { w: self } } } diff --git a/src/adc0/rsq1.rs b/src/adc0/rsq1.rs index d7d499cd0e1ac52e813b15da5e325bc235d1bfac..6d68e09dc098564f9b84a902cf04d26fdea48c26 100644 --- a/src/adc0/rsq1.rs +++ b/src/adc0/rsq1.rs @@ -1,310 +1,160 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::RSQ1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RSQ11R { - bits: u8, -} -impl RSQ11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ10R { - bits: u8, -} -impl RSQ10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ9R { - bits: u8, -} -impl RSQ9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ8R { - bits: u8, -} -impl RSQ8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ7R { - bits: u8, -} -impl RSQ7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ6R { - bits: u8, -} -impl RSQ6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _RSQ11W<'a> { +#[doc = "Reader of register RSQ1"] +pub type R = crate::R; +#[doc = "Writer for register RSQ1"] +pub type W = crate::W; +#[doc = "Register RSQ1 `reset()`'s with value 0"] +impl crate::ResetValue for super::RSQ1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `RSQ11`"] +pub type RSQ11_R = crate::R; +#[doc = "Write proxy for field `RSQ11`"] +pub struct RSQ11_W<'a> { w: &'a mut W, } -impl<'a> _RSQ11W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ11_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 25)) | (((value as u32) & 0x1f) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ10W<'a> { +#[doc = "Reader of field `RSQ10`"] +pub type RSQ10_R = crate::R; +#[doc = "Write proxy for field `RSQ10`"] +pub struct RSQ10_W<'a> { w: &'a mut W, } -impl<'a> _RSQ10W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ10_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 20)) | (((value as u32) & 0x1f) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ9W<'a> { +#[doc = "Reader of field `RSQ9`"] +pub type RSQ9_R = crate::R; +#[doc = "Write proxy for field `RSQ9`"] +pub struct RSQ9_W<'a> { w: &'a mut W, } -impl<'a> _RSQ9W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ9_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 15)) | (((value as u32) & 0x1f) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ8W<'a> { +#[doc = "Reader of field `RSQ8`"] +pub type RSQ8_R = crate::R; +#[doc = "Write proxy for field `RSQ8`"] +pub struct RSQ8_W<'a> { w: &'a mut W, } -impl<'a> _RSQ8W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ8_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 10)) | (((value as u32) & 0x1f) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ7W<'a> { +#[doc = "Reader of field `RSQ7`"] +pub type RSQ7_R = crate::R; +#[doc = "Write proxy for field `RSQ7`"] +pub struct RSQ7_W<'a> { w: &'a mut W, } -impl<'a> _RSQ7W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ7_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 5)) | (((value as u32) & 0x1f) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ6W<'a> { +#[doc = "Reader of field `RSQ6`"] +pub type RSQ6_R = crate::R; +#[doc = "Write proxy for field `RSQ6`"] +pub struct RSQ6_W<'a> { w: &'a mut W, } -impl<'a> _RSQ6W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ6_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x1f) | ((value as u32) & 0x1f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 25:29 - 12th conversion in regular sequence"] - #[inline] - pub fn rsq11(&self) -> RSQ11R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ11R { bits } + #[inline(always)] + pub fn rsq11(&self) -> RSQ11_R { + RSQ11_R::new(((self.bits >> 25) & 0x1f) as u8) } #[doc = "Bits 20:24 - 11th conversion in regular sequence"] - #[inline] - pub fn rsq10(&self) -> RSQ10R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ10R { bits } + #[inline(always)] + pub fn rsq10(&self) -> RSQ10_R { + RSQ10_R::new(((self.bits >> 20) & 0x1f) as u8) } #[doc = "Bits 15:19 - 10th conversion in regular sequence"] - #[inline] - pub fn rsq9(&self) -> RSQ9R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ9R { bits } + #[inline(always)] + pub fn rsq9(&self) -> RSQ9_R { + RSQ9_R::new(((self.bits >> 15) & 0x1f) as u8) } #[doc = "Bits 10:14 - 9th conversion in regular sequence"] - #[inline] - pub fn rsq8(&self) -> RSQ8R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ8R { bits } + #[inline(always)] + pub fn rsq8(&self) -> RSQ8_R { + RSQ8_R::new(((self.bits >> 10) & 0x1f) as u8) } #[doc = "Bits 5:9 - 8th conversion in regular sequence"] - #[inline] - pub fn rsq7(&self) -> RSQ7R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ7R { bits } + #[inline(always)] + pub fn rsq7(&self) -> RSQ7_R { + RSQ7_R::new(((self.bits >> 5) & 0x1f) as u8) } #[doc = "Bits 0:4 - 7th conversion in regular sequence"] - #[inline] - pub fn rsq6(&self) -> RSQ6R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ6R { bits } + #[inline(always)] + pub fn rsq6(&self) -> RSQ6_R { + RSQ6_R::new((self.bits & 0x1f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 25:29 - 12th conversion in regular sequence"] - #[inline] - pub fn rsq11(&mut self) -> _RSQ11W { - _RSQ11W { w: self } + #[inline(always)] + pub fn rsq11(&mut self) -> RSQ11_W { + RSQ11_W { w: self } } #[doc = "Bits 20:24 - 11th conversion in regular sequence"] - #[inline] - pub fn rsq10(&mut self) -> _RSQ10W { - _RSQ10W { w: self } + #[inline(always)] + pub fn rsq10(&mut self) -> RSQ10_W { + RSQ10_W { w: self } } #[doc = "Bits 15:19 - 10th conversion in regular sequence"] - #[inline] - pub fn rsq9(&mut self) -> _RSQ9W { - _RSQ9W { w: self } + #[inline(always)] + pub fn rsq9(&mut self) -> RSQ9_W { + RSQ9_W { w: self } } #[doc = "Bits 10:14 - 9th conversion in regular sequence"] - #[inline] - pub fn rsq8(&mut self) -> _RSQ8W { - _RSQ8W { w: self } + #[inline(always)] + pub fn rsq8(&mut self) -> RSQ8_W { + RSQ8_W { w: self } } #[doc = "Bits 5:9 - 8th conversion in regular sequence"] - #[inline] - pub fn rsq7(&mut self) -> _RSQ7W { - _RSQ7W { w: self } + #[inline(always)] + pub fn rsq7(&mut self) -> RSQ7_W { + RSQ7_W { w: self } } #[doc = "Bits 0:4 - 7th conversion in regular sequence"] - #[inline] - pub fn rsq6(&mut self) -> _RSQ6W { - _RSQ6W { w: self } + #[inline(always)] + pub fn rsq6(&mut self) -> RSQ6_W { + RSQ6_W { w: self } } } diff --git a/src/adc0/rsq2.rs b/src/adc0/rsq2.rs index 08c596528694c8ea37d34a4c76d37a3552fad325..e5eba0ad633c4a773d4a759bbbcd8417bf61193d 100644 --- a/src/adc0/rsq2.rs +++ b/src/adc0/rsq2.rs @@ -1,310 +1,160 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::RSQ2 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RSQ5R { - bits: u8, -} -impl RSQ5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ4R { - bits: u8, -} -impl RSQ4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ3R { - bits: u8, -} -impl RSQ3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ2R { - bits: u8, -} -impl RSQ2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ1R { - bits: u8, -} -impl RSQ1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ0R { - bits: u8, -} -impl RSQ0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _RSQ5W<'a> { +#[doc = "Reader of register RSQ2"] +pub type R = crate::R; +#[doc = "Writer for register RSQ2"] +pub type W = crate::W; +#[doc = "Register RSQ2 `reset()`'s with value 0"] +impl crate::ResetValue for super::RSQ2 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `RSQ5`"] +pub type RSQ5_R = crate::R; +#[doc = "Write proxy for field `RSQ5`"] +pub struct RSQ5_W<'a> { w: &'a mut W, } -impl<'a> _RSQ5W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ5_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 25)) | (((value as u32) & 0x1f) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ4W<'a> { +#[doc = "Reader of field `RSQ4`"] +pub type RSQ4_R = crate::R; +#[doc = "Write proxy for field `RSQ4`"] +pub struct RSQ4_W<'a> { w: &'a mut W, } -impl<'a> _RSQ4W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ4_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 20)) | (((value as u32) & 0x1f) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ3W<'a> { +#[doc = "Reader of field `RSQ3`"] +pub type RSQ3_R = crate::R; +#[doc = "Write proxy for field `RSQ3`"] +pub struct RSQ3_W<'a> { w: &'a mut W, } -impl<'a> _RSQ3W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ3_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 15)) | (((value as u32) & 0x1f) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ2W<'a> { +#[doc = "Reader of field `RSQ2`"] +pub type RSQ2_R = crate::R; +#[doc = "Write proxy for field `RSQ2`"] +pub struct RSQ2_W<'a> { w: &'a mut W, } -impl<'a> _RSQ2W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ2_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 10)) | (((value as u32) & 0x1f) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ1W<'a> { +#[doc = "Reader of field `RSQ1`"] +pub type RSQ1_R = crate::R; +#[doc = "Write proxy for field `RSQ1`"] +pub struct RSQ1_W<'a> { w: &'a mut W, } -impl<'a> _RSQ1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 5)) | (((value as u32) & 0x1f) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ0W<'a> { +#[doc = "Reader of field `RSQ0`"] +pub type RSQ0_R = crate::R; +#[doc = "Write proxy for field `RSQ0`"] +pub struct RSQ0_W<'a> { w: &'a mut W, } -impl<'a> _RSQ0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x1f) | ((value as u32) & 0x1f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 25:29 - 6th conversion in regular sequence"] - #[inline] - pub fn rsq5(&self) -> RSQ5R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ5R { bits } + #[inline(always)] + pub fn rsq5(&self) -> RSQ5_R { + RSQ5_R::new(((self.bits >> 25) & 0x1f) as u8) } #[doc = "Bits 20:24 - 5th conversion in regular sequence"] - #[inline] - pub fn rsq4(&self) -> RSQ4R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ4R { bits } + #[inline(always)] + pub fn rsq4(&self) -> RSQ4_R { + RSQ4_R::new(((self.bits >> 20) & 0x1f) as u8) } #[doc = "Bits 15:19 - 4th conversion in regular sequence"] - #[inline] - pub fn rsq3(&self) -> RSQ3R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ3R { bits } + #[inline(always)] + pub fn rsq3(&self) -> RSQ3_R { + RSQ3_R::new(((self.bits >> 15) & 0x1f) as u8) } #[doc = "Bits 10:14 - 3rd conversion in regular sequence"] - #[inline] - pub fn rsq2(&self) -> RSQ2R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ2R { bits } + #[inline(always)] + pub fn rsq2(&self) -> RSQ2_R { + RSQ2_R::new(((self.bits >> 10) & 0x1f) as u8) } #[doc = "Bits 5:9 - 2nd conversion in regular sequence"] - #[inline] - pub fn rsq1(&self) -> RSQ1R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ1R { bits } + #[inline(always)] + pub fn rsq1(&self) -> RSQ1_R { + RSQ1_R::new(((self.bits >> 5) & 0x1f) as u8) } #[doc = "Bits 0:4 - 1st conversion in regular sequence"] - #[inline] - pub fn rsq0(&self) -> RSQ0R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ0R { bits } + #[inline(always)] + pub fn rsq0(&self) -> RSQ0_R { + RSQ0_R::new((self.bits & 0x1f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 25:29 - 6th conversion in regular sequence"] - #[inline] - pub fn rsq5(&mut self) -> _RSQ5W { - _RSQ5W { w: self } + #[inline(always)] + pub fn rsq5(&mut self) -> RSQ5_W { + RSQ5_W { w: self } } #[doc = "Bits 20:24 - 5th conversion in regular sequence"] - #[inline] - pub fn rsq4(&mut self) -> _RSQ4W { - _RSQ4W { w: self } + #[inline(always)] + pub fn rsq4(&mut self) -> RSQ4_W { + RSQ4_W { w: self } } #[doc = "Bits 15:19 - 4th conversion in regular sequence"] - #[inline] - pub fn rsq3(&mut self) -> _RSQ3W { - _RSQ3W { w: self } + #[inline(always)] + pub fn rsq3(&mut self) -> RSQ3_W { + RSQ3_W { w: self } } #[doc = "Bits 10:14 - 3rd conversion in regular sequence"] - #[inline] - pub fn rsq2(&mut self) -> _RSQ2W { - _RSQ2W { w: self } + #[inline(always)] + pub fn rsq2(&mut self) -> RSQ2_W { + RSQ2_W { w: self } } #[doc = "Bits 5:9 - 2nd conversion in regular sequence"] - #[inline] - pub fn rsq1(&mut self) -> _RSQ1W { - _RSQ1W { w: self } + #[inline(always)] + pub fn rsq1(&mut self) -> RSQ1_W { + RSQ1_W { w: self } } #[doc = "Bits 0:4 - 1st conversion in regular sequence"] - #[inline] - pub fn rsq0(&mut self) -> _RSQ0W { - _RSQ0W { w: self } + #[inline(always)] + pub fn rsq0(&mut self) -> RSQ0_W { + RSQ0_W { w: self } } } diff --git a/src/adc0/sampt0.rs b/src/adc0/sampt0.rs index 57608edc7b21737270779a1d9d6daa8fe82b676a..6a69522216943cbce0f464fd4ddf150090334fe9 100644 --- a/src/adc0/sampt0.rs +++ b/src/adc0/sampt0.rs @@ -1,392 +1,208 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::SAMPT0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SPT10R { - bits: u8, -} -impl SPT10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT11R { - bits: u8, -} -impl SPT11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT12R { - bits: u8, -} -impl SPT12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT13R { - bits: u8, -} -impl SPT13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT14R { - bits: u8, -} -impl SPT14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT15R { - bits: u8, -} -impl SPT15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT16R { - bits: u8, -} -impl SPT16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT17R { - bits: u8, -} -impl SPT17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _SPT10W<'a> { +#[doc = "Reader of register SAMPT0"] +pub type R = crate::R; +#[doc = "Writer for register SAMPT0"] +pub type W = crate::W; +#[doc = "Register SAMPT0 `reset()`'s with value 0"] +impl crate::ResetValue for super::SAMPT0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `SPT10`"] +pub type SPT10_R = crate::R; +#[doc = "Write proxy for field `SPT10`"] +pub struct SPT10_W<'a> { w: &'a mut W, } -impl<'a> _SPT10W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT10_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07) | ((value as u32) & 0x07); self.w } } -#[doc = r" Proxy"] -pub struct _SPT11W<'a> { +#[doc = "Reader of field `SPT11`"] +pub type SPT11_R = crate::R; +#[doc = "Write proxy for field `SPT11`"] +pub struct SPT11_W<'a> { w: &'a mut W, } -impl<'a> _SPT11W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT11_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 3)) | (((value as u32) & 0x07) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _SPT12W<'a> { +#[doc = "Reader of field `SPT12`"] +pub type SPT12_R = crate::R; +#[doc = "Write proxy for field `SPT12`"] +pub struct SPT12_W<'a> { w: &'a mut W, } -impl<'a> _SPT12W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT12_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 6)) | (((value as u32) & 0x07) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _SPT13W<'a> { +#[doc = "Reader of field `SPT13`"] +pub type SPT13_R = crate::R; +#[doc = "Write proxy for field `SPT13`"] +pub struct SPT13_W<'a> { w: &'a mut W, } -impl<'a> _SPT13W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT13_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 9)) | (((value as u32) & 0x07) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _SPT14W<'a> { +#[doc = "Reader of field `SPT14`"] +pub type SPT14_R = crate::R; +#[doc = "Write proxy for field `SPT14`"] +pub struct SPT14_W<'a> { w: &'a mut W, } -impl<'a> _SPT14W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT14_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 12)) | (((value as u32) & 0x07) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _SPT15W<'a> { +#[doc = "Reader of field `SPT15`"] +pub type SPT15_R = crate::R; +#[doc = "Write proxy for field `SPT15`"] +pub struct SPT15_W<'a> { w: &'a mut W, } -impl<'a> _SPT15W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT15_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 15)) | (((value as u32) & 0x07) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _SPT16W<'a> { +#[doc = "Reader of field `SPT16`"] +pub type SPT16_R = crate::R; +#[doc = "Write proxy for field `SPT16`"] +pub struct SPT16_W<'a> { w: &'a mut W, } -impl<'a> _SPT16W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT16_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 18)) | (((value as u32) & 0x07) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _SPT17W<'a> { +#[doc = "Reader of field `SPT17`"] +pub type SPT17_R = crate::R; +#[doc = "Write proxy for field `SPT17`"] +pub struct SPT17_W<'a> { w: &'a mut W, } -impl<'a> _SPT17W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT17_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 21)) | (((value as u32) & 0x07) << 21); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:2 - Channel 10 sample time selection"] - #[inline] - pub fn spt10(&self) -> SPT10R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT10R { bits } + #[inline(always)] + pub fn spt10(&self) -> SPT10_R { + SPT10_R::new((self.bits & 0x07) as u8) } #[doc = "Bits 3:5 - Channel 11 sample time selection"] - #[inline] - pub fn spt11(&self) -> SPT11R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT11R { bits } + #[inline(always)] + pub fn spt11(&self) -> SPT11_R { + SPT11_R::new(((self.bits >> 3) & 0x07) as u8) } #[doc = "Bits 6:8 - Channel 12 sample time selection"] - #[inline] - pub fn spt12(&self) -> SPT12R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT12R { bits } + #[inline(always)] + pub fn spt12(&self) -> SPT12_R { + SPT12_R::new(((self.bits >> 6) & 0x07) as u8) } #[doc = "Bits 9:11 - Channel 13 sample time selection"] - #[inline] - pub fn spt13(&self) -> SPT13R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT13R { bits } + #[inline(always)] + pub fn spt13(&self) -> SPT13_R { + SPT13_R::new(((self.bits >> 9) & 0x07) as u8) } #[doc = "Bits 12:14 - Channel 14 sample time selection"] - #[inline] - pub fn spt14(&self) -> SPT14R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT14R { bits } + #[inline(always)] + pub fn spt14(&self) -> SPT14_R { + SPT14_R::new(((self.bits >> 12) & 0x07) as u8) } #[doc = "Bits 15:17 - Channel 15 sample time selection"] - #[inline] - pub fn spt15(&self) -> SPT15R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT15R { bits } + #[inline(always)] + pub fn spt15(&self) -> SPT15_R { + SPT15_R::new(((self.bits >> 15) & 0x07) as u8) } #[doc = "Bits 18:20 - Channel 16 sample time selection"] - #[inline] - pub fn spt16(&self) -> SPT16R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT16R { bits } + #[inline(always)] + pub fn spt16(&self) -> SPT16_R { + SPT16_R::new(((self.bits >> 18) & 0x07) as u8) } #[doc = "Bits 21:23 - Channel 17 sample time selection"] - #[inline] - pub fn spt17(&self) -> SPT17R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT17R { bits } + #[inline(always)] + pub fn spt17(&self) -> SPT17_R { + SPT17_R::new(((self.bits >> 21) & 0x07) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:2 - Channel 10 sample time selection"] - #[inline] - pub fn spt10(&mut self) -> _SPT10W { - _SPT10W { w: self } + #[inline(always)] + pub fn spt10(&mut self) -> SPT10_W { + SPT10_W { w: self } } #[doc = "Bits 3:5 - Channel 11 sample time selection"] - #[inline] - pub fn spt11(&mut self) -> _SPT11W { - _SPT11W { w: self } + #[inline(always)] + pub fn spt11(&mut self) -> SPT11_W { + SPT11_W { w: self } } #[doc = "Bits 6:8 - Channel 12 sample time selection"] - #[inline] - pub fn spt12(&mut self) -> _SPT12W { - _SPT12W { w: self } + #[inline(always)] + pub fn spt12(&mut self) -> SPT12_W { + SPT12_W { w: self } } #[doc = "Bits 9:11 - Channel 13 sample time selection"] - #[inline] - pub fn spt13(&mut self) -> _SPT13W { - _SPT13W { w: self } + #[inline(always)] + pub fn spt13(&mut self) -> SPT13_W { + SPT13_W { w: self } } #[doc = "Bits 12:14 - Channel 14 sample time selection"] - #[inline] - pub fn spt14(&mut self) -> _SPT14W { - _SPT14W { w: self } + #[inline(always)] + pub fn spt14(&mut self) -> SPT14_W { + SPT14_W { w: self } } #[doc = "Bits 15:17 - Channel 15 sample time selection"] - #[inline] - pub fn spt15(&mut self) -> _SPT15W { - _SPT15W { w: self } + #[inline(always)] + pub fn spt15(&mut self) -> SPT15_W { + SPT15_W { w: self } } #[doc = "Bits 18:20 - Channel 16 sample time selection"] - #[inline] - pub fn spt16(&mut self) -> _SPT16W { - _SPT16W { w: self } + #[inline(always)] + pub fn spt16(&mut self) -> SPT16_W { + SPT16_W { w: self } } #[doc = "Bits 21:23 - Channel 17 sample time selection"] - #[inline] - pub fn spt17(&mut self) -> _SPT17W { - _SPT17W { w: self } + #[inline(always)] + pub fn spt17(&mut self) -> SPT17_W { + SPT17_W { w: self } } } diff --git a/src/adc0/sampt1.rs b/src/adc0/sampt1.rs index 23b44a11de0a993e9b9abf4cf81bee38071d97ee..3d64102f2d62d7908551269fcfee7dc51184c82b 100644 --- a/src/adc0/sampt1.rs +++ b/src/adc0/sampt1.rs @@ -1,474 +1,256 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::SAMPT1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SPT0R { - bits: u8, -} -impl SPT0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT1R { - bits: u8, -} -impl SPT1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT2R { - bits: u8, -} -impl SPT2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT3R { - bits: u8, -} -impl SPT3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT4R { - bits: u8, -} -impl SPT4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT5R { - bits: u8, -} -impl SPT5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT6R { - bits: u8, -} -impl SPT6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT7R { - bits: u8, -} -impl SPT7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT8R { - bits: u8, -} -impl SPT8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT9R { - bits: u8, -} -impl SPT9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _SPT0W<'a> { +#[doc = "Reader of register SAMPT1"] +pub type R = crate::R; +#[doc = "Writer for register SAMPT1"] +pub type W = crate::W; +#[doc = "Register SAMPT1 `reset()`'s with value 0"] +impl crate::ResetValue for super::SAMPT1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `SPT0`"] +pub type SPT0_R = crate::R; +#[doc = "Write proxy for field `SPT0`"] +pub struct SPT0_W<'a> { w: &'a mut W, } -impl<'a> _SPT0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07) | ((value as u32) & 0x07); self.w } } -#[doc = r" Proxy"] -pub struct _SPT1W<'a> { +#[doc = "Reader of field `SPT1`"] +pub type SPT1_R = crate::R; +#[doc = "Write proxy for field `SPT1`"] +pub struct SPT1_W<'a> { w: &'a mut W, } -impl<'a> _SPT1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 3)) | (((value as u32) & 0x07) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _SPT2W<'a> { +#[doc = "Reader of field `SPT2`"] +pub type SPT2_R = crate::R; +#[doc = "Write proxy for field `SPT2`"] +pub struct SPT2_W<'a> { w: &'a mut W, } -impl<'a> _SPT2W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT2_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 6)) | (((value as u32) & 0x07) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _SPT3W<'a> { +#[doc = "Reader of field `SPT3`"] +pub type SPT3_R = crate::R; +#[doc = "Write proxy for field `SPT3`"] +pub struct SPT3_W<'a> { w: &'a mut W, } -impl<'a> _SPT3W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT3_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 9)) | (((value as u32) & 0x07) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _SPT4W<'a> { +#[doc = "Reader of field `SPT4`"] +pub type SPT4_R = crate::R; +#[doc = "Write proxy for field `SPT4`"] +pub struct SPT4_W<'a> { w: &'a mut W, } -impl<'a> _SPT4W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT4_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 12)) | (((value as u32) & 0x07) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _SPT5W<'a> { +#[doc = "Reader of field `SPT5`"] +pub type SPT5_R = crate::R; +#[doc = "Write proxy for field `SPT5`"] +pub struct SPT5_W<'a> { w: &'a mut W, } -impl<'a> _SPT5W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT5_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 15)) | (((value as u32) & 0x07) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _SPT6W<'a> { +#[doc = "Reader of field `SPT6`"] +pub type SPT6_R = crate::R; +#[doc = "Write proxy for field `SPT6`"] +pub struct SPT6_W<'a> { w: &'a mut W, } -impl<'a> _SPT6W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT6_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 18)) | (((value as u32) & 0x07) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _SPT7W<'a> { +#[doc = "Reader of field `SPT7`"] +pub type SPT7_R = crate::R; +#[doc = "Write proxy for field `SPT7`"] +pub struct SPT7_W<'a> { w: &'a mut W, } -impl<'a> _SPT7W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT7_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 21)) | (((value as u32) & 0x07) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _SPT8W<'a> { +#[doc = "Reader of field `SPT8`"] +pub type SPT8_R = crate::R; +#[doc = "Write proxy for field `SPT8`"] +pub struct SPT8_W<'a> { w: &'a mut W, } -impl<'a> _SPT8W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT8_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 24)) | (((value as u32) & 0x07) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _SPT9W<'a> { +#[doc = "Reader of field `SPT9`"] +pub type SPT9_R = crate::R; +#[doc = "Write proxy for field `SPT9`"] +pub struct SPT9_W<'a> { w: &'a mut W, } -impl<'a> _SPT9W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT9_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 27)) | (((value as u32) & 0x07) << 27); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:2 - Channel 0 sample time selection"] - #[inline] - pub fn spt0(&self) -> SPT0R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT0R { bits } + #[inline(always)] + pub fn spt0(&self) -> SPT0_R { + SPT0_R::new((self.bits & 0x07) as u8) } #[doc = "Bits 3:5 - Channel 1 sample time selection"] - #[inline] - pub fn spt1(&self) -> SPT1R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT1R { bits } + #[inline(always)] + pub fn spt1(&self) -> SPT1_R { + SPT1_R::new(((self.bits >> 3) & 0x07) as u8) } #[doc = "Bits 6:8 - Channel 2 sample time selection"] - #[inline] - pub fn spt2(&self) -> SPT2R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT2R { bits } + #[inline(always)] + pub fn spt2(&self) -> SPT2_R { + SPT2_R::new(((self.bits >> 6) & 0x07) as u8) } #[doc = "Bits 9:11 - Channel 3 sample time selection"] - #[inline] - pub fn spt3(&self) -> SPT3R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT3R { bits } + #[inline(always)] + pub fn spt3(&self) -> SPT3_R { + SPT3_R::new(((self.bits >> 9) & 0x07) as u8) } #[doc = "Bits 12:14 - Channel 4 sample time selection"] - #[inline] - pub fn spt4(&self) -> SPT4R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT4R { bits } + #[inline(always)] + pub fn spt4(&self) -> SPT4_R { + SPT4_R::new(((self.bits >> 12) & 0x07) as u8) } #[doc = "Bits 15:17 - Channel 5 sample time selection"] - #[inline] - pub fn spt5(&self) -> SPT5R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT5R { bits } + #[inline(always)] + pub fn spt5(&self) -> SPT5_R { + SPT5_R::new(((self.bits >> 15) & 0x07) as u8) } #[doc = "Bits 18:20 - Channel 6 sample time selection"] - #[inline] - pub fn spt6(&self) -> SPT6R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT6R { bits } + #[inline(always)] + pub fn spt6(&self) -> SPT6_R { + SPT6_R::new(((self.bits >> 18) & 0x07) as u8) } #[doc = "Bits 21:23 - Channel 7 sample time selection"] - #[inline] - pub fn spt7(&self) -> SPT7R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT7R { bits } + #[inline(always)] + pub fn spt7(&self) -> SPT7_R { + SPT7_R::new(((self.bits >> 21) & 0x07) as u8) } #[doc = "Bits 24:26 - Channel 8 sample time selection"] - #[inline] - pub fn spt8(&self) -> SPT8R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT8R { bits } + #[inline(always)] + pub fn spt8(&self) -> SPT8_R { + SPT8_R::new(((self.bits >> 24) & 0x07) as u8) } #[doc = "Bits 27:29 - Channel 9 sample time selection"] - #[inline] - pub fn spt9(&self) -> SPT9R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT9R { bits } + #[inline(always)] + pub fn spt9(&self) -> SPT9_R { + SPT9_R::new(((self.bits >> 27) & 0x07) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:2 - Channel 0 sample time selection"] - #[inline] - pub fn spt0(&mut self) -> _SPT0W { - _SPT0W { w: self } + #[inline(always)] + pub fn spt0(&mut self) -> SPT0_W { + SPT0_W { w: self } } #[doc = "Bits 3:5 - Channel 1 sample time selection"] - #[inline] - pub fn spt1(&mut self) -> _SPT1W { - _SPT1W { w: self } + #[inline(always)] + pub fn spt1(&mut self) -> SPT1_W { + SPT1_W { w: self } } #[doc = "Bits 6:8 - Channel 2 sample time selection"] - #[inline] - pub fn spt2(&mut self) -> _SPT2W { - _SPT2W { w: self } + #[inline(always)] + pub fn spt2(&mut self) -> SPT2_W { + SPT2_W { w: self } } #[doc = "Bits 9:11 - Channel 3 sample time selection"] - #[inline] - pub fn spt3(&mut self) -> _SPT3W { - _SPT3W { w: self } + #[inline(always)] + pub fn spt3(&mut self) -> SPT3_W { + SPT3_W { w: self } } #[doc = "Bits 12:14 - Channel 4 sample time selection"] - #[inline] - pub fn spt4(&mut self) -> _SPT4W { - _SPT4W { w: self } + #[inline(always)] + pub fn spt4(&mut self) -> SPT4_W { + SPT4_W { w: self } } #[doc = "Bits 15:17 - Channel 5 sample time selection"] - #[inline] - pub fn spt5(&mut self) -> _SPT5W { - _SPT5W { w: self } + #[inline(always)] + pub fn spt5(&mut self) -> SPT5_W { + SPT5_W { w: self } } #[doc = "Bits 18:20 - Channel 6 sample time selection"] - #[inline] - pub fn spt6(&mut self) -> _SPT6W { - _SPT6W { w: self } + #[inline(always)] + pub fn spt6(&mut self) -> SPT6_W { + SPT6_W { w: self } } #[doc = "Bits 21:23 - Channel 7 sample time selection"] - #[inline] - pub fn spt7(&mut self) -> _SPT7W { - _SPT7W { w: self } + #[inline(always)] + pub fn spt7(&mut self) -> SPT7_W { + SPT7_W { w: self } } #[doc = "Bits 24:26 - Channel 8 sample time selection"] - #[inline] - pub fn spt8(&mut self) -> _SPT8W { - _SPT8W { w: self } + #[inline(always)] + pub fn spt8(&mut self) -> SPT8_W { + SPT8_W { w: self } } #[doc = "Bits 27:29 - Channel 9 sample time selection"] - #[inline] - pub fn spt9(&mut self) -> _SPT9W { - _SPT9W { w: self } + #[inline(always)] + pub fn spt9(&mut self) -> SPT9_W { + SPT9_W { w: self } } } diff --git a/src/adc0/stat.rs b/src/adc0/stat.rs index f544f913930b36da27dca14f590174387b0942ac..42f6de4627bbbbe94dcc126c3075c1d27c829803 100644 --- a/src/adc0/stat.rs +++ b/src/adc0/stat.rs @@ -1,359 +1,186 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::STAT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct STRCR { - bits: bool, -} -impl STRCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STICR { - bits: bool, -} -impl STICR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EOICR { - bits: bool, -} -impl EOICR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EOCR { - bits: bool, -} -impl EOCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WDER { - bits: bool, -} -impl WDER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _STRCW<'a> { +#[doc = "Reader of register STAT"] +pub type R = crate::R; +#[doc = "Writer for register STAT"] +pub type W = crate::W; +#[doc = "Register STAT `reset()`'s with value 0"] +impl crate::ResetValue for super::STAT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `STRC`"] +pub type STRC_R = crate::R; +#[doc = "Write proxy for field `STRC`"] +pub struct STRC_W<'a> { w: &'a mut W, } -impl<'a> _STRCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STRC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _STICW<'a> { +#[doc = "Reader of field `STIC`"] +pub type STIC_R = crate::R; +#[doc = "Write proxy for field `STIC`"] +pub struct STIC_W<'a> { w: &'a mut W, } -impl<'a> _STICW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STIC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _EOICW<'a> { +#[doc = "Reader of field `EOIC`"] +pub type EOIC_R = crate::R; +#[doc = "Write proxy for field `EOIC`"] +pub struct EOIC_W<'a> { w: &'a mut W, } -impl<'a> _EOICW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EOIC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _EOCW<'a> { +#[doc = "Reader of field `EOC`"] +pub type EOC_R = crate::R; +#[doc = "Write proxy for field `EOC`"] +pub struct EOC_W<'a> { w: &'a mut W, } -impl<'a> _EOCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EOC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _WDEW<'a> { +#[doc = "Reader of field `WDE`"] +pub type WDE_R = crate::R; +#[doc = "Write proxy for field `WDE`"] +pub struct WDE_W<'a> { w: &'a mut W, } -impl<'a> _WDEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WDE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 4 - Start flag of regular channel group"] - #[inline] - pub fn strc(&self) -> STRCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STRCR { bits } + #[inline(always)] + pub fn strc(&self) -> STRC_R { + STRC_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Start flag of inserted channel group"] - #[inline] - pub fn stic(&self) -> STICR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STICR { bits } + #[inline(always)] + pub fn stic(&self) -> STIC_R { + STIC_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - End of inserted group conversion flag"] - #[inline] - pub fn eoic(&self) -> EOICR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOICR { bits } + #[inline(always)] + pub fn eoic(&self) -> EOIC_R { + EOIC_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - End of group conversion flag"] - #[inline] - pub fn eoc(&self) -> EOCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOCR { bits } + #[inline(always)] + pub fn eoc(&self) -> EOC_R { + EOC_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Analog watchdog event flag"] - #[inline] - pub fn wde(&self) -> WDER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WDER { bits } + #[inline(always)] + pub fn wde(&self) -> WDE_R { + WDE_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 4 - Start flag of regular channel group"] - #[inline] - pub fn strc(&mut self) -> _STRCW { - _STRCW { w: self } + #[inline(always)] + pub fn strc(&mut self) -> STRC_W { + STRC_W { w: self } } #[doc = "Bit 3 - Start flag of inserted channel group"] - #[inline] - pub fn stic(&mut self) -> _STICW { - _STICW { w: self } + #[inline(always)] + pub fn stic(&mut self) -> STIC_W { + STIC_W { w: self } } #[doc = "Bit 2 - End of inserted group conversion flag"] - #[inline] - pub fn eoic(&mut self) -> _EOICW { - _EOICW { w: self } + #[inline(always)] + pub fn eoic(&mut self) -> EOIC_W { + EOIC_W { w: self } } #[doc = "Bit 1 - End of group conversion flag"] - #[inline] - pub fn eoc(&mut self) -> _EOCW { - _EOCW { w: self } + #[inline(always)] + pub fn eoc(&mut self) -> EOC_W { + EOC_W { w: self } } #[doc = "Bit 0 - Analog watchdog event flag"] - #[inline] - pub fn wde(&mut self) -> _WDEW { - _WDEW { w: self } + #[inline(always)] + pub fn wde(&mut self) -> WDE_W { + WDE_W { w: self } } } diff --git a/src/adc0/wdht.rs b/src/adc0/wdht.rs index bca33387dea168f3bea593c00e305210493eed7d..2ba670e78002f2ecad91e39f3090fe188861b973 100644 --- a/src/adc0/wdht.rs +++ b/src/adc0/wdht.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::WDHT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct WDHTR { - bits: u16, -} -impl WDHTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _WDHTW<'a> { +#[doc = "Reader of register WDHT"] +pub type R = crate::R; +#[doc = "Writer for register WDHT"] +pub type W = crate::W; +#[doc = "Register WDHT `reset()`'s with value 0x0fff"] +impl crate::ResetValue for super::WDHT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0fff + } +} +#[doc = "Reader of field `WDHT`"] +pub type WDHT_R = crate::R; +#[doc = "Write proxy for field `WDHT`"] +pub struct WDHT_W<'a> { w: &'a mut W, } -impl<'a> _WDHTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> WDHT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - Analog watchdog higher threshold"] - #[inline] - pub fn wdht(&self) -> WDHTR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - WDHTR { bits } + #[inline(always)] + pub fn wdht(&self) -> WDHT_R { + WDHT_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0fff } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - Analog watchdog higher threshold"] - #[inline] - pub fn wdht(&mut self) -> _WDHTW { - _WDHTW { w: self } + #[inline(always)] + pub fn wdht(&mut self) -> WDHT_W { + WDHT_W { w: self } } } diff --git a/src/adc0/wdlt.rs b/src/adc0/wdlt.rs index 80a59a22b23bcdf9d7454b9c3942388e4859f454..4c45066674864a075fd79f15cfc4b11cca3faa1d 100644 --- a/src/adc0/wdlt.rs +++ b/src/adc0/wdlt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::WDLT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct WDLTR { - bits: u16, -} -impl WDLTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _WDLTW<'a> { +#[doc = "Reader of register WDLT"] +pub type R = crate::R; +#[doc = "Writer for register WDLT"] +pub type W = crate::W; +#[doc = "Register WDLT `reset()`'s with value 0"] +impl crate::ResetValue for super::WDLT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `WDLT`"] +pub type WDLT_R = crate::R; +#[doc = "Write proxy for field `WDLT`"] +pub struct WDLT_W<'a> { w: &'a mut W, } -impl<'a> _WDLTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> WDLT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - Analog watchdog lower threshold"] - #[inline] - pub fn wdlt(&self) -> WDLTR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - WDLTR { bits } + #[inline(always)] + pub fn wdlt(&self) -> WDLT_R { + WDLT_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - Analog watchdog lower threshold"] - #[inline] - pub fn wdlt(&mut self) -> _WDLTW { - _WDLTW { w: self } + #[inline(always)] + pub fn wdlt(&mut self) -> WDLT_W { + WDLT_W { w: self } } } diff --git a/src/adc1.rs b/src/adc1.rs index 5eff066f7334ba04033e8fd566d85a5d94bd3dc0..ac85b78192eb859b7fc4997f227625e56d14c2fe 100644 --- a/src/adc1.rs +++ b/src/adc1.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - status register"] @@ -42,123 +42,213 @@ pub struct RegisterBlock { #[doc = "0x4c - regular data register"] pub rdata: RDATA, } -#[doc = "status register"] -pub struct STAT { - register: ::vcell::VolatileCell, -} +#[doc = "status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [stat](stat) module"] +pub type STAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _STAT; +#[doc = "`read()` method returns [stat::R](stat::R) reader structure"] +impl crate::Readable for STAT {} +#[doc = "`write(|w| ..)` method takes [stat::W](stat::W) writer structure"] +impl crate::Writable for STAT {} #[doc = "status register"] pub mod stat; -#[doc = "control register 0"] -pub struct CTL0 { - register: ::vcell::VolatileCell, -} +#[doc = "control register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl0](ctl0) module"] +pub type CTL0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL0; +#[doc = "`read()` method returns [ctl0::R](ctl0::R) reader structure"] +impl crate::Readable for CTL0 {} +#[doc = "`write(|w| ..)` method takes [ctl0::W](ctl0::W) writer structure"] +impl crate::Writable for CTL0 {} #[doc = "control register 0"] pub mod ctl0; -#[doc = "control register 1"] -pub struct CTL1 { - register: ::vcell::VolatileCell, -} +#[doc = "control register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl1](ctl1) module"] +pub type CTL1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL1; +#[doc = "`read()` method returns [ctl1::R](ctl1::R) reader structure"] +impl crate::Readable for CTL1 {} +#[doc = "`write(|w| ..)` method takes [ctl1::W](ctl1::W) writer structure"] +impl crate::Writable for CTL1 {} #[doc = "control register 1"] pub mod ctl1; -#[doc = "Sample time register 0"] -pub struct SAMPT0 { - register: ::vcell::VolatileCell, -} +#[doc = "Sample time register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sampt0](sampt0) module"] +pub type SAMPT0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _SAMPT0; +#[doc = "`read()` method returns [sampt0::R](sampt0::R) reader structure"] +impl crate::Readable for SAMPT0 {} +#[doc = "`write(|w| ..)` method takes [sampt0::W](sampt0::W) writer structure"] +impl crate::Writable for SAMPT0 {} #[doc = "Sample time register 0"] pub mod sampt0; -#[doc = "Sample time register 1"] -pub struct SAMPT1 { - register: ::vcell::VolatileCell, -} +#[doc = "Sample time register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sampt1](sampt1) module"] +pub type SAMPT1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _SAMPT1; +#[doc = "`read()` method returns [sampt1::R](sampt1::R) reader structure"] +impl crate::Readable for SAMPT1 {} +#[doc = "`write(|w| ..)` method takes [sampt1::W](sampt1::W) writer structure"] +impl crate::Writable for SAMPT1 {} #[doc = "Sample time register 1"] pub mod sampt1; -#[doc = "Inserted channel data offset register 0"] -pub struct IOFF0 { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted channel data offset register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ioff0](ioff0) module"] +pub type IOFF0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _IOFF0; +#[doc = "`read()` method returns [ioff0::R](ioff0::R) reader structure"] +impl crate::Readable for IOFF0 {} +#[doc = "`write(|w| ..)` method takes [ioff0::W](ioff0::W) writer structure"] +impl crate::Writable for IOFF0 {} #[doc = "Inserted channel data offset register 0"] pub mod ioff0; -#[doc = "Inserted channel data offset register 1"] -pub struct IOFF1 { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted channel data offset register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ioff1](ioff1) module"] +pub type IOFF1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _IOFF1; +#[doc = "`read()` method returns [ioff1::R](ioff1::R) reader structure"] +impl crate::Readable for IOFF1 {} +#[doc = "`write(|w| ..)` method takes [ioff1::W](ioff1::W) writer structure"] +impl crate::Writable for IOFF1 {} #[doc = "Inserted channel data offset register 1"] pub mod ioff1; -#[doc = "Inserted channel data offset register 2"] -pub struct IOFF2 { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted channel data offset register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ioff2](ioff2) module"] +pub type IOFF2 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _IOFF2; +#[doc = "`read()` method returns [ioff2::R](ioff2::R) reader structure"] +impl crate::Readable for IOFF2 {} +#[doc = "`write(|w| ..)` method takes [ioff2::W](ioff2::W) writer structure"] +impl crate::Writable for IOFF2 {} #[doc = "Inserted channel data offset register 2"] pub mod ioff2; -#[doc = "Inserted channel data offset register 3"] -pub struct IOFF3 { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted channel data offset register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ioff3](ioff3) module"] +pub type IOFF3 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _IOFF3; +#[doc = "`read()` method returns [ioff3::R](ioff3::R) reader structure"] +impl crate::Readable for IOFF3 {} +#[doc = "`write(|w| ..)` method takes [ioff3::W](ioff3::W) writer structure"] +impl crate::Writable for IOFF3 {} #[doc = "Inserted channel data offset register 3"] pub mod ioff3; -#[doc = "watchdog higher threshold register"] -pub struct WDHT { - register: ::vcell::VolatileCell, -} +#[doc = "watchdog higher threshold register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [wdht](wdht) module"] +pub type WDHT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _WDHT; +#[doc = "`read()` method returns [wdht::R](wdht::R) reader structure"] +impl crate::Readable for WDHT {} +#[doc = "`write(|w| ..)` method takes [wdht::W](wdht::W) writer structure"] +impl crate::Writable for WDHT {} #[doc = "watchdog higher threshold register"] pub mod wdht; -#[doc = "watchdog lower threshold register"] -pub struct WDLT { - register: ::vcell::VolatileCell, -} +#[doc = "watchdog lower threshold register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [wdlt](wdlt) module"] +pub type WDLT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _WDLT; +#[doc = "`read()` method returns [wdlt::R](wdlt::R) reader structure"] +impl crate::Readable for WDLT {} +#[doc = "`write(|w| ..)` method takes [wdlt::W](wdlt::W) writer structure"] +impl crate::Writable for WDLT {} #[doc = "watchdog lower threshold register"] pub mod wdlt; -#[doc = "regular sequence register 0"] -pub struct RSQ0 { - register: ::vcell::VolatileCell, -} +#[doc = "regular sequence register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rsq0](rsq0) module"] +pub type RSQ0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RSQ0; +#[doc = "`read()` method returns [rsq0::R](rsq0::R) reader structure"] +impl crate::Readable for RSQ0 {} +#[doc = "`write(|w| ..)` method takes [rsq0::W](rsq0::W) writer structure"] +impl crate::Writable for RSQ0 {} #[doc = "regular sequence register 0"] pub mod rsq0; -#[doc = "regular sequence register 1"] -pub struct RSQ1 { - register: ::vcell::VolatileCell, -} +#[doc = "regular sequence register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rsq1](rsq1) module"] +pub type RSQ1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RSQ1; +#[doc = "`read()` method returns [rsq1::R](rsq1::R) reader structure"] +impl crate::Readable for RSQ1 {} +#[doc = "`write(|w| ..)` method takes [rsq1::W](rsq1::W) writer structure"] +impl crate::Writable for RSQ1 {} #[doc = "regular sequence register 1"] pub mod rsq1; -#[doc = "regular sequence register 2"] -pub struct RSQ2 { - register: ::vcell::VolatileCell, -} +#[doc = "regular sequence register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rsq2](rsq2) module"] +pub type RSQ2 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RSQ2; +#[doc = "`read()` method returns [rsq2::R](rsq2::R) reader structure"] +impl crate::Readable for RSQ2 {} +#[doc = "`write(|w| ..)` method takes [rsq2::W](rsq2::W) writer structure"] +impl crate::Writable for RSQ2 {} #[doc = "regular sequence register 2"] pub mod rsq2; -#[doc = "Inserted sequence register"] -pub struct ISQ { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted sequence register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [isq](isq) module"] +pub type ISQ = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _ISQ; +#[doc = "`read()` method returns [isq::R](isq::R) reader structure"] +impl crate::Readable for ISQ {} +#[doc = "`write(|w| ..)` method takes [isq::W](isq::W) writer structure"] +impl crate::Writable for ISQ {} #[doc = "Inserted sequence register"] pub mod isq; -#[doc = "Inserted data register 0"] -pub struct IDATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted data register 0\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [idata0](idata0) module"] +pub type IDATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _IDATA0; +#[doc = "`read()` method returns [idata0::R](idata0::R) reader structure"] +impl crate::Readable for IDATA0 {} #[doc = "Inserted data register 0"] pub mod idata0; -#[doc = "Inserted data register 1"] -pub struct IDATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted data register 1\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [idata1](idata1) module"] +pub type IDATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _IDATA1; +#[doc = "`read()` method returns [idata1::R](idata1::R) reader structure"] +impl crate::Readable for IDATA1 {} #[doc = "Inserted data register 1"] pub mod idata1; -#[doc = "Inserted data register 2"] -pub struct IDATA2 { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted data register 2\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [idata2](idata2) module"] +pub type IDATA2 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _IDATA2; +#[doc = "`read()` method returns [idata2::R](idata2::R) reader structure"] +impl crate::Readable for IDATA2 {} #[doc = "Inserted data register 2"] pub mod idata2; -#[doc = "Inserted data register 3"] -pub struct IDATA3 { - register: ::vcell::VolatileCell, -} +#[doc = "Inserted data register 3\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [idata3](idata3) module"] +pub type IDATA3 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _IDATA3; +#[doc = "`read()` method returns [idata3::R](idata3::R) reader structure"] +impl crate::Readable for IDATA3 {} #[doc = "Inserted data register 3"] pub mod idata3; -#[doc = "regular data register"] -pub struct RDATA { - register: ::vcell::VolatileCell, -} +#[doc = "regular data register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rdata](rdata) module"] +pub type RDATA = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RDATA; +#[doc = "`read()` method returns [rdata::R](rdata::R) reader structure"] +impl crate::Readable for RDATA {} #[doc = "regular data register"] pub mod rdata; diff --git a/src/adc1/ctl0.rs b/src/adc1/ctl0.rs index 85efa363dc8ac1164b0748bd3513fb9e93ab50bb..b484ae2975b4bd9b31002906667ca806866c0a77 100644 --- a/src/adc1/ctl0.rs +++ b/src/adc1/ctl0.rs @@ -1,736 +1,404 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RWDENR { - bits: bool, -} -impl RWDENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IWDENR { - bits: bool, -} -impl IWDENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DISNUMR { - bits: u8, -} -impl DISNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DISICR { - bits: bool, -} -impl DISICR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DISRCR { - bits: bool, -} -impl DISRCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ICAR { - bits: bool, -} -impl ICAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WDSCR { - bits: bool, -} -impl WDSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SMR { - bits: bool, -} -impl SMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EOICIER { - bits: bool, -} -impl EOICIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WDEIER { - bits: bool, -} -impl WDEIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EOCIER { - bits: bool, -} -impl EOCIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WDCHSELR { - bits: u8, -} -impl WDCHSELR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _RWDENW<'a> { +#[doc = "Reader of register CTL0"] +pub type R = crate::R; +#[doc = "Writer for register CTL0"] +pub type W = crate::W; +#[doc = "Register CTL0 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `RWDEN`"] +pub type RWDEN_R = crate::R; +#[doc = "Write proxy for field `RWDEN`"] +pub struct RWDEN_W<'a> { w: &'a mut W, } -impl<'a> _RWDENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RWDEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _IWDENW<'a> { +#[doc = "Reader of field `IWDEN`"] +pub type IWDEN_R = crate::R; +#[doc = "Write proxy for field `IWDEN`"] +pub struct IWDEN_W<'a> { w: &'a mut W, } -impl<'a> _IWDENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IWDEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _DISNUMW<'a> { +#[doc = "Reader of field `DISNUM`"] +pub type DISNUM_R = crate::R; +#[doc = "Write proxy for field `DISNUM`"] +pub struct DISNUM_W<'a> { w: &'a mut W, } -impl<'a> _DISNUMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DISNUM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 13)) | (((value as u32) & 0x07) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _DISICW<'a> { +#[doc = "Reader of field `DISIC`"] +pub type DISIC_R = crate::R; +#[doc = "Write proxy for field `DISIC`"] +pub struct DISIC_W<'a> { w: &'a mut W, } -impl<'a> _DISICW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DISIC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _DISRCW<'a> { +#[doc = "Reader of field `DISRC`"] +pub type DISRC_R = crate::R; +#[doc = "Write proxy for field `DISRC`"] +pub struct DISRC_W<'a> { w: &'a mut W, } -impl<'a> _DISRCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DISRC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _ICAW<'a> { +#[doc = "Reader of field `ICA`"] +pub type ICA_R = crate::R; +#[doc = "Write proxy for field `ICA`"] +pub struct ICA_W<'a> { w: &'a mut W, } -impl<'a> _ICAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ICA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _WDSCW<'a> { +#[doc = "Reader of field `WDSC`"] +pub type WDSC_R = crate::R; +#[doc = "Write proxy for field `WDSC`"] +pub struct WDSC_W<'a> { w: &'a mut W, } -impl<'a> _WDSCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WDSC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _SMW<'a> { +#[doc = "Reader of field `SM`"] +pub type SM_R = crate::R; +#[doc = "Write proxy for field `SM`"] +pub struct SM_W<'a> { w: &'a mut W, } -impl<'a> _SMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _EOICIEW<'a> { +#[doc = "Reader of field `EOICIE`"] +pub type EOICIE_R = crate::R; +#[doc = "Write proxy for field `EOICIE`"] +pub struct EOICIE_W<'a> { w: &'a mut W, } -impl<'a> _EOICIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EOICIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _WDEIEW<'a> { +#[doc = "Reader of field `WDEIE`"] +pub type WDEIE_R = crate::R; +#[doc = "Write proxy for field `WDEIE`"] +pub struct WDEIE_W<'a> { w: &'a mut W, } -impl<'a> _WDEIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WDEIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _EOCIEW<'a> { +#[doc = "Reader of field `EOCIE`"] +pub type EOCIE_R = crate::R; +#[doc = "Write proxy for field `EOCIE`"] +pub struct EOCIE_W<'a> { w: &'a mut W, } -impl<'a> _EOCIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EOCIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _WDCHSELW<'a> { +#[doc = "Reader of field `WDCHSEL`"] +pub type WDCHSEL_R = crate::R; +#[doc = "Write proxy for field `WDCHSEL`"] +pub struct WDCHSEL_W<'a> { w: &'a mut W, } -impl<'a> _WDCHSELW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> WDCHSEL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x1f) | ((value as u32) & 0x1f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 23 - Regular channel analog watchdog enable"] - #[inline] - pub fn rwden(&self) -> RWDENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RWDENR { bits } + #[inline(always)] + pub fn rwden(&self) -> RWDEN_R { + RWDEN_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 22 - Inserted channel analog watchdog enable"] - #[inline] - pub fn iwden(&self) -> IWDENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IWDENR { bits } + #[inline(always)] + pub fn iwden(&self) -> IWDEN_R { + IWDEN_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bits 13:15 - Number of conversions in discontinuous mode"] - #[inline] - pub fn disnum(&self) -> DISNUMR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DISNUMR { bits } + #[inline(always)] + pub fn disnum(&self) -> DISNUM_R { + DISNUM_R::new(((self.bits >> 13) & 0x07) as u8) } #[doc = "Bit 12 - Discontinuous mode on inserted channels"] - #[inline] - pub fn disic(&self) -> DISICR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DISICR { bits } + #[inline(always)] + pub fn disic(&self) -> DISIC_R { + DISIC_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Discontinuous mode on regular channels"] - #[inline] - pub fn disrc(&self) -> DISRCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DISRCR { bits } + #[inline(always)] + pub fn disrc(&self) -> DISRC_R { + DISRC_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Inserted channel group convert automatically"] - #[inline] - pub fn ica(&self) -> ICAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ICAR { bits } + #[inline(always)] + pub fn ica(&self) -> ICA_R { + ICA_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - When in scan mode, analog watchdog is effective on a single channel"] - #[inline] - pub fn wdsc(&self) -> WDSCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WDSCR { bits } + #[inline(always)] + pub fn wdsc(&self) -> WDSC_R { + WDSC_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Scan mode"] - #[inline] - pub fn sm(&self) -> SMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SMR { bits } + #[inline(always)] + pub fn sm(&self) -> SM_R { + SM_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - Interrupt enable for EOIC"] - #[inline] - pub fn eoicie(&self) -> EOICIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOICIER { bits } + #[inline(always)] + pub fn eoicie(&self) -> EOICIE_R { + EOICIE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Interrupt enable for WDE"] - #[inline] - pub fn wdeie(&self) -> WDEIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WDEIER { bits } + #[inline(always)] + pub fn wdeie(&self) -> WDEIE_R { + WDEIE_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Interrupt enable for EOC"] - #[inline] - pub fn eocie(&self) -> EOCIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOCIER { bits } + #[inline(always)] + pub fn eocie(&self) -> EOCIE_R { + EOCIE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bits 0:4 - Analog watchdog channel select"] - #[inline] - pub fn wdchsel(&self) -> WDCHSELR { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - WDCHSELR { bits } + #[inline(always)] + pub fn wdchsel(&self) -> WDCHSEL_R { + WDCHSEL_R::new((self.bits & 0x1f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 23 - Regular channel analog watchdog enable"] - #[inline] - pub fn rwden(&mut self) -> _RWDENW { - _RWDENW { w: self } + #[inline(always)] + pub fn rwden(&mut self) -> RWDEN_W { + RWDEN_W { w: self } } #[doc = "Bit 22 - Inserted channel analog watchdog enable"] - #[inline] - pub fn iwden(&mut self) -> _IWDENW { - _IWDENW { w: self } + #[inline(always)] + pub fn iwden(&mut self) -> IWDEN_W { + IWDEN_W { w: self } } #[doc = "Bits 13:15 - Number of conversions in discontinuous mode"] - #[inline] - pub fn disnum(&mut self) -> _DISNUMW { - _DISNUMW { w: self } + #[inline(always)] + pub fn disnum(&mut self) -> DISNUM_W { + DISNUM_W { w: self } } #[doc = "Bit 12 - Discontinuous mode on inserted channels"] - #[inline] - pub fn disic(&mut self) -> _DISICW { - _DISICW { w: self } + #[inline(always)] + pub fn disic(&mut self) -> DISIC_W { + DISIC_W { w: self } } #[doc = "Bit 11 - Discontinuous mode on regular channels"] - #[inline] - pub fn disrc(&mut self) -> _DISRCW { - _DISRCW { w: self } + #[inline(always)] + pub fn disrc(&mut self) -> DISRC_W { + DISRC_W { w: self } } #[doc = "Bit 10 - Inserted channel group convert automatically"] - #[inline] - pub fn ica(&mut self) -> _ICAW { - _ICAW { w: self } + #[inline(always)] + pub fn ica(&mut self) -> ICA_W { + ICA_W { w: self } } #[doc = "Bit 9 - When in scan mode, analog watchdog is effective on a single channel"] - #[inline] - pub fn wdsc(&mut self) -> _WDSCW { - _WDSCW { w: self } + #[inline(always)] + pub fn wdsc(&mut self) -> WDSC_W { + WDSC_W { w: self } } #[doc = "Bit 8 - Scan mode"] - #[inline] - pub fn sm(&mut self) -> _SMW { - _SMW { w: self } + #[inline(always)] + pub fn sm(&mut self) -> SM_W { + SM_W { w: self } } #[doc = "Bit 7 - Interrupt enable for EOIC"] - #[inline] - pub fn eoicie(&mut self) -> _EOICIEW { - _EOICIEW { w: self } + #[inline(always)] + pub fn eoicie(&mut self) -> EOICIE_W { + EOICIE_W { w: self } } #[doc = "Bit 6 - Interrupt enable for WDE"] - #[inline] - pub fn wdeie(&mut self) -> _WDEIEW { - _WDEIEW { w: self } + #[inline(always)] + pub fn wdeie(&mut self) -> WDEIE_W { + WDEIE_W { w: self } } #[doc = "Bit 5 - Interrupt enable for EOC"] - #[inline] - pub fn eocie(&mut self) -> _EOCIEW { - _EOCIEW { w: self } + #[inline(always)] + pub fn eocie(&mut self) -> EOCIE_W { + EOCIE_W { w: self } } #[doc = "Bits 0:4 - Analog watchdog channel select"] - #[inline] - pub fn wdchsel(&mut self) -> _WDCHSELW { - _WDCHSELW { w: self } + #[inline(always)] + pub fn wdchsel(&mut self) -> WDCHSEL_W { + WDCHSEL_W { w: self } } } diff --git a/src/adc1/ctl1.rs b/src/adc1/ctl1.rs index 40eb2f980691ab54a0b61b6ef7ffecf846dd9b4d..f08225ecaa6275c34392042eb9db7e4b6296977d 100644 --- a/src/adc1/ctl1.rs +++ b/src/adc1/ctl1.rs @@ -1,736 +1,404 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SWRCSTR { - bits: bool, -} -impl SWRCSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWICSTR { - bits: bool, -} -impl SWICSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ETERCR { - bits: bool, -} -impl ETERCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ETSRCR { - bits: u8, -} -impl ETSRCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ETEICR { - bits: bool, -} -impl ETEICR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ETSICR { - bits: u8, -} -impl ETSICR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DALR { - bits: bool, -} -impl DALR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DMAR { - bits: bool, -} -impl DMAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RSTCLBR { - bits: bool, -} -impl RSTCLBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CLBR { - bits: bool, -} -impl CLBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CTNR { - bits: bool, -} -impl CTNR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ADCONR { - bits: bool, -} -impl ADCONR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _SWRCSTW<'a> { +#[doc = "Reader of register CTL1"] +pub type R = crate::R; +#[doc = "Writer for register CTL1"] +pub type W = crate::W; +#[doc = "Register CTL1 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `SWRCST`"] +pub type SWRCST_R = crate::R; +#[doc = "Write proxy for field `SWRCST`"] +pub struct SWRCST_W<'a> { w: &'a mut W, } -impl<'a> _SWRCSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWRCST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _SWICSTW<'a> { +#[doc = "Reader of field `SWICST`"] +pub type SWICST_R = crate::R; +#[doc = "Write proxy for field `SWICST`"] +pub struct SWICST_W<'a> { w: &'a mut W, } -impl<'a> _SWICSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWICST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _ETERCW<'a> { +#[doc = "Reader of field `ETERC`"] +pub type ETERC_R = crate::R; +#[doc = "Write proxy for field `ETERC`"] +pub struct ETERC_W<'a> { w: &'a mut W, } -impl<'a> _ETERCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ETERC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _ETSRCW<'a> { +#[doc = "Reader of field `ETSRC`"] +pub type ETSRC_R = crate::R; +#[doc = "Write proxy for field `ETSRC`"] +pub struct ETSRC_W<'a> { w: &'a mut W, } -impl<'a> _ETSRCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ETSRC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 17)) | (((value as u32) & 0x07) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _ETEICW<'a> { +#[doc = "Reader of field `ETEIC`"] +pub type ETEIC_R = crate::R; +#[doc = "Write proxy for field `ETEIC`"] +pub struct ETEIC_W<'a> { w: &'a mut W, } -impl<'a> _ETEICW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ETEIC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _ETSICW<'a> { +#[doc = "Reader of field `ETSIC`"] +pub type ETSIC_R = crate::R; +#[doc = "Write proxy for field `ETSIC`"] +pub struct ETSIC_W<'a> { w: &'a mut W, } -impl<'a> _ETSICW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ETSIC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 12)) | (((value as u32) & 0x07) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _DALW<'a> { +#[doc = "Reader of field `DAL`"] +pub type DAL_R = crate::R; +#[doc = "Write proxy for field `DAL`"] +pub struct DAL_W<'a> { w: &'a mut W, } -impl<'a> _DALW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DAL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _DMAW<'a> { +#[doc = "Reader of field `DMA`"] +pub type DMA_R = crate::R; +#[doc = "Write proxy for field `DMA`"] +pub struct DMA_W<'a> { w: &'a mut W, } -impl<'a> _DMAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DMA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _RSTCLBW<'a> { +#[doc = "Reader of field `RSTCLB`"] +pub type RSTCLB_R = crate::R; +#[doc = "Write proxy for field `RSTCLB`"] +pub struct RSTCLB_W<'a> { w: &'a mut W, } -impl<'a> _RSTCLBW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RSTCLB_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _CLBW<'a> { +#[doc = "Reader of field `CLB`"] +pub type CLB_R = crate::R; +#[doc = "Write proxy for field `CLB`"] +pub struct CLB_W<'a> { w: &'a mut W, } -impl<'a> _CLBW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CLB_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CTNW<'a> { +#[doc = "Reader of field `CTN`"] +pub type CTN_R = crate::R; +#[doc = "Write proxy for field `CTN`"] +pub struct CTN_W<'a> { w: &'a mut W, } -impl<'a> _CTNW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CTN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _ADCONW<'a> { +#[doc = "Reader of field `ADCON`"] +pub type ADCON_R = crate::R; +#[doc = "Write proxy for field `ADCON`"] +pub struct ADCON_W<'a> { w: &'a mut W, } -impl<'a> _ADCONW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ADCON_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 22 - Start on regular channel"] - #[inline] - pub fn swrcst(&self) -> SWRCSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWRCSTR { bits } + #[inline(always)] + pub fn swrcst(&self) -> SWRCST_R { + SWRCST_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 21 - Start on inserted channel"] - #[inline] - pub fn swicst(&self) -> SWICSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWICSTR { bits } + #[inline(always)] + pub fn swicst(&self) -> SWICST_R { + SWICST_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 20 - External trigger enable for regular channel"] - #[inline] - pub fn eterc(&self) -> ETERCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ETERCR { bits } + #[inline(always)] + pub fn eterc(&self) -> ETERC_R { + ETERC_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bits 17:19 - External trigger select for regular channel"] - #[inline] - pub fn etsrc(&self) -> ETSRCR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ETSRCR { bits } + #[inline(always)] + pub fn etsrc(&self) -> ETSRC_R { + ETSRC_R::new(((self.bits >> 17) & 0x07) as u8) } #[doc = "Bit 15 - External trigger enable for inserted channel"] - #[inline] - pub fn eteic(&self) -> ETEICR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ETEICR { bits } + #[inline(always)] + pub fn eteic(&self) -> ETEIC_R { + ETEIC_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bits 12:14 - External trigger select for inserted channel"] - #[inline] - pub fn etsic(&self) -> ETSICR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ETSICR { bits } + #[inline(always)] + pub fn etsic(&self) -> ETSIC_R { + ETSIC_R::new(((self.bits >> 12) & 0x07) as u8) } #[doc = "Bit 11 - Data alignment"] - #[inline] - pub fn dal(&self) -> DALR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DALR { bits } + #[inline(always)] + pub fn dal(&self) -> DAL_R { + DAL_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 8 - DMA request enable"] - #[inline] - pub fn dma(&self) -> DMAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DMAR { bits } + #[inline(always)] + pub fn dma(&self) -> DMA_R { + DMA_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 3 - Reset calibration"] - #[inline] - pub fn rstclb(&self) -> RSTCLBR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RSTCLBR { bits } + #[inline(always)] + pub fn rstclb(&self) -> RSTCLB_R { + RSTCLB_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - ADC calibration"] - #[inline] - pub fn clb(&self) -> CLBR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CLBR { bits } + #[inline(always)] + pub fn clb(&self) -> CLB_R { + CLB_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Continuous mode"] - #[inline] - pub fn ctn(&self) -> CTNR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CTNR { bits } + #[inline(always)] + pub fn ctn(&self) -> CTN_R { + CTN_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - ADC on"] - #[inline] - pub fn adcon(&self) -> ADCONR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ADCONR { bits } + #[inline(always)] + pub fn adcon(&self) -> ADCON_R { + ADCON_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 22 - Start on regular channel"] - #[inline] - pub fn swrcst(&mut self) -> _SWRCSTW { - _SWRCSTW { w: self } + #[inline(always)] + pub fn swrcst(&mut self) -> SWRCST_W { + SWRCST_W { w: self } } #[doc = "Bit 21 - Start on inserted channel"] - #[inline] - pub fn swicst(&mut self) -> _SWICSTW { - _SWICSTW { w: self } + #[inline(always)] + pub fn swicst(&mut self) -> SWICST_W { + SWICST_W { w: self } } #[doc = "Bit 20 - External trigger enable for regular channel"] - #[inline] - pub fn eterc(&mut self) -> _ETERCW { - _ETERCW { w: self } + #[inline(always)] + pub fn eterc(&mut self) -> ETERC_W { + ETERC_W { w: self } } #[doc = "Bits 17:19 - External trigger select for regular channel"] - #[inline] - pub fn etsrc(&mut self) -> _ETSRCW { - _ETSRCW { w: self } + #[inline(always)] + pub fn etsrc(&mut self) -> ETSRC_W { + ETSRC_W { w: self } } #[doc = "Bit 15 - External trigger enable for inserted channel"] - #[inline] - pub fn eteic(&mut self) -> _ETEICW { - _ETEICW { w: self } + #[inline(always)] + pub fn eteic(&mut self) -> ETEIC_W { + ETEIC_W { w: self } } #[doc = "Bits 12:14 - External trigger select for inserted channel"] - #[inline] - pub fn etsic(&mut self) -> _ETSICW { - _ETSICW { w: self } + #[inline(always)] + pub fn etsic(&mut self) -> ETSIC_W { + ETSIC_W { w: self } } #[doc = "Bit 11 - Data alignment"] - #[inline] - pub fn dal(&mut self) -> _DALW { - _DALW { w: self } + #[inline(always)] + pub fn dal(&mut self) -> DAL_W { + DAL_W { w: self } } #[doc = "Bit 8 - DMA request enable"] - #[inline] - pub fn dma(&mut self) -> _DMAW { - _DMAW { w: self } + #[inline(always)] + pub fn dma(&mut self) -> DMA_W { + DMA_W { w: self } } #[doc = "Bit 3 - Reset calibration"] - #[inline] - pub fn rstclb(&mut self) -> _RSTCLBW { - _RSTCLBW { w: self } + #[inline(always)] + pub fn rstclb(&mut self) -> RSTCLB_W { + RSTCLB_W { w: self } } #[doc = "Bit 2 - ADC calibration"] - #[inline] - pub fn clb(&mut self) -> _CLBW { - _CLBW { w: self } + #[inline(always)] + pub fn clb(&mut self) -> CLB_W { + CLB_W { w: self } } #[doc = "Bit 1 - Continuous mode"] - #[inline] - pub fn ctn(&mut self) -> _CTNW { - _CTNW { w: self } + #[inline(always)] + pub fn ctn(&mut self) -> CTN_W { + CTN_W { w: self } } #[doc = "Bit 0 - ADC on"] - #[inline] - pub fn adcon(&mut self) -> _ADCONW { - _ADCONW { w: self } + #[inline(always)] + pub fn adcon(&mut self) -> ADCON_W { + ADCON_W { w: self } } } diff --git a/src/adc1/idata0.rs b/src/adc1/idata0.rs index 20c8125baa1f46227f5b84d50369c979afca1504..ed00b3ffa14d44805e2303f0ff764b205f8e62cb 100644 --- a/src/adc1/idata0.rs +++ b/src/adc1/idata0.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::IDATA0 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct IDATANR { - bits: u16, -} -impl IDATANR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register IDATA0"] +pub type R = crate::R; +#[doc = "Reader of field `IDATAn`"] +pub type IDATAN_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Inserted number n conversion data"] - #[inline] - pub fn idatan(&self) -> IDATANR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IDATANR { bits } + #[inline(always)] + pub fn idatan(&self) -> IDATAN_R { + IDATAN_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/adc1/idata1.rs b/src/adc1/idata1.rs index c5f04f33c851964b18e3fffcd8fc6c0b8df31f00..9abec9e43af738a6a00550dc7d4d0f823d77156b 100644 --- a/src/adc1/idata1.rs +++ b/src/adc1/idata1.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::IDATA1 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct IDATANR { - bits: u16, -} -impl IDATANR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register IDATA1"] +pub type R = crate::R; +#[doc = "Reader of field `IDATAn`"] +pub type IDATAN_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Inserted number n conversion data"] - #[inline] - pub fn idatan(&self) -> IDATANR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IDATANR { bits } + #[inline(always)] + pub fn idatan(&self) -> IDATAN_R { + IDATAN_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/adc1/idata2.rs b/src/adc1/idata2.rs index 3501a85ec0882f2fdb681c4769c53ff56a413275..d38223fbe7a375ed359a0a1a265f0c50cbebbb30 100644 --- a/src/adc1/idata2.rs +++ b/src/adc1/idata2.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::IDATA2 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct IDATANR { - bits: u16, -} -impl IDATANR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register IDATA2"] +pub type R = crate::R; +#[doc = "Reader of field `IDATAn`"] +pub type IDATAN_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Inserted number n conversion data"] - #[inline] - pub fn idatan(&self) -> IDATANR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IDATANR { bits } + #[inline(always)] + pub fn idatan(&self) -> IDATAN_R { + IDATAN_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/adc1/idata3.rs b/src/adc1/idata3.rs index 4fcc31c2a91605571cf6feddb924fc0b8c8c7989..42ae14668cb81e28d37d5c730128d9aef5f8e94c 100644 --- a/src/adc1/idata3.rs +++ b/src/adc1/idata3.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::IDATA3 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct IDATANR { - bits: u16, -} -impl IDATANR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register IDATA3"] +pub type R = crate::R; +#[doc = "Reader of field `IDATAn`"] +pub type IDATAN_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Inserted number n conversion data"] - #[inline] - pub fn idatan(&self) -> IDATANR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IDATANR { bits } + #[inline(always)] + pub fn idatan(&self) -> IDATAN_R { + IDATAN_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/adc1/ioff0.rs b/src/adc1/ioff0.rs index a5917bfd9e47b2e52f5ebcebfa6aa6a4e746834c..d051e3aa0985a41bd074ac30fe5fd5f97b4c81fc 100644 --- a/src/adc1/ioff0.rs +++ b/src/adc1/ioff0.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::IOFF0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IOFFR { - bits: u16, -} -impl IOFFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _IOFFW<'a> { +#[doc = "Reader of register IOFF0"] +pub type R = crate::R; +#[doc = "Writer for register IOFF0"] +pub type W = crate::W; +#[doc = "Register IOFF0 `reset()`'s with value 0"] +impl crate::ResetValue for super::IOFF0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `IOFF`"] +pub type IOFF_R = crate::R; +#[doc = "Write proxy for field `IOFF`"] +pub struct IOFF_W<'a> { w: &'a mut W, } -impl<'a> _IOFFW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IOFF_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - Data offset for inserted channel 0"] - #[inline] - pub fn ioff(&self) -> IOFFR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IOFFR { bits } + #[inline(always)] + pub fn ioff(&self) -> IOFF_R { + IOFF_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - Data offset for inserted channel 0"] - #[inline] - pub fn ioff(&mut self) -> _IOFFW { - _IOFFW { w: self } + #[inline(always)] + pub fn ioff(&mut self) -> IOFF_W { + IOFF_W { w: self } } } diff --git a/src/adc1/ioff1.rs b/src/adc1/ioff1.rs index e7278eb152d5e6c3c45d9a769e110022bf89898c..e38a9803c81afdc117b6a1e554b897aba66feb8d 100644 --- a/src/adc1/ioff1.rs +++ b/src/adc1/ioff1.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::IOFF1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IOFFR { - bits: u16, -} -impl IOFFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _IOFFW<'a> { +#[doc = "Reader of register IOFF1"] +pub type R = crate::R; +#[doc = "Writer for register IOFF1"] +pub type W = crate::W; +#[doc = "Register IOFF1 `reset()`'s with value 0"] +impl crate::ResetValue for super::IOFF1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `IOFF`"] +pub type IOFF_R = crate::R; +#[doc = "Write proxy for field `IOFF`"] +pub struct IOFF_W<'a> { w: &'a mut W, } -impl<'a> _IOFFW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IOFF_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - Data offset for inserted channel 1"] - #[inline] - pub fn ioff(&self) -> IOFFR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IOFFR { bits } + #[inline(always)] + pub fn ioff(&self) -> IOFF_R { + IOFF_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - Data offset for inserted channel 1"] - #[inline] - pub fn ioff(&mut self) -> _IOFFW { - _IOFFW { w: self } + #[inline(always)] + pub fn ioff(&mut self) -> IOFF_W { + IOFF_W { w: self } } } diff --git a/src/adc1/ioff2.rs b/src/adc1/ioff2.rs index 1a114095a638cb25951b12b05bce31010ea69cf7..308c8e18f72e12e0d4a09d3347de001ea1dc5dd7 100644 --- a/src/adc1/ioff2.rs +++ b/src/adc1/ioff2.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::IOFF2 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IOFFR { - bits: u16, -} -impl IOFFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _IOFFW<'a> { +#[doc = "Reader of register IOFF2"] +pub type R = crate::R; +#[doc = "Writer for register IOFF2"] +pub type W = crate::W; +#[doc = "Register IOFF2 `reset()`'s with value 0"] +impl crate::ResetValue for super::IOFF2 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `IOFF`"] +pub type IOFF_R = crate::R; +#[doc = "Write proxy for field `IOFF`"] +pub struct IOFF_W<'a> { w: &'a mut W, } -impl<'a> _IOFFW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IOFF_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - Data offset for inserted channel 2"] - #[inline] - pub fn ioff(&self) -> IOFFR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IOFFR { bits } + #[inline(always)] + pub fn ioff(&self) -> IOFF_R { + IOFF_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - Data offset for inserted channel 2"] - #[inline] - pub fn ioff(&mut self) -> _IOFFW { - _IOFFW { w: self } + #[inline(always)] + pub fn ioff(&mut self) -> IOFF_W { + IOFF_W { w: self } } } diff --git a/src/adc1/ioff3.rs b/src/adc1/ioff3.rs index fe998c0bcdbc87ad0811121c79d686b41c096459..70c5453e4f8667d1580f7340b62762e9d22853d8 100644 --- a/src/adc1/ioff3.rs +++ b/src/adc1/ioff3.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::IOFF3 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IOFFR { - bits: u16, -} -impl IOFFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _IOFFW<'a> { +#[doc = "Reader of register IOFF3"] +pub type R = crate::R; +#[doc = "Writer for register IOFF3"] +pub type W = crate::W; +#[doc = "Register IOFF3 `reset()`'s with value 0"] +impl crate::ResetValue for super::IOFF3 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `IOFF`"] +pub type IOFF_R = crate::R; +#[doc = "Write proxy for field `IOFF`"] +pub struct IOFF_W<'a> { w: &'a mut W, } -impl<'a> _IOFFW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IOFF_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - Data offset for inserted channel 3"] - #[inline] - pub fn ioff(&self) -> IOFFR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IOFFR { bits } + #[inline(always)] + pub fn ioff(&self) -> IOFF_R { + IOFF_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - Data offset for inserted channel 3"] - #[inline] - pub fn ioff(&mut self) -> _IOFFW { - _IOFFW { w: self } + #[inline(always)] + pub fn ioff(&mut self) -> IOFF_W { + IOFF_W { w: self } } } diff --git a/src/adc1/isq.rs b/src/adc1/isq.rs index b35c616689f8e1ab420d74a89a56e35b41b5e753..6be658177d80d508e9c4071d299e41659a035395 100644 --- a/src/adc1/isq.rs +++ b/src/adc1/isq.rs @@ -1,269 +1,136 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::ISQ { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct ILR { - bits: u8, -} -impl ILR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ISQ3R { - bits: u8, -} -impl ISQ3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ISQ2R { - bits: u8, -} -impl ISQ2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ISQ1R { - bits: u8, -} -impl ISQ1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ISQ0R { - bits: u8, -} -impl ISQ0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _ILW<'a> { +#[doc = "Reader of register ISQ"] +pub type R = crate::R; +#[doc = "Writer for register ISQ"] +pub type W = crate::W; +#[doc = "Register ISQ `reset()`'s with value 0"] +impl crate::ResetValue for super::ISQ { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `IL`"] +pub type IL_R = crate::R; +#[doc = "Write proxy for field `IL`"] +pub struct IL_W<'a> { w: &'a mut W, } -impl<'a> _ILW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 20)) | (((value as u32) & 0x03) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _ISQ3W<'a> { +#[doc = "Reader of field `ISQ3`"] +pub type ISQ3_R = crate::R; +#[doc = "Write proxy for field `ISQ3`"] +pub struct ISQ3_W<'a> { w: &'a mut W, } -impl<'a> _ISQ3W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ISQ3_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 15)) | (((value as u32) & 0x1f) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _ISQ2W<'a> { +#[doc = "Reader of field `ISQ2`"] +pub type ISQ2_R = crate::R; +#[doc = "Write proxy for field `ISQ2`"] +pub struct ISQ2_W<'a> { w: &'a mut W, } -impl<'a> _ISQ2W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ISQ2_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 10)) | (((value as u32) & 0x1f) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _ISQ1W<'a> { +#[doc = "Reader of field `ISQ1`"] +pub type ISQ1_R = crate::R; +#[doc = "Write proxy for field `ISQ1`"] +pub struct ISQ1_W<'a> { w: &'a mut W, } -impl<'a> _ISQ1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ISQ1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 5)) | (((value as u32) & 0x1f) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _ISQ0W<'a> { +#[doc = "Reader of field `ISQ0`"] +pub type ISQ0_R = crate::R; +#[doc = "Write proxy for field `ISQ0`"] +pub struct ISQ0_W<'a> { w: &'a mut W, } -impl<'a> _ISQ0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ISQ0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x1f) | ((value as u32) & 0x1f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 20:21 - Inserted channel group length"] - #[inline] - pub fn il(&self) -> ILR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ILR { bits } + #[inline(always)] + pub fn il(&self) -> IL_R { + IL_R::new(((self.bits >> 20) & 0x03) as u8) } #[doc = "Bits 15:19 - 4th conversion in inserted sequence"] - #[inline] - pub fn isq3(&self) -> ISQ3R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ISQ3R { bits } + #[inline(always)] + pub fn isq3(&self) -> ISQ3_R { + ISQ3_R::new(((self.bits >> 15) & 0x1f) as u8) } #[doc = "Bits 10:14 - 3rd conversion in inserted sequence"] - #[inline] - pub fn isq2(&self) -> ISQ2R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ISQ2R { bits } + #[inline(always)] + pub fn isq2(&self) -> ISQ2_R { + ISQ2_R::new(((self.bits >> 10) & 0x1f) as u8) } #[doc = "Bits 5:9 - 2nd conversion in inserted sequence"] - #[inline] - pub fn isq1(&self) -> ISQ1R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ISQ1R { bits } + #[inline(always)] + pub fn isq1(&self) -> ISQ1_R { + ISQ1_R::new(((self.bits >> 5) & 0x1f) as u8) } #[doc = "Bits 0:4 - 1st conversion in inserted sequence"] - #[inline] - pub fn isq0(&self) -> ISQ0R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ISQ0R { bits } + #[inline(always)] + pub fn isq0(&self) -> ISQ0_R { + ISQ0_R::new((self.bits & 0x1f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 20:21 - Inserted channel group length"] - #[inline] - pub fn il(&mut self) -> _ILW { - _ILW { w: self } + #[inline(always)] + pub fn il(&mut self) -> IL_W { + IL_W { w: self } } #[doc = "Bits 15:19 - 4th conversion in inserted sequence"] - #[inline] - pub fn isq3(&mut self) -> _ISQ3W { - _ISQ3W { w: self } + #[inline(always)] + pub fn isq3(&mut self) -> ISQ3_W { + ISQ3_W { w: self } } #[doc = "Bits 10:14 - 3rd conversion in inserted sequence"] - #[inline] - pub fn isq2(&mut self) -> _ISQ2W { - _ISQ2W { w: self } + #[inline(always)] + pub fn isq2(&mut self) -> ISQ2_W { + ISQ2_W { w: self } } #[doc = "Bits 5:9 - 2nd conversion in inserted sequence"] - #[inline] - pub fn isq1(&mut self) -> _ISQ1W { - _ISQ1W { w: self } + #[inline(always)] + pub fn isq1(&mut self) -> ISQ1_W { + ISQ1_W { w: self } } #[doc = "Bits 0:4 - 1st conversion in inserted sequence"] - #[inline] - pub fn isq0(&mut self) -> _ISQ0W { - _ISQ0W { w: self } + #[inline(always)] + pub fn isq0(&mut self) -> ISQ0_W { + ISQ0_W { w: self } } } diff --git a/src/adc1/rdata.rs b/src/adc1/rdata.rs index a14cf36b0722070c567f56b0cf1532c261439b14..4fb26620cb473381ea1818c432b31ef67a7f66e9 100644 --- a/src/adc1/rdata.rs +++ b/src/adc1/rdata.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::RDATA { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct RDATAR { - bits: u16, -} -impl RDATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register RDATA"] +pub type R = crate::R; +#[doc = "Reader of field `RDATA`"] +pub type RDATA_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Regular channel data"] - #[inline] - pub fn rdata(&self) -> RDATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - RDATAR { bits } + #[inline(always)] + pub fn rdata(&self) -> RDATA_R { + RDATA_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/adc1/rsq0.rs b/src/adc1/rsq0.rs index 31db46bd9f313b10beab200db90a33873bdcb34c..0b4ea40289bb9d96f2730ad0bb8739b3c90a8c86 100644 --- a/src/adc1/rsq0.rs +++ b/src/adc1/rsq0.rs @@ -1,269 +1,136 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::RSQ0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RLR { - bits: u8, -} -impl RLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ15R { - bits: u8, -} -impl RSQ15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ14R { - bits: u8, -} -impl RSQ14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ13R { - bits: u8, -} -impl RSQ13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ12R { - bits: u8, -} -impl RSQ12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _RLW<'a> { +#[doc = "Reader of register RSQ0"] +pub type R = crate::R; +#[doc = "Writer for register RSQ0"] +pub type W = crate::W; +#[doc = "Register RSQ0 `reset()`'s with value 0"] +impl crate::ResetValue for super::RSQ0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `RL`"] +pub type RL_R = crate::R; +#[doc = "Write proxy for field `RL`"] +pub struct RL_W<'a> { w: &'a mut W, } -impl<'a> _RLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 20)) | (((value as u32) & 0x0f) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ15W<'a> { +#[doc = "Reader of field `RSQ15`"] +pub type RSQ15_R = crate::R; +#[doc = "Write proxy for field `RSQ15`"] +pub struct RSQ15_W<'a> { w: &'a mut W, } -impl<'a> _RSQ15W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ15_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 15)) | (((value as u32) & 0x1f) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ14W<'a> { +#[doc = "Reader of field `RSQ14`"] +pub type RSQ14_R = crate::R; +#[doc = "Write proxy for field `RSQ14`"] +pub struct RSQ14_W<'a> { w: &'a mut W, } -impl<'a> _RSQ14W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ14_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 10)) | (((value as u32) & 0x1f) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ13W<'a> { +#[doc = "Reader of field `RSQ13`"] +pub type RSQ13_R = crate::R; +#[doc = "Write proxy for field `RSQ13`"] +pub struct RSQ13_W<'a> { w: &'a mut W, } -impl<'a> _RSQ13W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ13_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 5)) | (((value as u32) & 0x1f) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ12W<'a> { +#[doc = "Reader of field `RSQ12`"] +pub type RSQ12_R = crate::R; +#[doc = "Write proxy for field `RSQ12`"] +pub struct RSQ12_W<'a> { w: &'a mut W, } -impl<'a> _RSQ12W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ12_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x1f) | ((value as u32) & 0x1f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 20:23 - Regular channel group length"] - #[inline] - pub fn rl(&self) -> RLR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RLR { bits } + #[inline(always)] + pub fn rl(&self) -> RL_R { + RL_R::new(((self.bits >> 20) & 0x0f) as u8) } #[doc = "Bits 15:19 - 16th conversion in regular sequence"] - #[inline] - pub fn rsq15(&self) -> RSQ15R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ15R { bits } + #[inline(always)] + pub fn rsq15(&self) -> RSQ15_R { + RSQ15_R::new(((self.bits >> 15) & 0x1f) as u8) } #[doc = "Bits 10:14 - 15th conversion in regular sequence"] - #[inline] - pub fn rsq14(&self) -> RSQ14R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ14R { bits } + #[inline(always)] + pub fn rsq14(&self) -> RSQ14_R { + RSQ14_R::new(((self.bits >> 10) & 0x1f) as u8) } #[doc = "Bits 5:9 - 14th conversion in regular sequence"] - #[inline] - pub fn rsq13(&self) -> RSQ13R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ13R { bits } + #[inline(always)] + pub fn rsq13(&self) -> RSQ13_R { + RSQ13_R::new(((self.bits >> 5) & 0x1f) as u8) } #[doc = "Bits 0:4 - 13th conversion in regular sequence"] - #[inline] - pub fn rsq12(&self) -> RSQ12R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ12R { bits } + #[inline(always)] + pub fn rsq12(&self) -> RSQ12_R { + RSQ12_R::new((self.bits & 0x1f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 20:23 - Regular channel group length"] - #[inline] - pub fn rl(&mut self) -> _RLW { - _RLW { w: self } + #[inline(always)] + pub fn rl(&mut self) -> RL_W { + RL_W { w: self } } #[doc = "Bits 15:19 - 16th conversion in regular sequence"] - #[inline] - pub fn rsq15(&mut self) -> _RSQ15W { - _RSQ15W { w: self } + #[inline(always)] + pub fn rsq15(&mut self) -> RSQ15_W { + RSQ15_W { w: self } } #[doc = "Bits 10:14 - 15th conversion in regular sequence"] - #[inline] - pub fn rsq14(&mut self) -> _RSQ14W { - _RSQ14W { w: self } + #[inline(always)] + pub fn rsq14(&mut self) -> RSQ14_W { + RSQ14_W { w: self } } #[doc = "Bits 5:9 - 14th conversion in regular sequence"] - #[inline] - pub fn rsq13(&mut self) -> _RSQ13W { - _RSQ13W { w: self } + #[inline(always)] + pub fn rsq13(&mut self) -> RSQ13_W { + RSQ13_W { w: self } } #[doc = "Bits 0:4 - 13th conversion in regular sequence"] - #[inline] - pub fn rsq12(&mut self) -> _RSQ12W { - _RSQ12W { w: self } + #[inline(always)] + pub fn rsq12(&mut self) -> RSQ12_W { + RSQ12_W { w: self } } } diff --git a/src/adc1/rsq1.rs b/src/adc1/rsq1.rs index d7d499cd0e1ac52e813b15da5e325bc235d1bfac..6d68e09dc098564f9b84a902cf04d26fdea48c26 100644 --- a/src/adc1/rsq1.rs +++ b/src/adc1/rsq1.rs @@ -1,310 +1,160 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::RSQ1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RSQ11R { - bits: u8, -} -impl RSQ11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ10R { - bits: u8, -} -impl RSQ10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ9R { - bits: u8, -} -impl RSQ9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ8R { - bits: u8, -} -impl RSQ8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ7R { - bits: u8, -} -impl RSQ7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ6R { - bits: u8, -} -impl RSQ6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _RSQ11W<'a> { +#[doc = "Reader of register RSQ1"] +pub type R = crate::R; +#[doc = "Writer for register RSQ1"] +pub type W = crate::W; +#[doc = "Register RSQ1 `reset()`'s with value 0"] +impl crate::ResetValue for super::RSQ1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `RSQ11`"] +pub type RSQ11_R = crate::R; +#[doc = "Write proxy for field `RSQ11`"] +pub struct RSQ11_W<'a> { w: &'a mut W, } -impl<'a> _RSQ11W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ11_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 25)) | (((value as u32) & 0x1f) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ10W<'a> { +#[doc = "Reader of field `RSQ10`"] +pub type RSQ10_R = crate::R; +#[doc = "Write proxy for field `RSQ10`"] +pub struct RSQ10_W<'a> { w: &'a mut W, } -impl<'a> _RSQ10W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ10_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 20)) | (((value as u32) & 0x1f) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ9W<'a> { +#[doc = "Reader of field `RSQ9`"] +pub type RSQ9_R = crate::R; +#[doc = "Write proxy for field `RSQ9`"] +pub struct RSQ9_W<'a> { w: &'a mut W, } -impl<'a> _RSQ9W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ9_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 15)) | (((value as u32) & 0x1f) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ8W<'a> { +#[doc = "Reader of field `RSQ8`"] +pub type RSQ8_R = crate::R; +#[doc = "Write proxy for field `RSQ8`"] +pub struct RSQ8_W<'a> { w: &'a mut W, } -impl<'a> _RSQ8W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ8_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 10)) | (((value as u32) & 0x1f) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ7W<'a> { +#[doc = "Reader of field `RSQ7`"] +pub type RSQ7_R = crate::R; +#[doc = "Write proxy for field `RSQ7`"] +pub struct RSQ7_W<'a> { w: &'a mut W, } -impl<'a> _RSQ7W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ7_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 5)) | (((value as u32) & 0x1f) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ6W<'a> { +#[doc = "Reader of field `RSQ6`"] +pub type RSQ6_R = crate::R; +#[doc = "Write proxy for field `RSQ6`"] +pub struct RSQ6_W<'a> { w: &'a mut W, } -impl<'a> _RSQ6W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ6_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x1f) | ((value as u32) & 0x1f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 25:29 - 12th conversion in regular sequence"] - #[inline] - pub fn rsq11(&self) -> RSQ11R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ11R { bits } + #[inline(always)] + pub fn rsq11(&self) -> RSQ11_R { + RSQ11_R::new(((self.bits >> 25) & 0x1f) as u8) } #[doc = "Bits 20:24 - 11th conversion in regular sequence"] - #[inline] - pub fn rsq10(&self) -> RSQ10R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ10R { bits } + #[inline(always)] + pub fn rsq10(&self) -> RSQ10_R { + RSQ10_R::new(((self.bits >> 20) & 0x1f) as u8) } #[doc = "Bits 15:19 - 10th conversion in regular sequence"] - #[inline] - pub fn rsq9(&self) -> RSQ9R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ9R { bits } + #[inline(always)] + pub fn rsq9(&self) -> RSQ9_R { + RSQ9_R::new(((self.bits >> 15) & 0x1f) as u8) } #[doc = "Bits 10:14 - 9th conversion in regular sequence"] - #[inline] - pub fn rsq8(&self) -> RSQ8R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ8R { bits } + #[inline(always)] + pub fn rsq8(&self) -> RSQ8_R { + RSQ8_R::new(((self.bits >> 10) & 0x1f) as u8) } #[doc = "Bits 5:9 - 8th conversion in regular sequence"] - #[inline] - pub fn rsq7(&self) -> RSQ7R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ7R { bits } + #[inline(always)] + pub fn rsq7(&self) -> RSQ7_R { + RSQ7_R::new(((self.bits >> 5) & 0x1f) as u8) } #[doc = "Bits 0:4 - 7th conversion in regular sequence"] - #[inline] - pub fn rsq6(&self) -> RSQ6R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ6R { bits } + #[inline(always)] + pub fn rsq6(&self) -> RSQ6_R { + RSQ6_R::new((self.bits & 0x1f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 25:29 - 12th conversion in regular sequence"] - #[inline] - pub fn rsq11(&mut self) -> _RSQ11W { - _RSQ11W { w: self } + #[inline(always)] + pub fn rsq11(&mut self) -> RSQ11_W { + RSQ11_W { w: self } } #[doc = "Bits 20:24 - 11th conversion in regular sequence"] - #[inline] - pub fn rsq10(&mut self) -> _RSQ10W { - _RSQ10W { w: self } + #[inline(always)] + pub fn rsq10(&mut self) -> RSQ10_W { + RSQ10_W { w: self } } #[doc = "Bits 15:19 - 10th conversion in regular sequence"] - #[inline] - pub fn rsq9(&mut self) -> _RSQ9W { - _RSQ9W { w: self } + #[inline(always)] + pub fn rsq9(&mut self) -> RSQ9_W { + RSQ9_W { w: self } } #[doc = "Bits 10:14 - 9th conversion in regular sequence"] - #[inline] - pub fn rsq8(&mut self) -> _RSQ8W { - _RSQ8W { w: self } + #[inline(always)] + pub fn rsq8(&mut self) -> RSQ8_W { + RSQ8_W { w: self } } #[doc = "Bits 5:9 - 8th conversion in regular sequence"] - #[inline] - pub fn rsq7(&mut self) -> _RSQ7W { - _RSQ7W { w: self } + #[inline(always)] + pub fn rsq7(&mut self) -> RSQ7_W { + RSQ7_W { w: self } } #[doc = "Bits 0:4 - 7th conversion in regular sequence"] - #[inline] - pub fn rsq6(&mut self) -> _RSQ6W { - _RSQ6W { w: self } + #[inline(always)] + pub fn rsq6(&mut self) -> RSQ6_W { + RSQ6_W { w: self } } } diff --git a/src/adc1/rsq2.rs b/src/adc1/rsq2.rs index 08c596528694c8ea37d34a4c76d37a3552fad325..e5eba0ad633c4a773d4a759bbbcd8417bf61193d 100644 --- a/src/adc1/rsq2.rs +++ b/src/adc1/rsq2.rs @@ -1,310 +1,160 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::RSQ2 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RSQ5R { - bits: u8, -} -impl RSQ5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ4R { - bits: u8, -} -impl RSQ4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ3R { - bits: u8, -} -impl RSQ3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ2R { - bits: u8, -} -impl RSQ2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ1R { - bits: u8, -} -impl RSQ1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RSQ0R { - bits: u8, -} -impl RSQ0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _RSQ5W<'a> { +#[doc = "Reader of register RSQ2"] +pub type R = crate::R; +#[doc = "Writer for register RSQ2"] +pub type W = crate::W; +#[doc = "Register RSQ2 `reset()`'s with value 0"] +impl crate::ResetValue for super::RSQ2 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `RSQ5`"] +pub type RSQ5_R = crate::R; +#[doc = "Write proxy for field `RSQ5`"] +pub struct RSQ5_W<'a> { w: &'a mut W, } -impl<'a> _RSQ5W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ5_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 25)) | (((value as u32) & 0x1f) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ4W<'a> { +#[doc = "Reader of field `RSQ4`"] +pub type RSQ4_R = crate::R; +#[doc = "Write proxy for field `RSQ4`"] +pub struct RSQ4_W<'a> { w: &'a mut W, } -impl<'a> _RSQ4W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ4_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 20)) | (((value as u32) & 0x1f) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ3W<'a> { +#[doc = "Reader of field `RSQ3`"] +pub type RSQ3_R = crate::R; +#[doc = "Write proxy for field `RSQ3`"] +pub struct RSQ3_W<'a> { w: &'a mut W, } -impl<'a> _RSQ3W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ3_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 15)) | (((value as u32) & 0x1f) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ2W<'a> { +#[doc = "Reader of field `RSQ2`"] +pub type RSQ2_R = crate::R; +#[doc = "Write proxy for field `RSQ2`"] +pub struct RSQ2_W<'a> { w: &'a mut W, } -impl<'a> _RSQ2W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ2_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 10)) | (((value as u32) & 0x1f) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ1W<'a> { +#[doc = "Reader of field `RSQ1`"] +pub type RSQ1_R = crate::R; +#[doc = "Write proxy for field `RSQ1`"] +pub struct RSQ1_W<'a> { w: &'a mut W, } -impl<'a> _RSQ1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 5)) | (((value as u32) & 0x1f) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _RSQ0W<'a> { +#[doc = "Reader of field `RSQ0`"] +pub type RSQ0_R = crate::R; +#[doc = "Write proxy for field `RSQ0`"] +pub struct RSQ0_W<'a> { w: &'a mut W, } -impl<'a> _RSQ0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RSQ0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x1f) | ((value as u32) & 0x1f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 25:29 - 6th conversion in regular sequence"] - #[inline] - pub fn rsq5(&self) -> RSQ5R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ5R { bits } + #[inline(always)] + pub fn rsq5(&self) -> RSQ5_R { + RSQ5_R::new(((self.bits >> 25) & 0x1f) as u8) } #[doc = "Bits 20:24 - 5th conversion in regular sequence"] - #[inline] - pub fn rsq4(&self) -> RSQ4R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ4R { bits } + #[inline(always)] + pub fn rsq4(&self) -> RSQ4_R { + RSQ4_R::new(((self.bits >> 20) & 0x1f) as u8) } #[doc = "Bits 15:19 - 4th conversion in regular sequence"] - #[inline] - pub fn rsq3(&self) -> RSQ3R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ3R { bits } + #[inline(always)] + pub fn rsq3(&self) -> RSQ3_R { + RSQ3_R::new(((self.bits >> 15) & 0x1f) as u8) } #[doc = "Bits 10:14 - 3rd conversion in regular sequence"] - #[inline] - pub fn rsq2(&self) -> RSQ2R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ2R { bits } + #[inline(always)] + pub fn rsq2(&self) -> RSQ2_R { + RSQ2_R::new(((self.bits >> 10) & 0x1f) as u8) } #[doc = "Bits 5:9 - 2nd conversion in regular sequence"] - #[inline] - pub fn rsq1(&self) -> RSQ1R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ1R { bits } + #[inline(always)] + pub fn rsq1(&self) -> RSQ1_R { + RSQ1_R::new(((self.bits >> 5) & 0x1f) as u8) } #[doc = "Bits 0:4 - 1st conversion in regular sequence"] - #[inline] - pub fn rsq0(&self) -> RSQ0R { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RSQ0R { bits } + #[inline(always)] + pub fn rsq0(&self) -> RSQ0_R { + RSQ0_R::new((self.bits & 0x1f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 25:29 - 6th conversion in regular sequence"] - #[inline] - pub fn rsq5(&mut self) -> _RSQ5W { - _RSQ5W { w: self } + #[inline(always)] + pub fn rsq5(&mut self) -> RSQ5_W { + RSQ5_W { w: self } } #[doc = "Bits 20:24 - 5th conversion in regular sequence"] - #[inline] - pub fn rsq4(&mut self) -> _RSQ4W { - _RSQ4W { w: self } + #[inline(always)] + pub fn rsq4(&mut self) -> RSQ4_W { + RSQ4_W { w: self } } #[doc = "Bits 15:19 - 4th conversion in regular sequence"] - #[inline] - pub fn rsq3(&mut self) -> _RSQ3W { - _RSQ3W { w: self } + #[inline(always)] + pub fn rsq3(&mut self) -> RSQ3_W { + RSQ3_W { w: self } } #[doc = "Bits 10:14 - 3rd conversion in regular sequence"] - #[inline] - pub fn rsq2(&mut self) -> _RSQ2W { - _RSQ2W { w: self } + #[inline(always)] + pub fn rsq2(&mut self) -> RSQ2_W { + RSQ2_W { w: self } } #[doc = "Bits 5:9 - 2nd conversion in regular sequence"] - #[inline] - pub fn rsq1(&mut self) -> _RSQ1W { - _RSQ1W { w: self } + #[inline(always)] + pub fn rsq1(&mut self) -> RSQ1_W { + RSQ1_W { w: self } } #[doc = "Bits 0:4 - 1st conversion in regular sequence"] - #[inline] - pub fn rsq0(&mut self) -> _RSQ0W { - _RSQ0W { w: self } + #[inline(always)] + pub fn rsq0(&mut self) -> RSQ0_W { + RSQ0_W { w: self } } } diff --git a/src/adc1/sampt0.rs b/src/adc1/sampt0.rs index 57608edc7b21737270779a1d9d6daa8fe82b676a..6a69522216943cbce0f464fd4ddf150090334fe9 100644 --- a/src/adc1/sampt0.rs +++ b/src/adc1/sampt0.rs @@ -1,392 +1,208 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::SAMPT0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SPT10R { - bits: u8, -} -impl SPT10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT11R { - bits: u8, -} -impl SPT11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT12R { - bits: u8, -} -impl SPT12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT13R { - bits: u8, -} -impl SPT13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT14R { - bits: u8, -} -impl SPT14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT15R { - bits: u8, -} -impl SPT15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT16R { - bits: u8, -} -impl SPT16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT17R { - bits: u8, -} -impl SPT17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _SPT10W<'a> { +#[doc = "Reader of register SAMPT0"] +pub type R = crate::R; +#[doc = "Writer for register SAMPT0"] +pub type W = crate::W; +#[doc = "Register SAMPT0 `reset()`'s with value 0"] +impl crate::ResetValue for super::SAMPT0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `SPT10`"] +pub type SPT10_R = crate::R; +#[doc = "Write proxy for field `SPT10`"] +pub struct SPT10_W<'a> { w: &'a mut W, } -impl<'a> _SPT10W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT10_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07) | ((value as u32) & 0x07); self.w } } -#[doc = r" Proxy"] -pub struct _SPT11W<'a> { +#[doc = "Reader of field `SPT11`"] +pub type SPT11_R = crate::R; +#[doc = "Write proxy for field `SPT11`"] +pub struct SPT11_W<'a> { w: &'a mut W, } -impl<'a> _SPT11W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT11_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 3)) | (((value as u32) & 0x07) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _SPT12W<'a> { +#[doc = "Reader of field `SPT12`"] +pub type SPT12_R = crate::R; +#[doc = "Write proxy for field `SPT12`"] +pub struct SPT12_W<'a> { w: &'a mut W, } -impl<'a> _SPT12W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT12_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 6)) | (((value as u32) & 0x07) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _SPT13W<'a> { +#[doc = "Reader of field `SPT13`"] +pub type SPT13_R = crate::R; +#[doc = "Write proxy for field `SPT13`"] +pub struct SPT13_W<'a> { w: &'a mut W, } -impl<'a> _SPT13W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT13_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 9)) | (((value as u32) & 0x07) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _SPT14W<'a> { +#[doc = "Reader of field `SPT14`"] +pub type SPT14_R = crate::R; +#[doc = "Write proxy for field `SPT14`"] +pub struct SPT14_W<'a> { w: &'a mut W, } -impl<'a> _SPT14W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT14_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 12)) | (((value as u32) & 0x07) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _SPT15W<'a> { +#[doc = "Reader of field `SPT15`"] +pub type SPT15_R = crate::R; +#[doc = "Write proxy for field `SPT15`"] +pub struct SPT15_W<'a> { w: &'a mut W, } -impl<'a> _SPT15W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT15_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 15)) | (((value as u32) & 0x07) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _SPT16W<'a> { +#[doc = "Reader of field `SPT16`"] +pub type SPT16_R = crate::R; +#[doc = "Write proxy for field `SPT16`"] +pub struct SPT16_W<'a> { w: &'a mut W, } -impl<'a> _SPT16W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT16_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 18)) | (((value as u32) & 0x07) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _SPT17W<'a> { +#[doc = "Reader of field `SPT17`"] +pub type SPT17_R = crate::R; +#[doc = "Write proxy for field `SPT17`"] +pub struct SPT17_W<'a> { w: &'a mut W, } -impl<'a> _SPT17W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT17_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 21)) | (((value as u32) & 0x07) << 21); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:2 - Channel 10 sample time selection"] - #[inline] - pub fn spt10(&self) -> SPT10R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT10R { bits } + #[inline(always)] + pub fn spt10(&self) -> SPT10_R { + SPT10_R::new((self.bits & 0x07) as u8) } #[doc = "Bits 3:5 - Channel 11 sample time selection"] - #[inline] - pub fn spt11(&self) -> SPT11R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT11R { bits } + #[inline(always)] + pub fn spt11(&self) -> SPT11_R { + SPT11_R::new(((self.bits >> 3) & 0x07) as u8) } #[doc = "Bits 6:8 - Channel 12 sample time selection"] - #[inline] - pub fn spt12(&self) -> SPT12R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT12R { bits } + #[inline(always)] + pub fn spt12(&self) -> SPT12_R { + SPT12_R::new(((self.bits >> 6) & 0x07) as u8) } #[doc = "Bits 9:11 - Channel 13 sample time selection"] - #[inline] - pub fn spt13(&self) -> SPT13R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT13R { bits } + #[inline(always)] + pub fn spt13(&self) -> SPT13_R { + SPT13_R::new(((self.bits >> 9) & 0x07) as u8) } #[doc = "Bits 12:14 - Channel 14 sample time selection"] - #[inline] - pub fn spt14(&self) -> SPT14R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT14R { bits } + #[inline(always)] + pub fn spt14(&self) -> SPT14_R { + SPT14_R::new(((self.bits >> 12) & 0x07) as u8) } #[doc = "Bits 15:17 - Channel 15 sample time selection"] - #[inline] - pub fn spt15(&self) -> SPT15R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT15R { bits } + #[inline(always)] + pub fn spt15(&self) -> SPT15_R { + SPT15_R::new(((self.bits >> 15) & 0x07) as u8) } #[doc = "Bits 18:20 - Channel 16 sample time selection"] - #[inline] - pub fn spt16(&self) -> SPT16R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT16R { bits } + #[inline(always)] + pub fn spt16(&self) -> SPT16_R { + SPT16_R::new(((self.bits >> 18) & 0x07) as u8) } #[doc = "Bits 21:23 - Channel 17 sample time selection"] - #[inline] - pub fn spt17(&self) -> SPT17R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT17R { bits } + #[inline(always)] + pub fn spt17(&self) -> SPT17_R { + SPT17_R::new(((self.bits >> 21) & 0x07) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:2 - Channel 10 sample time selection"] - #[inline] - pub fn spt10(&mut self) -> _SPT10W { - _SPT10W { w: self } + #[inline(always)] + pub fn spt10(&mut self) -> SPT10_W { + SPT10_W { w: self } } #[doc = "Bits 3:5 - Channel 11 sample time selection"] - #[inline] - pub fn spt11(&mut self) -> _SPT11W { - _SPT11W { w: self } + #[inline(always)] + pub fn spt11(&mut self) -> SPT11_W { + SPT11_W { w: self } } #[doc = "Bits 6:8 - Channel 12 sample time selection"] - #[inline] - pub fn spt12(&mut self) -> _SPT12W { - _SPT12W { w: self } + #[inline(always)] + pub fn spt12(&mut self) -> SPT12_W { + SPT12_W { w: self } } #[doc = "Bits 9:11 - Channel 13 sample time selection"] - #[inline] - pub fn spt13(&mut self) -> _SPT13W { - _SPT13W { w: self } + #[inline(always)] + pub fn spt13(&mut self) -> SPT13_W { + SPT13_W { w: self } } #[doc = "Bits 12:14 - Channel 14 sample time selection"] - #[inline] - pub fn spt14(&mut self) -> _SPT14W { - _SPT14W { w: self } + #[inline(always)] + pub fn spt14(&mut self) -> SPT14_W { + SPT14_W { w: self } } #[doc = "Bits 15:17 - Channel 15 sample time selection"] - #[inline] - pub fn spt15(&mut self) -> _SPT15W { - _SPT15W { w: self } + #[inline(always)] + pub fn spt15(&mut self) -> SPT15_W { + SPT15_W { w: self } } #[doc = "Bits 18:20 - Channel 16 sample time selection"] - #[inline] - pub fn spt16(&mut self) -> _SPT16W { - _SPT16W { w: self } + #[inline(always)] + pub fn spt16(&mut self) -> SPT16_W { + SPT16_W { w: self } } #[doc = "Bits 21:23 - Channel 17 sample time selection"] - #[inline] - pub fn spt17(&mut self) -> _SPT17W { - _SPT17W { w: self } + #[inline(always)] + pub fn spt17(&mut self) -> SPT17_W { + SPT17_W { w: self } } } diff --git a/src/adc1/sampt1.rs b/src/adc1/sampt1.rs index 23b44a11de0a993e9b9abf4cf81bee38071d97ee..3d64102f2d62d7908551269fcfee7dc51184c82b 100644 --- a/src/adc1/sampt1.rs +++ b/src/adc1/sampt1.rs @@ -1,474 +1,256 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::SAMPT1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SPT0R { - bits: u8, -} -impl SPT0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT1R { - bits: u8, -} -impl SPT1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT2R { - bits: u8, -} -impl SPT2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT3R { - bits: u8, -} -impl SPT3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT4R { - bits: u8, -} -impl SPT4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT5R { - bits: u8, -} -impl SPT5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT6R { - bits: u8, -} -impl SPT6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT7R { - bits: u8, -} -impl SPT7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT8R { - bits: u8, -} -impl SPT8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SPT9R { - bits: u8, -} -impl SPT9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _SPT0W<'a> { +#[doc = "Reader of register SAMPT1"] +pub type R = crate::R; +#[doc = "Writer for register SAMPT1"] +pub type W = crate::W; +#[doc = "Register SAMPT1 `reset()`'s with value 0"] +impl crate::ResetValue for super::SAMPT1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `SPT0`"] +pub type SPT0_R = crate::R; +#[doc = "Write proxy for field `SPT0`"] +pub struct SPT0_W<'a> { w: &'a mut W, } -impl<'a> _SPT0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07) | ((value as u32) & 0x07); self.w } } -#[doc = r" Proxy"] -pub struct _SPT1W<'a> { +#[doc = "Reader of field `SPT1`"] +pub type SPT1_R = crate::R; +#[doc = "Write proxy for field `SPT1`"] +pub struct SPT1_W<'a> { w: &'a mut W, } -impl<'a> _SPT1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 3)) | (((value as u32) & 0x07) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _SPT2W<'a> { +#[doc = "Reader of field `SPT2`"] +pub type SPT2_R = crate::R; +#[doc = "Write proxy for field `SPT2`"] +pub struct SPT2_W<'a> { w: &'a mut W, } -impl<'a> _SPT2W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT2_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 6)) | (((value as u32) & 0x07) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _SPT3W<'a> { +#[doc = "Reader of field `SPT3`"] +pub type SPT3_R = crate::R; +#[doc = "Write proxy for field `SPT3`"] +pub struct SPT3_W<'a> { w: &'a mut W, } -impl<'a> _SPT3W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT3_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 9)) | (((value as u32) & 0x07) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _SPT4W<'a> { +#[doc = "Reader of field `SPT4`"] +pub type SPT4_R = crate::R; +#[doc = "Write proxy for field `SPT4`"] +pub struct SPT4_W<'a> { w: &'a mut W, } -impl<'a> _SPT4W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT4_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 12)) | (((value as u32) & 0x07) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _SPT5W<'a> { +#[doc = "Reader of field `SPT5`"] +pub type SPT5_R = crate::R; +#[doc = "Write proxy for field `SPT5`"] +pub struct SPT5_W<'a> { w: &'a mut W, } -impl<'a> _SPT5W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT5_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 15)) | (((value as u32) & 0x07) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _SPT6W<'a> { +#[doc = "Reader of field `SPT6`"] +pub type SPT6_R = crate::R; +#[doc = "Write proxy for field `SPT6`"] +pub struct SPT6_W<'a> { w: &'a mut W, } -impl<'a> _SPT6W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT6_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 18)) | (((value as u32) & 0x07) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _SPT7W<'a> { +#[doc = "Reader of field `SPT7`"] +pub type SPT7_R = crate::R; +#[doc = "Write proxy for field `SPT7`"] +pub struct SPT7_W<'a> { w: &'a mut W, } -impl<'a> _SPT7W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT7_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 21)) | (((value as u32) & 0x07) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _SPT8W<'a> { +#[doc = "Reader of field `SPT8`"] +pub type SPT8_R = crate::R; +#[doc = "Write proxy for field `SPT8`"] +pub struct SPT8_W<'a> { w: &'a mut W, } -impl<'a> _SPT8W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT8_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 24)) | (((value as u32) & 0x07) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _SPT9W<'a> { +#[doc = "Reader of field `SPT9`"] +pub type SPT9_R = crate::R; +#[doc = "Write proxy for field `SPT9`"] +pub struct SPT9_W<'a> { w: &'a mut W, } -impl<'a> _SPT9W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPT9_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 27)) | (((value as u32) & 0x07) << 27); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:2 - Channel 0 sample time selection"] - #[inline] - pub fn spt0(&self) -> SPT0R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT0R { bits } + #[inline(always)] + pub fn spt0(&self) -> SPT0_R { + SPT0_R::new((self.bits & 0x07) as u8) } #[doc = "Bits 3:5 - Channel 1 sample time selection"] - #[inline] - pub fn spt1(&self) -> SPT1R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT1R { bits } + #[inline(always)] + pub fn spt1(&self) -> SPT1_R { + SPT1_R::new(((self.bits >> 3) & 0x07) as u8) } #[doc = "Bits 6:8 - Channel 2 sample time selection"] - #[inline] - pub fn spt2(&self) -> SPT2R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT2R { bits } + #[inline(always)] + pub fn spt2(&self) -> SPT2_R { + SPT2_R::new(((self.bits >> 6) & 0x07) as u8) } #[doc = "Bits 9:11 - Channel 3 sample time selection"] - #[inline] - pub fn spt3(&self) -> SPT3R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT3R { bits } + #[inline(always)] + pub fn spt3(&self) -> SPT3_R { + SPT3_R::new(((self.bits >> 9) & 0x07) as u8) } #[doc = "Bits 12:14 - Channel 4 sample time selection"] - #[inline] - pub fn spt4(&self) -> SPT4R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT4R { bits } + #[inline(always)] + pub fn spt4(&self) -> SPT4_R { + SPT4_R::new(((self.bits >> 12) & 0x07) as u8) } #[doc = "Bits 15:17 - Channel 5 sample time selection"] - #[inline] - pub fn spt5(&self) -> SPT5R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT5R { bits } + #[inline(always)] + pub fn spt5(&self) -> SPT5_R { + SPT5_R::new(((self.bits >> 15) & 0x07) as u8) } #[doc = "Bits 18:20 - Channel 6 sample time selection"] - #[inline] - pub fn spt6(&self) -> SPT6R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT6R { bits } + #[inline(always)] + pub fn spt6(&self) -> SPT6_R { + SPT6_R::new(((self.bits >> 18) & 0x07) as u8) } #[doc = "Bits 21:23 - Channel 7 sample time selection"] - #[inline] - pub fn spt7(&self) -> SPT7R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT7R { bits } + #[inline(always)] + pub fn spt7(&self) -> SPT7_R { + SPT7_R::new(((self.bits >> 21) & 0x07) as u8) } #[doc = "Bits 24:26 - Channel 8 sample time selection"] - #[inline] - pub fn spt8(&self) -> SPT8R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT8R { bits } + #[inline(always)] + pub fn spt8(&self) -> SPT8_R { + SPT8_R::new(((self.bits >> 24) & 0x07) as u8) } #[doc = "Bits 27:29 - Channel 9 sample time selection"] - #[inline] - pub fn spt9(&self) -> SPT9R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SPT9R { bits } + #[inline(always)] + pub fn spt9(&self) -> SPT9_R { + SPT9_R::new(((self.bits >> 27) & 0x07) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:2 - Channel 0 sample time selection"] - #[inline] - pub fn spt0(&mut self) -> _SPT0W { - _SPT0W { w: self } + #[inline(always)] + pub fn spt0(&mut self) -> SPT0_W { + SPT0_W { w: self } } #[doc = "Bits 3:5 - Channel 1 sample time selection"] - #[inline] - pub fn spt1(&mut self) -> _SPT1W { - _SPT1W { w: self } + #[inline(always)] + pub fn spt1(&mut self) -> SPT1_W { + SPT1_W { w: self } } #[doc = "Bits 6:8 - Channel 2 sample time selection"] - #[inline] - pub fn spt2(&mut self) -> _SPT2W { - _SPT2W { w: self } + #[inline(always)] + pub fn spt2(&mut self) -> SPT2_W { + SPT2_W { w: self } } #[doc = "Bits 9:11 - Channel 3 sample time selection"] - #[inline] - pub fn spt3(&mut self) -> _SPT3W { - _SPT3W { w: self } + #[inline(always)] + pub fn spt3(&mut self) -> SPT3_W { + SPT3_W { w: self } } #[doc = "Bits 12:14 - Channel 4 sample time selection"] - #[inline] - pub fn spt4(&mut self) -> _SPT4W { - _SPT4W { w: self } + #[inline(always)] + pub fn spt4(&mut self) -> SPT4_W { + SPT4_W { w: self } } #[doc = "Bits 15:17 - Channel 5 sample time selection"] - #[inline] - pub fn spt5(&mut self) -> _SPT5W { - _SPT5W { w: self } + #[inline(always)] + pub fn spt5(&mut self) -> SPT5_W { + SPT5_W { w: self } } #[doc = "Bits 18:20 - Channel 6 sample time selection"] - #[inline] - pub fn spt6(&mut self) -> _SPT6W { - _SPT6W { w: self } + #[inline(always)] + pub fn spt6(&mut self) -> SPT6_W { + SPT6_W { w: self } } #[doc = "Bits 21:23 - Channel 7 sample time selection"] - #[inline] - pub fn spt7(&mut self) -> _SPT7W { - _SPT7W { w: self } + #[inline(always)] + pub fn spt7(&mut self) -> SPT7_W { + SPT7_W { w: self } } #[doc = "Bits 24:26 - Channel 8 sample time selection"] - #[inline] - pub fn spt8(&mut self) -> _SPT8W { - _SPT8W { w: self } + #[inline(always)] + pub fn spt8(&mut self) -> SPT8_W { + SPT8_W { w: self } } #[doc = "Bits 27:29 - Channel 9 sample time selection"] - #[inline] - pub fn spt9(&mut self) -> _SPT9W { - _SPT9W { w: self } + #[inline(always)] + pub fn spt9(&mut self) -> SPT9_W { + SPT9_W { w: self } } } diff --git a/src/adc1/stat.rs b/src/adc1/stat.rs index f544f913930b36da27dca14f590174387b0942ac..42f6de4627bbbbe94dcc126c3075c1d27c829803 100644 --- a/src/adc1/stat.rs +++ b/src/adc1/stat.rs @@ -1,359 +1,186 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::STAT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct STRCR { - bits: bool, -} -impl STRCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STICR { - bits: bool, -} -impl STICR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EOICR { - bits: bool, -} -impl EOICR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EOCR { - bits: bool, -} -impl EOCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WDER { - bits: bool, -} -impl WDER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _STRCW<'a> { +#[doc = "Reader of register STAT"] +pub type R = crate::R; +#[doc = "Writer for register STAT"] +pub type W = crate::W; +#[doc = "Register STAT `reset()`'s with value 0"] +impl crate::ResetValue for super::STAT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `STRC`"] +pub type STRC_R = crate::R; +#[doc = "Write proxy for field `STRC`"] +pub struct STRC_W<'a> { w: &'a mut W, } -impl<'a> _STRCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STRC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _STICW<'a> { +#[doc = "Reader of field `STIC`"] +pub type STIC_R = crate::R; +#[doc = "Write proxy for field `STIC`"] +pub struct STIC_W<'a> { w: &'a mut W, } -impl<'a> _STICW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STIC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _EOICW<'a> { +#[doc = "Reader of field `EOIC`"] +pub type EOIC_R = crate::R; +#[doc = "Write proxy for field `EOIC`"] +pub struct EOIC_W<'a> { w: &'a mut W, } -impl<'a> _EOICW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EOIC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _EOCW<'a> { +#[doc = "Reader of field `EOC`"] +pub type EOC_R = crate::R; +#[doc = "Write proxy for field `EOC`"] +pub struct EOC_W<'a> { w: &'a mut W, } -impl<'a> _EOCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EOC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _WDEW<'a> { +#[doc = "Reader of field `WDE`"] +pub type WDE_R = crate::R; +#[doc = "Write proxy for field `WDE`"] +pub struct WDE_W<'a> { w: &'a mut W, } -impl<'a> _WDEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WDE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 4 - Start flag of regular channel group"] - #[inline] - pub fn strc(&self) -> STRCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STRCR { bits } + #[inline(always)] + pub fn strc(&self) -> STRC_R { + STRC_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Start flag of inserted channel group"] - #[inline] - pub fn stic(&self) -> STICR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STICR { bits } + #[inline(always)] + pub fn stic(&self) -> STIC_R { + STIC_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - End of inserted group conversion flag"] - #[inline] - pub fn eoic(&self) -> EOICR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOICR { bits } + #[inline(always)] + pub fn eoic(&self) -> EOIC_R { + EOIC_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - End of group conversion flag"] - #[inline] - pub fn eoc(&self) -> EOCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOCR { bits } + #[inline(always)] + pub fn eoc(&self) -> EOC_R { + EOC_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Analog watchdog event flag"] - #[inline] - pub fn wde(&self) -> WDER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WDER { bits } + #[inline(always)] + pub fn wde(&self) -> WDE_R { + WDE_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 4 - Start flag of regular channel group"] - #[inline] - pub fn strc(&mut self) -> _STRCW { - _STRCW { w: self } + #[inline(always)] + pub fn strc(&mut self) -> STRC_W { + STRC_W { w: self } } #[doc = "Bit 3 - Start flag of inserted channel group"] - #[inline] - pub fn stic(&mut self) -> _STICW { - _STICW { w: self } + #[inline(always)] + pub fn stic(&mut self) -> STIC_W { + STIC_W { w: self } } #[doc = "Bit 2 - End of inserted group conversion flag"] - #[inline] - pub fn eoic(&mut self) -> _EOICW { - _EOICW { w: self } + #[inline(always)] + pub fn eoic(&mut self) -> EOIC_W { + EOIC_W { w: self } } #[doc = "Bit 1 - End of group conversion flag"] - #[inline] - pub fn eoc(&mut self) -> _EOCW { - _EOCW { w: self } + #[inline(always)] + pub fn eoc(&mut self) -> EOC_W { + EOC_W { w: self } } #[doc = "Bit 0 - Analog watchdog event flag"] - #[inline] - pub fn wde(&mut self) -> _WDEW { - _WDEW { w: self } + #[inline(always)] + pub fn wde(&mut self) -> WDE_W { + WDE_W { w: self } } } diff --git a/src/adc1/wdht.rs b/src/adc1/wdht.rs index bca33387dea168f3bea593c00e305210493eed7d..2ba670e78002f2ecad91e39f3090fe188861b973 100644 --- a/src/adc1/wdht.rs +++ b/src/adc1/wdht.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::WDHT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct WDHTR { - bits: u16, -} -impl WDHTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _WDHTW<'a> { +#[doc = "Reader of register WDHT"] +pub type R = crate::R; +#[doc = "Writer for register WDHT"] +pub type W = crate::W; +#[doc = "Register WDHT `reset()`'s with value 0x0fff"] +impl crate::ResetValue for super::WDHT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0fff + } +} +#[doc = "Reader of field `WDHT`"] +pub type WDHT_R = crate::R; +#[doc = "Write proxy for field `WDHT`"] +pub struct WDHT_W<'a> { w: &'a mut W, } -impl<'a> _WDHTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> WDHT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - Analog watchdog higher threshold"] - #[inline] - pub fn wdht(&self) -> WDHTR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - WDHTR { bits } + #[inline(always)] + pub fn wdht(&self) -> WDHT_R { + WDHT_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0fff } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - Analog watchdog higher threshold"] - #[inline] - pub fn wdht(&mut self) -> _WDHTW { - _WDHTW { w: self } + #[inline(always)] + pub fn wdht(&mut self) -> WDHT_W { + WDHT_W { w: self } } } diff --git a/src/adc1/wdlt.rs b/src/adc1/wdlt.rs index 80a59a22b23bcdf9d7454b9c3942388e4859f454..4c45066674864a075fd79f15cfc4b11cca3faa1d 100644 --- a/src/adc1/wdlt.rs +++ b/src/adc1/wdlt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::WDLT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct WDLTR { - bits: u16, -} -impl WDLTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _WDLTW<'a> { +#[doc = "Reader of register WDLT"] +pub type R = crate::R; +#[doc = "Writer for register WDLT"] +pub type W = crate::W; +#[doc = "Register WDLT `reset()`'s with value 0"] +impl crate::ResetValue for super::WDLT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `WDLT`"] +pub type WDLT_R = crate::R; +#[doc = "Write proxy for field `WDLT`"] +pub struct WDLT_W<'a> { w: &'a mut W, } -impl<'a> _WDLTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> WDLT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - Analog watchdog lower threshold"] - #[inline] - pub fn wdlt(&self) -> WDLTR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - WDLTR { bits } + #[inline(always)] + pub fn wdlt(&self) -> WDLT_R { + WDLT_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - Analog watchdog lower threshold"] - #[inline] - pub fn wdlt(&mut self) -> _WDLTW { - _WDLTW { w: self } + #[inline(always)] + pub fn wdlt(&mut self) -> WDLT_W { + WDLT_W { w: self } } } diff --git a/src/afio.rs b/src/afio.rs index 7bce4af504a0b18e9b9d14b3f0ded1778441db5a..59e3c16c0feb225938e7e2c31901e3bb78f9186d 100644 --- a/src/afio.rs +++ b/src/afio.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Event control register"] @@ -13,49 +13,84 @@ pub struct RegisterBlock { pub extiss2: EXTISS2, #[doc = "0x14 - EXTI sources selection register 3"] pub extiss3: EXTISS3, - _reserved0: [u8; 4usize], + _reserved6: [u8; 4usize], #[doc = "0x1c - AFIO port configuration register 1"] pub pcf1: PCF1, } -#[doc = "Event control register"] -pub struct EC { - register: ::vcell::VolatileCell, -} +#[doc = "Event control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ec](ec) module"] +pub type EC = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _EC; +#[doc = "`read()` method returns [ec::R](ec::R) reader structure"] +impl crate::Readable for EC {} +#[doc = "`write(|w| ..)` method takes [ec::W](ec::W) writer structure"] +impl crate::Writable for EC {} #[doc = "Event control register"] pub mod ec; -#[doc = "AFIO port configuration register 0"] -pub struct PCF0 { - register: ::vcell::VolatileCell, -} +#[doc = "AFIO port configuration register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcf0](pcf0) module"] +pub type PCF0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _PCF0; +#[doc = "`read()` method returns [pcf0::R](pcf0::R) reader structure"] +impl crate::Readable for PCF0 {} +#[doc = "`write(|w| ..)` method takes [pcf0::W](pcf0::W) writer structure"] +impl crate::Writable for PCF0 {} #[doc = "AFIO port configuration register 0"] pub mod pcf0; -#[doc = "EXTI sources selection register 0"] -pub struct EXTISS0 { - register: ::vcell::VolatileCell, -} +#[doc = "EXTI sources selection register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [extiss0](extiss0) module"] +pub type EXTISS0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _EXTISS0; +#[doc = "`read()` method returns [extiss0::R](extiss0::R) reader structure"] +impl crate::Readable for EXTISS0 {} +#[doc = "`write(|w| ..)` method takes [extiss0::W](extiss0::W) writer structure"] +impl crate::Writable for EXTISS0 {} #[doc = "EXTI sources selection register 0"] pub mod extiss0; -#[doc = "EXTI sources selection register 1"] -pub struct EXTISS1 { - register: ::vcell::VolatileCell, -} +#[doc = "EXTI sources selection register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [extiss1](extiss1) module"] +pub type EXTISS1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _EXTISS1; +#[doc = "`read()` method returns [extiss1::R](extiss1::R) reader structure"] +impl crate::Readable for EXTISS1 {} +#[doc = "`write(|w| ..)` method takes [extiss1::W](extiss1::W) writer structure"] +impl crate::Writable for EXTISS1 {} #[doc = "EXTI sources selection register 1"] pub mod extiss1; -#[doc = "EXTI sources selection register 2"] -pub struct EXTISS2 { - register: ::vcell::VolatileCell, -} +#[doc = "EXTI sources selection register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [extiss2](extiss2) module"] +pub type EXTISS2 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _EXTISS2; +#[doc = "`read()` method returns [extiss2::R](extiss2::R) reader structure"] +impl crate::Readable for EXTISS2 {} +#[doc = "`write(|w| ..)` method takes [extiss2::W](extiss2::W) writer structure"] +impl crate::Writable for EXTISS2 {} #[doc = "EXTI sources selection register 2"] pub mod extiss2; -#[doc = "EXTI sources selection register 3"] -pub struct EXTISS3 { - register: ::vcell::VolatileCell, -} +#[doc = "EXTI sources selection register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [extiss3](extiss3) module"] +pub type EXTISS3 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _EXTISS3; +#[doc = "`read()` method returns [extiss3::R](extiss3::R) reader structure"] +impl crate::Readable for EXTISS3 {} +#[doc = "`write(|w| ..)` method takes [extiss3::W](extiss3::W) writer structure"] +impl crate::Writable for EXTISS3 {} #[doc = "EXTI sources selection register 3"] pub mod extiss3; -#[doc = "AFIO port configuration register 1"] -pub struct PCF1 { - register: ::vcell::VolatileCell, -} +#[doc = "AFIO port configuration register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pcf1](pcf1) module"] +pub type PCF1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _PCF1; +#[doc = "`read()` method returns [pcf1::R](pcf1::R) reader structure"] +impl crate::Readable for PCF1 {} +#[doc = "`write(|w| ..)` method takes [pcf1::W](pcf1::W) writer structure"] +impl crate::Writable for PCF1 {} #[doc = "AFIO port configuration register 1"] pub mod pcf1; diff --git a/src/afio/ec.rs b/src/afio/ec.rs index d5638cad651fea0e99d971194cff590bb204392e..bd3dec403a912dac4719ba2b822794467a9d7ecd 100644 --- a/src/afio/ec.rs +++ b/src/afio/ec.rs @@ -1,205 +1,98 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::EC { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct EOER { - bits: bool, -} -impl EOER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PORTR { - bits: u8, -} -impl PORTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PINR { - bits: u8, -} -impl PINR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _EOEW<'a> { +#[doc = "Reader of register EC"] +pub type R = crate::R; +#[doc = "Writer for register EC"] +pub type W = crate::W; +#[doc = "Register EC `reset()`'s with value 0"] +impl crate::ResetValue for super::EC { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `EOE`"] +pub type EOE_R = crate::R; +#[doc = "Write proxy for field `EOE`"] +pub struct EOE_W<'a> { w: &'a mut W, } -impl<'a> _EOEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EOE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _PORTW<'a> { +#[doc = "Reader of field `PORT`"] +pub type PORT_R = crate::R; +#[doc = "Write proxy for field `PORT`"] +pub struct PORT_W<'a> { w: &'a mut W, } -impl<'a> _PORTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PORT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 4)) | (((value as u32) & 0x07) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _PINW<'a> { +#[doc = "Reader of field `PIN`"] +pub type PIN_R = crate::R; +#[doc = "Write proxy for field `PIN`"] +pub struct PIN_W<'a> { w: &'a mut W, } -impl<'a> _PINW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PIN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 7 - Event output enable"] - #[inline] - pub fn eoe(&self) -> EOER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOER { bits } + #[inline(always)] + pub fn eoe(&self) -> EOE_R { + EOE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 4:6 - Event output port selection"] - #[inline] - pub fn port(&self) -> PORTR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PORTR { bits } + #[inline(always)] + pub fn port(&self) -> PORT_R { + PORT_R::new(((self.bits >> 4) & 0x07) as u8) } #[doc = "Bits 0:3 - Event output pin selection"] - #[inline] - pub fn pin(&self) -> PINR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PINR { bits } + #[inline(always)] + pub fn pin(&self) -> PIN_R { + PIN_R::new((self.bits & 0x0f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 7 - Event output enable"] - #[inline] - pub fn eoe(&mut self) -> _EOEW { - _EOEW { w: self } + #[inline(always)] + pub fn eoe(&mut self) -> EOE_W { + EOE_W { w: self } } #[doc = "Bits 4:6 - Event output port selection"] - #[inline] - pub fn port(&mut self) -> _PORTW { - _PORTW { w: self } + #[inline(always)] + pub fn port(&mut self) -> PORT_W { + PORT_W { w: self } } #[doc = "Bits 0:3 - Event output pin selection"] - #[inline] - pub fn pin(&mut self) -> _PINW { - _PINW { w: self } + #[inline(always)] + pub fn pin(&mut self) -> PIN_W { + PIN_W { w: self } } } diff --git a/src/afio/extiss0.rs b/src/afio/extiss0.rs index f8adbfa660229d5f6c978ba2cc1d43e16ab1a035..4102dc2e908c4272bb385059635e8404aefbbdc7 100644 --- a/src/afio/extiss0.rs +++ b/src/afio/extiss0.rs @@ -1,228 +1,112 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::EXTISS0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct EXTI3_SSR { - bits: u8, -} -impl EXTI3_SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EXTI2_SSR { - bits: u8, -} -impl EXTI2_SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EXTI1_SSR { - bits: u8, -} -impl EXTI1_SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EXTI0_SSR { - bits: u8, -} -impl EXTI0_SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _EXTI3_SSW<'a> { +#[doc = "Reader of register EXTISS0"] +pub type R = crate::R; +#[doc = "Writer for register EXTISS0"] +pub type W = crate::W; +#[doc = "Register EXTISS0 `reset()`'s with value 0"] +impl crate::ResetValue for super::EXTISS0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `EXTI3_SS`"] +pub type EXTI3_SS_R = crate::R; +#[doc = "Write proxy for field `EXTI3_SS`"] +pub struct EXTI3_SS_W<'a> { w: &'a mut W, } -impl<'a> _EXTI3_SSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EXTI3_SS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 12)) | (((value as u32) & 0x0f) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _EXTI2_SSW<'a> { +#[doc = "Reader of field `EXTI2_SS`"] +pub type EXTI2_SS_R = crate::R; +#[doc = "Write proxy for field `EXTI2_SS`"] +pub struct EXTI2_SS_W<'a> { w: &'a mut W, } -impl<'a> _EXTI2_SSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EXTI2_SS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 8)) | (((value as u32) & 0x0f) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _EXTI1_SSW<'a> { +#[doc = "Reader of field `EXTI1_SS`"] +pub type EXTI1_SS_R = crate::R; +#[doc = "Write proxy for field `EXTI1_SS`"] +pub struct EXTI1_SS_W<'a> { w: &'a mut W, } -impl<'a> _EXTI1_SSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EXTI1_SS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 4)) | (((value as u32) & 0x0f) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _EXTI0_SSW<'a> { +#[doc = "Reader of field `EXTI0_SS`"] +pub type EXTI0_SS_R = crate::R; +#[doc = "Write proxy for field `EXTI0_SS`"] +pub struct EXTI0_SS_W<'a> { w: &'a mut W, } -impl<'a> _EXTI0_SSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EXTI0_SS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 12:15 - EXTI 3 sources selection"] - #[inline] - pub fn exti3_ss(&self) -> EXTI3_SSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EXTI3_SSR { bits } + #[inline(always)] + pub fn exti3_ss(&self) -> EXTI3_SS_R { + EXTI3_SS_R::new(((self.bits >> 12) & 0x0f) as u8) } #[doc = "Bits 8:11 - EXTI 2 sources selection"] - #[inline] - pub fn exti2_ss(&self) -> EXTI2_SSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EXTI2_SSR { bits } + #[inline(always)] + pub fn exti2_ss(&self) -> EXTI2_SS_R { + EXTI2_SS_R::new(((self.bits >> 8) & 0x0f) as u8) } #[doc = "Bits 4:7 - EXTI 1 sources selection"] - #[inline] - pub fn exti1_ss(&self) -> EXTI1_SSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EXTI1_SSR { bits } + #[inline(always)] + pub fn exti1_ss(&self) -> EXTI1_SS_R { + EXTI1_SS_R::new(((self.bits >> 4) & 0x0f) as u8) } #[doc = "Bits 0:3 - EXTI 0 sources selection"] - #[inline] - pub fn exti0_ss(&self) -> EXTI0_SSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EXTI0_SSR { bits } + #[inline(always)] + pub fn exti0_ss(&self) -> EXTI0_SS_R { + EXTI0_SS_R::new((self.bits & 0x0f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 12:15 - EXTI 3 sources selection"] - #[inline] - pub fn exti3_ss(&mut self) -> _EXTI3_SSW { - _EXTI3_SSW { w: self } + #[inline(always)] + pub fn exti3_ss(&mut self) -> EXTI3_SS_W { + EXTI3_SS_W { w: self } } #[doc = "Bits 8:11 - EXTI 2 sources selection"] - #[inline] - pub fn exti2_ss(&mut self) -> _EXTI2_SSW { - _EXTI2_SSW { w: self } + #[inline(always)] + pub fn exti2_ss(&mut self) -> EXTI2_SS_W { + EXTI2_SS_W { w: self } } #[doc = "Bits 4:7 - EXTI 1 sources selection"] - #[inline] - pub fn exti1_ss(&mut self) -> _EXTI1_SSW { - _EXTI1_SSW { w: self } + #[inline(always)] + pub fn exti1_ss(&mut self) -> EXTI1_SS_W { + EXTI1_SS_W { w: self } } #[doc = "Bits 0:3 - EXTI 0 sources selection"] - #[inline] - pub fn exti0_ss(&mut self) -> _EXTI0_SSW { - _EXTI0_SSW { w: self } + #[inline(always)] + pub fn exti0_ss(&mut self) -> EXTI0_SS_W { + EXTI0_SS_W { w: self } } } diff --git a/src/afio/extiss1.rs b/src/afio/extiss1.rs index 4f92b9fc810efeb60caf454fe754beffc2f6f701..315ac2e4f9fdf590e32af67cce180bdb7b105073 100644 --- a/src/afio/extiss1.rs +++ b/src/afio/extiss1.rs @@ -1,228 +1,112 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::EXTISS1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct EXTI7_SSR { - bits: u8, -} -impl EXTI7_SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EXTI6_SSR { - bits: u8, -} -impl EXTI6_SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EXTI5_SSR { - bits: u8, -} -impl EXTI5_SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EXTI4_SSR { - bits: u8, -} -impl EXTI4_SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _EXTI7_SSW<'a> { +#[doc = "Reader of register EXTISS1"] +pub type R = crate::R; +#[doc = "Writer for register EXTISS1"] +pub type W = crate::W; +#[doc = "Register EXTISS1 `reset()`'s with value 0"] +impl crate::ResetValue for super::EXTISS1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `EXTI7_SS`"] +pub type EXTI7_SS_R = crate::R; +#[doc = "Write proxy for field `EXTI7_SS`"] +pub struct EXTI7_SS_W<'a> { w: &'a mut W, } -impl<'a> _EXTI7_SSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EXTI7_SS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 12)) | (((value as u32) & 0x0f) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _EXTI6_SSW<'a> { +#[doc = "Reader of field `EXTI6_SS`"] +pub type EXTI6_SS_R = crate::R; +#[doc = "Write proxy for field `EXTI6_SS`"] +pub struct EXTI6_SS_W<'a> { w: &'a mut W, } -impl<'a> _EXTI6_SSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EXTI6_SS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 8)) | (((value as u32) & 0x0f) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _EXTI5_SSW<'a> { +#[doc = "Reader of field `EXTI5_SS`"] +pub type EXTI5_SS_R = crate::R; +#[doc = "Write proxy for field `EXTI5_SS`"] +pub struct EXTI5_SS_W<'a> { w: &'a mut W, } -impl<'a> _EXTI5_SSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EXTI5_SS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 4)) | (((value as u32) & 0x0f) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _EXTI4_SSW<'a> { +#[doc = "Reader of field `EXTI4_SS`"] +pub type EXTI4_SS_R = crate::R; +#[doc = "Write proxy for field `EXTI4_SS`"] +pub struct EXTI4_SS_W<'a> { w: &'a mut W, } -impl<'a> _EXTI4_SSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EXTI4_SS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 12:15 - EXTI 7 sources selection"] - #[inline] - pub fn exti7_ss(&self) -> EXTI7_SSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EXTI7_SSR { bits } + #[inline(always)] + pub fn exti7_ss(&self) -> EXTI7_SS_R { + EXTI7_SS_R::new(((self.bits >> 12) & 0x0f) as u8) } #[doc = "Bits 8:11 - EXTI 6 sources selection"] - #[inline] - pub fn exti6_ss(&self) -> EXTI6_SSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EXTI6_SSR { bits } + #[inline(always)] + pub fn exti6_ss(&self) -> EXTI6_SS_R { + EXTI6_SS_R::new(((self.bits >> 8) & 0x0f) as u8) } #[doc = "Bits 4:7 - EXTI 5 sources selection"] - #[inline] - pub fn exti5_ss(&self) -> EXTI5_SSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EXTI5_SSR { bits } + #[inline(always)] + pub fn exti5_ss(&self) -> EXTI5_SS_R { + EXTI5_SS_R::new(((self.bits >> 4) & 0x0f) as u8) } #[doc = "Bits 0:3 - EXTI 4 sources selection"] - #[inline] - pub fn exti4_ss(&self) -> EXTI4_SSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EXTI4_SSR { bits } + #[inline(always)] + pub fn exti4_ss(&self) -> EXTI4_SS_R { + EXTI4_SS_R::new((self.bits & 0x0f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 12:15 - EXTI 7 sources selection"] - #[inline] - pub fn exti7_ss(&mut self) -> _EXTI7_SSW { - _EXTI7_SSW { w: self } + #[inline(always)] + pub fn exti7_ss(&mut self) -> EXTI7_SS_W { + EXTI7_SS_W { w: self } } #[doc = "Bits 8:11 - EXTI 6 sources selection"] - #[inline] - pub fn exti6_ss(&mut self) -> _EXTI6_SSW { - _EXTI6_SSW { w: self } + #[inline(always)] + pub fn exti6_ss(&mut self) -> EXTI6_SS_W { + EXTI6_SS_W { w: self } } #[doc = "Bits 4:7 - EXTI 5 sources selection"] - #[inline] - pub fn exti5_ss(&mut self) -> _EXTI5_SSW { - _EXTI5_SSW { w: self } + #[inline(always)] + pub fn exti5_ss(&mut self) -> EXTI5_SS_W { + EXTI5_SS_W { w: self } } #[doc = "Bits 0:3 - EXTI 4 sources selection"] - #[inline] - pub fn exti4_ss(&mut self) -> _EXTI4_SSW { - _EXTI4_SSW { w: self } + #[inline(always)] + pub fn exti4_ss(&mut self) -> EXTI4_SS_W { + EXTI4_SS_W { w: self } } } diff --git a/src/afio/extiss2.rs b/src/afio/extiss2.rs index f2f1581c4e38203d0d9941f43600f684801e734f..74a3871fabef6b3c0947f0b3ac06659f6f790aac 100644 --- a/src/afio/extiss2.rs +++ b/src/afio/extiss2.rs @@ -1,228 +1,112 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::EXTISS2 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct EXTI11_SSR { - bits: u8, -} -impl EXTI11_SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EXTI10_SSR { - bits: u8, -} -impl EXTI10_SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EXTI9_SSR { - bits: u8, -} -impl EXTI9_SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EXTI8_SSR { - bits: u8, -} -impl EXTI8_SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _EXTI11_SSW<'a> { +#[doc = "Reader of register EXTISS2"] +pub type R = crate::R; +#[doc = "Writer for register EXTISS2"] +pub type W = crate::W; +#[doc = "Register EXTISS2 `reset()`'s with value 0"] +impl crate::ResetValue for super::EXTISS2 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `EXTI11_SS`"] +pub type EXTI11_SS_R = crate::R; +#[doc = "Write proxy for field `EXTI11_SS`"] +pub struct EXTI11_SS_W<'a> { w: &'a mut W, } -impl<'a> _EXTI11_SSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EXTI11_SS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 12)) | (((value as u32) & 0x0f) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _EXTI10_SSW<'a> { +#[doc = "Reader of field `EXTI10_SS`"] +pub type EXTI10_SS_R = crate::R; +#[doc = "Write proxy for field `EXTI10_SS`"] +pub struct EXTI10_SS_W<'a> { w: &'a mut W, } -impl<'a> _EXTI10_SSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EXTI10_SS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 8)) | (((value as u32) & 0x0f) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _EXTI9_SSW<'a> { +#[doc = "Reader of field `EXTI9_SS`"] +pub type EXTI9_SS_R = crate::R; +#[doc = "Write proxy for field `EXTI9_SS`"] +pub struct EXTI9_SS_W<'a> { w: &'a mut W, } -impl<'a> _EXTI9_SSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EXTI9_SS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 4)) | (((value as u32) & 0x0f) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _EXTI8_SSW<'a> { +#[doc = "Reader of field `EXTI8_SS`"] +pub type EXTI8_SS_R = crate::R; +#[doc = "Write proxy for field `EXTI8_SS`"] +pub struct EXTI8_SS_W<'a> { w: &'a mut W, } -impl<'a> _EXTI8_SSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EXTI8_SS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 12:15 - EXTI 11 sources selection"] - #[inline] - pub fn exti11_ss(&self) -> EXTI11_SSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EXTI11_SSR { bits } + #[inline(always)] + pub fn exti11_ss(&self) -> EXTI11_SS_R { + EXTI11_SS_R::new(((self.bits >> 12) & 0x0f) as u8) } #[doc = "Bits 8:11 - EXTI 10 sources selection"] - #[inline] - pub fn exti10_ss(&self) -> EXTI10_SSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EXTI10_SSR { bits } + #[inline(always)] + pub fn exti10_ss(&self) -> EXTI10_SS_R { + EXTI10_SS_R::new(((self.bits >> 8) & 0x0f) as u8) } #[doc = "Bits 4:7 - EXTI 9 sources selection"] - #[inline] - pub fn exti9_ss(&self) -> EXTI9_SSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EXTI9_SSR { bits } + #[inline(always)] + pub fn exti9_ss(&self) -> EXTI9_SS_R { + EXTI9_SS_R::new(((self.bits >> 4) & 0x0f) as u8) } #[doc = "Bits 0:3 - EXTI 8 sources selection"] - #[inline] - pub fn exti8_ss(&self) -> EXTI8_SSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EXTI8_SSR { bits } + #[inline(always)] + pub fn exti8_ss(&self) -> EXTI8_SS_R { + EXTI8_SS_R::new((self.bits & 0x0f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 12:15 - EXTI 11 sources selection"] - #[inline] - pub fn exti11_ss(&mut self) -> _EXTI11_SSW { - _EXTI11_SSW { w: self } + #[inline(always)] + pub fn exti11_ss(&mut self) -> EXTI11_SS_W { + EXTI11_SS_W { w: self } } #[doc = "Bits 8:11 - EXTI 10 sources selection"] - #[inline] - pub fn exti10_ss(&mut self) -> _EXTI10_SSW { - _EXTI10_SSW { w: self } + #[inline(always)] + pub fn exti10_ss(&mut self) -> EXTI10_SS_W { + EXTI10_SS_W { w: self } } #[doc = "Bits 4:7 - EXTI 9 sources selection"] - #[inline] - pub fn exti9_ss(&mut self) -> _EXTI9_SSW { - _EXTI9_SSW { w: self } + #[inline(always)] + pub fn exti9_ss(&mut self) -> EXTI9_SS_W { + EXTI9_SS_W { w: self } } #[doc = "Bits 0:3 - EXTI 8 sources selection"] - #[inline] - pub fn exti8_ss(&mut self) -> _EXTI8_SSW { - _EXTI8_SSW { w: self } + #[inline(always)] + pub fn exti8_ss(&mut self) -> EXTI8_SS_W { + EXTI8_SS_W { w: self } } } diff --git a/src/afio/extiss3.rs b/src/afio/extiss3.rs index 8f802a5bf944447b19b68b421180a1994d24df5f..9792403d6d96bd46594b3b4b2d572f9d6679c773 100644 --- a/src/afio/extiss3.rs +++ b/src/afio/extiss3.rs @@ -1,228 +1,112 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::EXTISS3 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct EXTI15_SSR { - bits: u8, -} -impl EXTI15_SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EXTI14_SSR { - bits: u8, -} -impl EXTI14_SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EXTI13_SSR { - bits: u8, -} -impl EXTI13_SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EXTI12_SSR { - bits: u8, -} -impl EXTI12_SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _EXTI15_SSW<'a> { +#[doc = "Reader of register EXTISS3"] +pub type R = crate::R; +#[doc = "Writer for register EXTISS3"] +pub type W = crate::W; +#[doc = "Register EXTISS3 `reset()`'s with value 0"] +impl crate::ResetValue for super::EXTISS3 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `EXTI15_SS`"] +pub type EXTI15_SS_R = crate::R; +#[doc = "Write proxy for field `EXTI15_SS`"] +pub struct EXTI15_SS_W<'a> { w: &'a mut W, } -impl<'a> _EXTI15_SSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EXTI15_SS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 12)) | (((value as u32) & 0x0f) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _EXTI14_SSW<'a> { +#[doc = "Reader of field `EXTI14_SS`"] +pub type EXTI14_SS_R = crate::R; +#[doc = "Write proxy for field `EXTI14_SS`"] +pub struct EXTI14_SS_W<'a> { w: &'a mut W, } -impl<'a> _EXTI14_SSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EXTI14_SS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 8)) | (((value as u32) & 0x0f) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _EXTI13_SSW<'a> { +#[doc = "Reader of field `EXTI13_SS`"] +pub type EXTI13_SS_R = crate::R; +#[doc = "Write proxy for field `EXTI13_SS`"] +pub struct EXTI13_SS_W<'a> { w: &'a mut W, } -impl<'a> _EXTI13_SSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EXTI13_SS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 4)) | (((value as u32) & 0x0f) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _EXTI12_SSW<'a> { +#[doc = "Reader of field `EXTI12_SS`"] +pub type EXTI12_SS_R = crate::R; +#[doc = "Write proxy for field `EXTI12_SS`"] +pub struct EXTI12_SS_W<'a> { w: &'a mut W, } -impl<'a> _EXTI12_SSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EXTI12_SS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 12:15 - EXTI 15 sources selection"] - #[inline] - pub fn exti15_ss(&self) -> EXTI15_SSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EXTI15_SSR { bits } + #[inline(always)] + pub fn exti15_ss(&self) -> EXTI15_SS_R { + EXTI15_SS_R::new(((self.bits >> 12) & 0x0f) as u8) } #[doc = "Bits 8:11 - EXTI 14 sources selection"] - #[inline] - pub fn exti14_ss(&self) -> EXTI14_SSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EXTI14_SSR { bits } + #[inline(always)] + pub fn exti14_ss(&self) -> EXTI14_SS_R { + EXTI14_SS_R::new(((self.bits >> 8) & 0x0f) as u8) } #[doc = "Bits 4:7 - EXTI 13 sources selection"] - #[inline] - pub fn exti13_ss(&self) -> EXTI13_SSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EXTI13_SSR { bits } + #[inline(always)] + pub fn exti13_ss(&self) -> EXTI13_SS_R { + EXTI13_SS_R::new(((self.bits >> 4) & 0x0f) as u8) } #[doc = "Bits 0:3 - EXTI 12 sources selection"] - #[inline] - pub fn exti12_ss(&self) -> EXTI12_SSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EXTI12_SSR { bits } + #[inline(always)] + pub fn exti12_ss(&self) -> EXTI12_SS_R { + EXTI12_SS_R::new((self.bits & 0x0f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 12:15 - EXTI 15 sources selection"] - #[inline] - pub fn exti15_ss(&mut self) -> _EXTI15_SSW { - _EXTI15_SSW { w: self } + #[inline(always)] + pub fn exti15_ss(&mut self) -> EXTI15_SS_W { + EXTI15_SS_W { w: self } } #[doc = "Bits 8:11 - EXTI 14 sources selection"] - #[inline] - pub fn exti14_ss(&mut self) -> _EXTI14_SSW { - _EXTI14_SSW { w: self } + #[inline(always)] + pub fn exti14_ss(&mut self) -> EXTI14_SS_W { + EXTI14_SS_W { w: self } } #[doc = "Bits 4:7 - EXTI 13 sources selection"] - #[inline] - pub fn exti13_ss(&mut self) -> _EXTI13_SSW { - _EXTI13_SSW { w: self } + #[inline(always)] + pub fn exti13_ss(&mut self) -> EXTI13_SS_W { + EXTI13_SS_W { w: self } } #[doc = "Bits 0:3 - EXTI 12 sources selection"] - #[inline] - pub fn exti12_ss(&mut self) -> _EXTI12_SSW { - _EXTI12_SSW { w: self } + #[inline(always)] + pub fn exti12_ss(&mut self) -> EXTI12_SS_W { + EXTI12_SS_W { w: self } } } diff --git a/src/afio/pcf0.rs b/src/afio/pcf0.rs index 6768ba3a23674592a7a4b1a6494fb897bbca5e8f..98a664db901844a9db6536f53948ee92a4c74c78 100644 --- a/src/afio/pcf0.rs +++ b/src/afio/pcf0.rs @@ -1,900 +1,500 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::PCF0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TIMER1ITI1_REMAPR { - bits: bool, -} -impl TIMER1ITI1_REMAPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SPI2_REMAPR { - bits: bool, -} -impl SPI2_REMAPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWJ_CFGR { - bits: u8, -} -impl SWJ_CFGR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CAN1_REMAPR { - bits: bool, -} -impl CAN1_REMAPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER4CH3_IREMAPR { - bits: bool, -} -impl TIMER4CH3_IREMAPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD01_REMAPR { - bits: bool, -} -impl PD01_REMAPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CAN0_REMAPR { - bits: u8, -} -impl CAN0_REMAPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct TIMER3_REMAPR { - bits: bool, -} -impl TIMER3_REMAPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER2_REMAPR { - bits: u8, -} -impl TIMER2_REMAPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct TIMER1_REMAPR { - bits: u8, -} -impl TIMER1_REMAPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct TIMER0_REMAPR { - bits: u8, -} -impl TIMER0_REMAPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct USART2_REMAPR { - bits: u8, -} -impl USART2_REMAPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct USART1_REMAPR { - bits: bool, -} -impl USART1_REMAPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USART0_REMAPR { - bits: bool, -} -impl USART0_REMAPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct I2C0_REMAPR { - bits: bool, -} -impl I2C0_REMAPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SPI0_REMAPR { - bits: bool, -} -impl SPI0_REMAPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TIMER1ITI1_REMAPW<'a> { +#[doc = "Reader of register PCF0"] +pub type R = crate::R; +#[doc = "Writer for register PCF0"] +pub type W = crate::W; +#[doc = "Register PCF0 `reset()`'s with value 0"] +impl crate::ResetValue for super::PCF0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TIMER1ITI1_REMAP`"] +pub type TIMER1ITI1_REMAP_R = crate::R; +#[doc = "Write proxy for field `TIMER1ITI1_REMAP`"] +pub struct TIMER1ITI1_REMAP_W<'a> { w: &'a mut W, } -impl<'a> _TIMER1ITI1_REMAPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER1ITI1_REMAP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _SPI2_REMAPW<'a> { +#[doc = "Reader of field `SPI2_REMAP`"] +pub type SPI2_REMAP_R = crate::R; +#[doc = "Write proxy for field `SPI2_REMAP`"] +pub struct SPI2_REMAP_W<'a> { w: &'a mut W, } -impl<'a> _SPI2_REMAPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SPI2_REMAP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _SWJ_CFGW<'a> { +#[doc = "Reader of field `SWJ_CFG`"] +pub type SWJ_CFG_R = crate::R; +#[doc = "Write proxy for field `SWJ_CFG`"] +pub struct SWJ_CFG_W<'a> { w: &'a mut W, } -impl<'a> _SWJ_CFGW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SWJ_CFG_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 24)) | (((value as u32) & 0x07) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _CAN1_REMAPW<'a> { +#[doc = "Reader of field `CAN1_REMAP`"] +pub type CAN1_REMAP_R = crate::R; +#[doc = "Write proxy for field `CAN1_REMAP`"] +pub struct CAN1_REMAP_W<'a> { w: &'a mut W, } -impl<'a> _CAN1_REMAPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CAN1_REMAP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER4CH3_IREMAPW<'a> { +#[doc = "Reader of field `TIMER4CH3_IREMAP`"] +pub type TIMER4CH3_IREMAP_R = crate::R; +#[doc = "Write proxy for field `TIMER4CH3_IREMAP`"] +pub struct TIMER4CH3_IREMAP_W<'a> { w: &'a mut W, } -impl<'a> _TIMER4CH3_IREMAPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER4CH3_IREMAP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _PD01_REMAPW<'a> { +#[doc = "Reader of field `PD01_REMAP`"] +pub type PD01_REMAP_R = crate::R; +#[doc = "Write proxy for field `PD01_REMAP`"] +pub struct PD01_REMAP_W<'a> { w: &'a mut W, } -impl<'a> _PD01_REMAPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD01_REMAP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _CAN0_REMAPW<'a> { +#[doc = "Reader of field `CAN0_REMAP`"] +pub type CAN0_REMAP_R = crate::R; +#[doc = "Write proxy for field `CAN0_REMAP`"] +pub struct CAN0_REMAP_W<'a> { w: &'a mut W, } -impl<'a> _CAN0_REMAPW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CAN0_REMAP_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 13)) | (((value as u32) & 0x03) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER3_REMAPW<'a> { +#[doc = "Reader of field `TIMER3_REMAP`"] +pub type TIMER3_REMAP_R = crate::R; +#[doc = "Write proxy for field `TIMER3_REMAP`"] +pub struct TIMER3_REMAP_W<'a> { w: &'a mut W, } -impl<'a> _TIMER3_REMAPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER3_REMAP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER2_REMAPW<'a> { +#[doc = "Reader of field `TIMER2_REMAP`"] +pub type TIMER2_REMAP_R = crate::R; +#[doc = "Write proxy for field `TIMER2_REMAP`"] +pub struct TIMER2_REMAP_W<'a> { w: &'a mut W, } -impl<'a> _TIMER2_REMAPW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TIMER2_REMAP_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER1_REMAPW<'a> { +#[doc = "Reader of field `TIMER1_REMAP`"] +pub type TIMER1_REMAP_R = crate::R; +#[doc = "Write proxy for field `TIMER1_REMAP`"] +pub struct TIMER1_REMAP_W<'a> { w: &'a mut W, } -impl<'a> _TIMER1_REMAPW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TIMER1_REMAP_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER0_REMAPW<'a> { +#[doc = "Reader of field `TIMER0_REMAP`"] +pub type TIMER0_REMAP_R = crate::R; +#[doc = "Write proxy for field `TIMER0_REMAP`"] +pub struct TIMER0_REMAP_W<'a> { w: &'a mut W, } -impl<'a> _TIMER0_REMAPW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TIMER0_REMAP_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 6)) | (((value as u32) & 0x03) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _USART2_REMAPW<'a> { +#[doc = "Reader of field `USART2_REMAP`"] +pub type USART2_REMAP_R = crate::R; +#[doc = "Write proxy for field `USART2_REMAP`"] +pub struct USART2_REMAP_W<'a> { w: &'a mut W, } -impl<'a> _USART2_REMAPW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> USART2_REMAP_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 4)) | (((value as u32) & 0x03) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _USART1_REMAPW<'a> { +#[doc = "Reader of field `USART1_REMAP`"] +pub type USART1_REMAP_R = crate::R; +#[doc = "Write proxy for field `USART1_REMAP`"] +pub struct USART1_REMAP_W<'a> { w: &'a mut W, } -impl<'a> _USART1_REMAPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USART1_REMAP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _USART0_REMAPW<'a> { +#[doc = "Reader of field `USART0_REMAP`"] +pub type USART0_REMAP_R = crate::R; +#[doc = "Write proxy for field `USART0_REMAP`"] +pub struct USART0_REMAP_W<'a> { w: &'a mut W, } -impl<'a> _USART0_REMAPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USART0_REMAP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _I2C0_REMAPW<'a> { +#[doc = "Reader of field `I2C0_REMAP`"] +pub type I2C0_REMAP_R = crate::R; +#[doc = "Write proxy for field `I2C0_REMAP`"] +pub struct I2C0_REMAP_W<'a> { w: &'a mut W, } -impl<'a> _I2C0_REMAPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> I2C0_REMAP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _SPI0_REMAPW<'a> { +#[doc = "Reader of field `SPI0_REMAP`"] +pub type SPI0_REMAP_R = crate::R; +#[doc = "Write proxy for field `SPI0_REMAP`"] +pub struct SPI0_REMAP_W<'a> { w: &'a mut W, } -impl<'a> _SPI0_REMAPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SPI0_REMAP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 29 - TIMER1 internal trigger 1 remapping"] - #[inline] - pub fn timer1iti1_remap(&self) -> TIMER1ITI1_REMAPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER1ITI1_REMAPR { bits } + #[inline(always)] + pub fn timer1iti1_remap(&self) -> TIMER1ITI1_REMAP_R { + TIMER1ITI1_REMAP_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 28 - SPI2/I2S2 remapping"] - #[inline] - pub fn spi2_remap(&self) -> SPI2_REMAPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SPI2_REMAPR { bits } + #[inline(always)] + pub fn spi2_remap(&self) -> SPI2_REMAP_R { + SPI2_REMAP_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bits 24:26 - Serial wire JTAG configuration"] - #[inline] - pub fn swj_cfg(&self) -> SWJ_CFGR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SWJ_CFGR { bits } + #[inline(always)] + pub fn swj_cfg(&self) -> SWJ_CFG_R { + SWJ_CFG_R::new(((self.bits >> 24) & 0x07) as u8) } #[doc = "Bit 22 - CAN1 I/O remapping"] - #[inline] - pub fn can1_remap(&self) -> CAN1_REMAPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CAN1_REMAPR { bits } + #[inline(always)] + pub fn can1_remap(&self) -> CAN1_REMAP_R { + CAN1_REMAP_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 16 - TIMER4 channel3 internal remapping"] - #[inline] - pub fn timer4ch3_iremap(&self) -> TIMER4CH3_IREMAPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER4CH3_IREMAPR { bits } + #[inline(always)] + pub fn timer4ch3_iremap(&self) -> TIMER4CH3_IREMAP_R { + TIMER4CH3_IREMAP_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 15 - Port D0/Port D1 mapping on OSC_IN/OSC_OUT"] - #[inline] - pub fn pd01_remap(&self) -> PD01_REMAPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD01_REMAPR { bits } + #[inline(always)] + pub fn pd01_remap(&self) -> PD01_REMAP_R { + PD01_REMAP_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bits 13:14 - CAN0 alternate interface remapping"] - #[inline] - pub fn can0_remap(&self) -> CAN0_REMAPR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CAN0_REMAPR { bits } + #[inline(always)] + pub fn can0_remap(&self) -> CAN0_REMAP_R { + CAN0_REMAP_R::new(((self.bits >> 13) & 0x03) as u8) } #[doc = "Bit 12 - TIMER3 remapping"] - #[inline] - pub fn timer3_remap(&self) -> TIMER3_REMAPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER3_REMAPR { bits } + #[inline(always)] + pub fn timer3_remap(&self) -> TIMER3_REMAP_R { + TIMER3_REMAP_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bits 10:11 - TIMER2 remapping"] - #[inline] - pub fn timer2_remap(&self) -> TIMER2_REMAPR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - TIMER2_REMAPR { bits } + #[inline(always)] + pub fn timer2_remap(&self) -> TIMER2_REMAP_R { + TIMER2_REMAP_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 8:9 - TIMER1 remapping"] - #[inline] - pub fn timer1_remap(&self) -> TIMER1_REMAPR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - TIMER1_REMAPR { bits } + #[inline(always)] + pub fn timer1_remap(&self) -> TIMER1_REMAP_R { + TIMER1_REMAP_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 6:7 - TIMER0 remapping"] - #[inline] - pub fn timer0_remap(&self) -> TIMER0_REMAPR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - TIMER0_REMAPR { bits } + #[inline(always)] + pub fn timer0_remap(&self) -> TIMER0_REMAP_R { + TIMER0_REMAP_R::new(((self.bits >> 6) & 0x03) as u8) } #[doc = "Bits 4:5 - USART2 remapping"] - #[inline] - pub fn usart2_remap(&self) -> USART2_REMAPR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - USART2_REMAPR { bits } + #[inline(always)] + pub fn usart2_remap(&self) -> USART2_REMAP_R { + USART2_REMAP_R::new(((self.bits >> 4) & 0x03) as u8) } #[doc = "Bit 3 - USART1 remapping"] - #[inline] - pub fn usart1_remap(&self) -> USART1_REMAPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USART1_REMAPR { bits } + #[inline(always)] + pub fn usart1_remap(&self) -> USART1_REMAP_R { + USART1_REMAP_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - USART0 remapping"] - #[inline] - pub fn usart0_remap(&self) -> USART0_REMAPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USART0_REMAPR { bits } + #[inline(always)] + pub fn usart0_remap(&self) -> USART0_REMAP_R { + USART0_REMAP_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - I2C0 remapping"] - #[inline] - pub fn i2c0_remap(&self) -> I2C0_REMAPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - I2C0_REMAPR { bits } + #[inline(always)] + pub fn i2c0_remap(&self) -> I2C0_REMAP_R { + I2C0_REMAP_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - SPI0 remapping"] - #[inline] - pub fn spi0_remap(&self) -> SPI0_REMAPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SPI0_REMAPR { bits } + #[inline(always)] + pub fn spi0_remap(&self) -> SPI0_REMAP_R { + SPI0_REMAP_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 29 - TIMER1 internal trigger 1 remapping"] - #[inline] - pub fn timer1iti1_remap(&mut self) -> _TIMER1ITI1_REMAPW { - _TIMER1ITI1_REMAPW { w: self } + #[inline(always)] + pub fn timer1iti1_remap(&mut self) -> TIMER1ITI1_REMAP_W { + TIMER1ITI1_REMAP_W { w: self } } #[doc = "Bit 28 - SPI2/I2S2 remapping"] - #[inline] - pub fn spi2_remap(&mut self) -> _SPI2_REMAPW { - _SPI2_REMAPW { w: self } + #[inline(always)] + pub fn spi2_remap(&mut self) -> SPI2_REMAP_W { + SPI2_REMAP_W { w: self } } #[doc = "Bits 24:26 - Serial wire JTAG configuration"] - #[inline] - pub fn swj_cfg(&mut self) -> _SWJ_CFGW { - _SWJ_CFGW { w: self } + #[inline(always)] + pub fn swj_cfg(&mut self) -> SWJ_CFG_W { + SWJ_CFG_W { w: self } } #[doc = "Bit 22 - CAN1 I/O remapping"] - #[inline] - pub fn can1_remap(&mut self) -> _CAN1_REMAPW { - _CAN1_REMAPW { w: self } + #[inline(always)] + pub fn can1_remap(&mut self) -> CAN1_REMAP_W { + CAN1_REMAP_W { w: self } } #[doc = "Bit 16 - TIMER4 channel3 internal remapping"] - #[inline] - pub fn timer4ch3_iremap(&mut self) -> _TIMER4CH3_IREMAPW { - _TIMER4CH3_IREMAPW { w: self } + #[inline(always)] + pub fn timer4ch3_iremap(&mut self) -> TIMER4CH3_IREMAP_W { + TIMER4CH3_IREMAP_W { w: self } } #[doc = "Bit 15 - Port D0/Port D1 mapping on OSC_IN/OSC_OUT"] - #[inline] - pub fn pd01_remap(&mut self) -> _PD01_REMAPW { - _PD01_REMAPW { w: self } + #[inline(always)] + pub fn pd01_remap(&mut self) -> PD01_REMAP_W { + PD01_REMAP_W { w: self } } #[doc = "Bits 13:14 - CAN0 alternate interface remapping"] - #[inline] - pub fn can0_remap(&mut self) -> _CAN0_REMAPW { - _CAN0_REMAPW { w: self } + #[inline(always)] + pub fn can0_remap(&mut self) -> CAN0_REMAP_W { + CAN0_REMAP_W { w: self } } #[doc = "Bit 12 - TIMER3 remapping"] - #[inline] - pub fn timer3_remap(&mut self) -> _TIMER3_REMAPW { - _TIMER3_REMAPW { w: self } + #[inline(always)] + pub fn timer3_remap(&mut self) -> TIMER3_REMAP_W { + TIMER3_REMAP_W { w: self } } #[doc = "Bits 10:11 - TIMER2 remapping"] - #[inline] - pub fn timer2_remap(&mut self) -> _TIMER2_REMAPW { - _TIMER2_REMAPW { w: self } + #[inline(always)] + pub fn timer2_remap(&mut self) -> TIMER2_REMAP_W { + TIMER2_REMAP_W { w: self } } #[doc = "Bits 8:9 - TIMER1 remapping"] - #[inline] - pub fn timer1_remap(&mut self) -> _TIMER1_REMAPW { - _TIMER1_REMAPW { w: self } + #[inline(always)] + pub fn timer1_remap(&mut self) -> TIMER1_REMAP_W { + TIMER1_REMAP_W { w: self } } #[doc = "Bits 6:7 - TIMER0 remapping"] - #[inline] - pub fn timer0_remap(&mut self) -> _TIMER0_REMAPW { - _TIMER0_REMAPW { w: self } + #[inline(always)] + pub fn timer0_remap(&mut self) -> TIMER0_REMAP_W { + TIMER0_REMAP_W { w: self } } #[doc = "Bits 4:5 - USART2 remapping"] - #[inline] - pub fn usart2_remap(&mut self) -> _USART2_REMAPW { - _USART2_REMAPW { w: self } + #[inline(always)] + pub fn usart2_remap(&mut self) -> USART2_REMAP_W { + USART2_REMAP_W { w: self } } #[doc = "Bit 3 - USART1 remapping"] - #[inline] - pub fn usart1_remap(&mut self) -> _USART1_REMAPW { - _USART1_REMAPW { w: self } + #[inline(always)] + pub fn usart1_remap(&mut self) -> USART1_REMAP_W { + USART1_REMAP_W { w: self } } #[doc = "Bit 2 - USART0 remapping"] - #[inline] - pub fn usart0_remap(&mut self) -> _USART0_REMAPW { - _USART0_REMAPW { w: self } + #[inline(always)] + pub fn usart0_remap(&mut self) -> USART0_REMAP_W { + USART0_REMAP_W { w: self } } #[doc = "Bit 1 - I2C0 remapping"] - #[inline] - pub fn i2c0_remap(&mut self) -> _I2C0_REMAPW { - _I2C0_REMAPW { w: self } + #[inline(always)] + pub fn i2c0_remap(&mut self) -> I2C0_REMAP_W { + I2C0_REMAP_W { w: self } } #[doc = "Bit 0 - SPI0 remapping"] - #[inline] - pub fn spi0_remap(&mut self) -> _SPI0_REMAPW { - _SPI0_REMAPW { w: self } + #[inline(always)] + pub fn spi0_remap(&mut self) -> SPI0_REMAP_W { + SPI0_REMAP_W { w: self } } } diff --git a/src/afio/pcf1.rs b/src/afio/pcf1.rs index aaf8123a3a598f7b99cd797ee953b16e3e161907..63c0afe844241e566da5c791d77a6f915b51709a 100644 --- a/src/afio/pcf1.rs +++ b/src/afio/pcf1.rs @@ -1,123 +1,50 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::PCF1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct EXMC_NADVR { - bits: bool, -} -impl EXMC_NADVR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _EXMC_NADVW<'a> { +#[doc = "Reader of register PCF1"] +pub type R = crate::R; +#[doc = "Writer for register PCF1"] +pub type W = crate::W; +#[doc = "Register PCF1 `reset()`'s with value 0"] +impl crate::ResetValue for super::PCF1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `EXMC_NADV`"] +pub type EXMC_NADV_R = crate::R; +#[doc = "Write proxy for field `EXMC_NADV`"] +pub struct EXMC_NADV_W<'a> { w: &'a mut W, } -impl<'a> _EXMC_NADVW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EXMC_NADV_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 10 - EXMC_NADV connect/disconnect"] - #[inline] - pub fn exmc_nadv(&self) -> EXMC_NADVR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EXMC_NADVR { bits } + #[inline(always)] + pub fn exmc_nadv(&self) -> EXMC_NADV_R { + EXMC_NADV_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 10 - EXMC_NADV connect/disconnect"] - #[inline] - pub fn exmc_nadv(&mut self) -> _EXMC_NADVW { - _EXMC_NADVW { w: self } + #[inline(always)] + pub fn exmc_nadv(&mut self) -> EXMC_NADV_W { + EXMC_NADV_W { w: self } } } diff --git a/src/bkp.rs b/src/bkp.rs index d6d73ea2b14630097bdfeb3016b06f2bb5142fef..a8f62e06ae06298706194f54d27091cfb85fca22 100644 --- a/src/bkp.rs +++ b/src/bkp.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { _reserved0: [u8; 4usize], @@ -137,273 +137,498 @@ pub struct RegisterBlock { #[doc = "0xbc - Backup data register 41"] pub data41: DATA41, } -#[doc = "Backup data register 0"] -pub struct DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data0](data0) module"] +pub type DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA0; +#[doc = "`read()` method returns [data0::R](data0::R) reader structure"] +impl crate::Readable for DATA0 {} +#[doc = "`write(|w| ..)` method takes [data0::W](data0::W) writer structure"] +impl crate::Writable for DATA0 {} #[doc = "Backup data register 0"] pub mod data0; -#[doc = "Backup data register 1"] -pub struct DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data1](data1) module"] +pub type DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA1; +#[doc = "`read()` method returns [data1::R](data1::R) reader structure"] +impl crate::Readable for DATA1 {} +#[doc = "`write(|w| ..)` method takes [data1::W](data1::W) writer structure"] +impl crate::Writable for DATA1 {} #[doc = "Backup data register 1"] pub mod data1; -#[doc = "Backup data register 2"] -pub struct DATA2 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data2](data2) module"] +pub type DATA2 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA2; +#[doc = "`read()` method returns [data2::R](data2::R) reader structure"] +impl crate::Readable for DATA2 {} +#[doc = "`write(|w| ..)` method takes [data2::W](data2::W) writer structure"] +impl crate::Writable for DATA2 {} #[doc = "Backup data register 2"] pub mod data2; -#[doc = "Backup data register 3"] -pub struct DATA3 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 3\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data3](data3) module"] +pub type DATA3 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA3; +#[doc = "`read()` method returns [data3::R](data3::R) reader structure"] +impl crate::Readable for DATA3 {} +#[doc = "`write(|w| ..)` method takes [data3::W](data3::W) writer structure"] +impl crate::Writable for DATA3 {} #[doc = "Backup data register 3"] pub mod data3; -#[doc = "Backup data register 4"] -pub struct DATA4 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 4\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data4](data4) module"] +pub type DATA4 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA4; +#[doc = "`read()` method returns [data4::R](data4::R) reader structure"] +impl crate::Readable for DATA4 {} +#[doc = "`write(|w| ..)` method takes [data4::W](data4::W) writer structure"] +impl crate::Writable for DATA4 {} #[doc = "Backup data register 4"] pub mod data4; -#[doc = "Backup data register 5"] -pub struct DATA5 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 5\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data5](data5) module"] +pub type DATA5 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA5; +#[doc = "`read()` method returns [data5::R](data5::R) reader structure"] +impl crate::Readable for DATA5 {} +#[doc = "`write(|w| ..)` method takes [data5::W](data5::W) writer structure"] +impl crate::Writable for DATA5 {} #[doc = "Backup data register 5"] pub mod data5; -#[doc = "Backup data register 6"] -pub struct DATA6 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 6\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data6](data6) module"] +pub type DATA6 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA6; +#[doc = "`read()` method returns [data6::R](data6::R) reader structure"] +impl crate::Readable for DATA6 {} +#[doc = "`write(|w| ..)` method takes [data6::W](data6::W) writer structure"] +impl crate::Writable for DATA6 {} #[doc = "Backup data register 6"] pub mod data6; -#[doc = "Backup data register 7"] -pub struct DATA7 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 7\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data7](data7) module"] +pub type DATA7 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA7; +#[doc = "`read()` method returns [data7::R](data7::R) reader structure"] +impl crate::Readable for DATA7 {} +#[doc = "`write(|w| ..)` method takes [data7::W](data7::W) writer structure"] +impl crate::Writable for DATA7 {} #[doc = "Backup data register 7"] pub mod data7; -#[doc = "Backup data register 8"] -pub struct DATA8 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 8\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data8](data8) module"] +pub type DATA8 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA8; +#[doc = "`read()` method returns [data8::R](data8::R) reader structure"] +impl crate::Readable for DATA8 {} +#[doc = "`write(|w| ..)` method takes [data8::W](data8::W) writer structure"] +impl crate::Writable for DATA8 {} #[doc = "Backup data register 8"] pub mod data8; -#[doc = "Backup data register 9"] -pub struct DATA9 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 9\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data9](data9) module"] +pub type DATA9 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA9; +#[doc = "`read()` method returns [data9::R](data9::R) reader structure"] +impl crate::Readable for DATA9 {} +#[doc = "`write(|w| ..)` method takes [data9::W](data9::W) writer structure"] +impl crate::Writable for DATA9 {} #[doc = "Backup data register 9"] pub mod data9; -#[doc = "Backup data register 10"] -pub struct DATA10 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 10\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data10](data10) module"] +pub type DATA10 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA10; +#[doc = "`read()` method returns [data10::R](data10::R) reader structure"] +impl crate::Readable for DATA10 {} +#[doc = "`write(|w| ..)` method takes [data10::W](data10::W) writer structure"] +impl crate::Writable for DATA10 {} #[doc = "Backup data register 10"] pub mod data10; -#[doc = "Backup data register 11"] -pub struct DATA11 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 11\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data11](data11) module"] +pub type DATA11 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA11; +#[doc = "`read()` method returns [data11::R](data11::R) reader structure"] +impl crate::Readable for DATA11 {} +#[doc = "`write(|w| ..)` method takes [data11::W](data11::W) writer structure"] +impl crate::Writable for DATA11 {} #[doc = "Backup data register 11"] pub mod data11; -#[doc = "Backup data register 12"] -pub struct DATA12 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 12\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data12](data12) module"] +pub type DATA12 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA12; +#[doc = "`read()` method returns [data12::R](data12::R) reader structure"] +impl crate::Readable for DATA12 {} +#[doc = "`write(|w| ..)` method takes [data12::W](data12::W) writer structure"] +impl crate::Writable for DATA12 {} #[doc = "Backup data register 12"] pub mod data12; -#[doc = "Backup data register 13"] -pub struct DATA13 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 13\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data13](data13) module"] +pub type DATA13 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA13; +#[doc = "`read()` method returns [data13::R](data13::R) reader structure"] +impl crate::Readable for DATA13 {} +#[doc = "`write(|w| ..)` method takes [data13::W](data13::W) writer structure"] +impl crate::Writable for DATA13 {} #[doc = "Backup data register 13"] pub mod data13; -#[doc = "Backup data register 14"] -pub struct DATA14 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 14\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data14](data14) module"] +pub type DATA14 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA14; +#[doc = "`read()` method returns [data14::R](data14::R) reader structure"] +impl crate::Readable for DATA14 {} +#[doc = "`write(|w| ..)` method takes [data14::W](data14::W) writer structure"] +impl crate::Writable for DATA14 {} #[doc = "Backup data register 14"] pub mod data14; -#[doc = "Backup data register 15"] -pub struct DATA15 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 15\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data15](data15) module"] +pub type DATA15 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA15; +#[doc = "`read()` method returns [data15::R](data15::R) reader structure"] +impl crate::Readable for DATA15 {} +#[doc = "`write(|w| ..)` method takes [data15::W](data15::W) writer structure"] +impl crate::Writable for DATA15 {} #[doc = "Backup data register 15"] pub mod data15; -#[doc = "Backup data register 16"] -pub struct DATA16 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 16\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data16](data16) module"] +pub type DATA16 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA16; +#[doc = "`read()` method returns [data16::R](data16::R) reader structure"] +impl crate::Readable for DATA16 {} +#[doc = "`write(|w| ..)` method takes [data16::W](data16::W) writer structure"] +impl crate::Writable for DATA16 {} #[doc = "Backup data register 16"] pub mod data16; -#[doc = "Backup data register 17"] -pub struct DATA17 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 17\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data17](data17) module"] +pub type DATA17 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA17; +#[doc = "`read()` method returns [data17::R](data17::R) reader structure"] +impl crate::Readable for DATA17 {} +#[doc = "`write(|w| ..)` method takes [data17::W](data17::W) writer structure"] +impl crate::Writable for DATA17 {} #[doc = "Backup data register 17"] pub mod data17; -#[doc = "Backup data register 18"] -pub struct DATA18 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 18\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data18](data18) module"] +pub type DATA18 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA18; +#[doc = "`read()` method returns [data18::R](data18::R) reader structure"] +impl crate::Readable for DATA18 {} +#[doc = "`write(|w| ..)` method takes [data18::W](data18::W) writer structure"] +impl crate::Writable for DATA18 {} #[doc = "Backup data register 18"] pub mod data18; -#[doc = "Backup data register 19"] -pub struct DATA19 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 19\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data19](data19) module"] +pub type DATA19 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA19; +#[doc = "`read()` method returns [data19::R](data19::R) reader structure"] +impl crate::Readable for DATA19 {} +#[doc = "`write(|w| ..)` method takes [data19::W](data19::W) writer structure"] +impl crate::Writable for DATA19 {} #[doc = "Backup data register 19"] pub mod data19; -#[doc = "Backup data register 20"] -pub struct DATA20 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 20\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data20](data20) module"] +pub type DATA20 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA20; +#[doc = "`read()` method returns [data20::R](data20::R) reader structure"] +impl crate::Readable for DATA20 {} +#[doc = "`write(|w| ..)` method takes [data20::W](data20::W) writer structure"] +impl crate::Writable for DATA20 {} #[doc = "Backup data register 20"] pub mod data20; -#[doc = "Backup data register 21"] -pub struct DATA21 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 21\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data21](data21) module"] +pub type DATA21 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA21; +#[doc = "`read()` method returns [data21::R](data21::R) reader structure"] +impl crate::Readable for DATA21 {} +#[doc = "`write(|w| ..)` method takes [data21::W](data21::W) writer structure"] +impl crate::Writable for DATA21 {} #[doc = "Backup data register 21"] pub mod data21; -#[doc = "Backup data register 22"] -pub struct DATA22 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 22\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data22](data22) module"] +pub type DATA22 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA22; +#[doc = "`read()` method returns [data22::R](data22::R) reader structure"] +impl crate::Readable for DATA22 {} +#[doc = "`write(|w| ..)` method takes [data22::W](data22::W) writer structure"] +impl crate::Writable for DATA22 {} #[doc = "Backup data register 22"] pub mod data22; -#[doc = "Backup data register 23"] -pub struct DATA23 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 23\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data23](data23) module"] +pub type DATA23 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA23; +#[doc = "`read()` method returns [data23::R](data23::R) reader structure"] +impl crate::Readable for DATA23 {} +#[doc = "`write(|w| ..)` method takes [data23::W](data23::W) writer structure"] +impl crate::Writable for DATA23 {} #[doc = "Backup data register 23"] pub mod data23; -#[doc = "Backup data register 24"] -pub struct DATA24 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 24\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data24](data24) module"] +pub type DATA24 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA24; +#[doc = "`read()` method returns [data24::R](data24::R) reader structure"] +impl crate::Readable for DATA24 {} +#[doc = "`write(|w| ..)` method takes [data24::W](data24::W) writer structure"] +impl crate::Writable for DATA24 {} #[doc = "Backup data register 24"] pub mod data24; -#[doc = "Backup data register 25"] -pub struct DATA25 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 25\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data25](data25) module"] +pub type DATA25 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA25; +#[doc = "`read()` method returns [data25::R](data25::R) reader structure"] +impl crate::Readable for DATA25 {} +#[doc = "`write(|w| ..)` method takes [data25::W](data25::W) writer structure"] +impl crate::Writable for DATA25 {} #[doc = "Backup data register 25"] pub mod data25; -#[doc = "Backup data register 26"] -pub struct DATA26 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 26\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data26](data26) module"] +pub type DATA26 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA26; +#[doc = "`read()` method returns [data26::R](data26::R) reader structure"] +impl crate::Readable for DATA26 {} +#[doc = "`write(|w| ..)` method takes [data26::W](data26::W) writer structure"] +impl crate::Writable for DATA26 {} #[doc = "Backup data register 26"] pub mod data26; -#[doc = "Backup data register 27"] -pub struct DATA27 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 27\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data27](data27) module"] +pub type DATA27 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA27; +#[doc = "`read()` method returns [data27::R](data27::R) reader structure"] +impl crate::Readable for DATA27 {} +#[doc = "`write(|w| ..)` method takes [data27::W](data27::W) writer structure"] +impl crate::Writable for DATA27 {} #[doc = "Backup data register 27"] pub mod data27; -#[doc = "Backup data register 28"] -pub struct DATA28 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 28\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data28](data28) module"] +pub type DATA28 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA28; +#[doc = "`read()` method returns [data28::R](data28::R) reader structure"] +impl crate::Readable for DATA28 {} +#[doc = "`write(|w| ..)` method takes [data28::W](data28::W) writer structure"] +impl crate::Writable for DATA28 {} #[doc = "Backup data register 28"] pub mod data28; -#[doc = "Backup data register 29"] -pub struct DATA29 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 29\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data29](data29) module"] +pub type DATA29 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA29; +#[doc = "`read()` method returns [data29::R](data29::R) reader structure"] +impl crate::Readable for DATA29 {} +#[doc = "`write(|w| ..)` method takes [data29::W](data29::W) writer structure"] +impl crate::Writable for DATA29 {} #[doc = "Backup data register 29"] pub mod data29; -#[doc = "Backup data register 30"] -pub struct DATA30 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 30\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data30](data30) module"] +pub type DATA30 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA30; +#[doc = "`read()` method returns [data30::R](data30::R) reader structure"] +impl crate::Readable for DATA30 {} +#[doc = "`write(|w| ..)` method takes [data30::W](data30::W) writer structure"] +impl crate::Writable for DATA30 {} #[doc = "Backup data register 30"] pub mod data30; -#[doc = "Backup data register 31"] -pub struct DATA31 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 31\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data31](data31) module"] +pub type DATA31 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA31; +#[doc = "`read()` method returns [data31::R](data31::R) reader structure"] +impl crate::Readable for DATA31 {} +#[doc = "`write(|w| ..)` method takes [data31::W](data31::W) writer structure"] +impl crate::Writable for DATA31 {} #[doc = "Backup data register 31"] pub mod data31; -#[doc = "Backup data register 32"] -pub struct DATA32 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 32\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data32](data32) module"] +pub type DATA32 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA32; +#[doc = "`read()` method returns [data32::R](data32::R) reader structure"] +impl crate::Readable for DATA32 {} +#[doc = "`write(|w| ..)` method takes [data32::W](data32::W) writer structure"] +impl crate::Writable for DATA32 {} #[doc = "Backup data register 32"] pub mod data32; -#[doc = "Backup data register 33"] -pub struct DATA33 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 33\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data33](data33) module"] +pub type DATA33 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA33; +#[doc = "`read()` method returns [data33::R](data33::R) reader structure"] +impl crate::Readable for DATA33 {} +#[doc = "`write(|w| ..)` method takes [data33::W](data33::W) writer structure"] +impl crate::Writable for DATA33 {} #[doc = "Backup data register 33"] pub mod data33; -#[doc = "Backup data register 34"] -pub struct DATA34 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 34\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data34](data34) module"] +pub type DATA34 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA34; +#[doc = "`read()` method returns [data34::R](data34::R) reader structure"] +impl crate::Readable for DATA34 {} +#[doc = "`write(|w| ..)` method takes [data34::W](data34::W) writer structure"] +impl crate::Writable for DATA34 {} #[doc = "Backup data register 34"] pub mod data34; -#[doc = "Backup data register 35"] -pub struct DATA35 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 35\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data35](data35) module"] +pub type DATA35 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA35; +#[doc = "`read()` method returns [data35::R](data35::R) reader structure"] +impl crate::Readable for DATA35 {} +#[doc = "`write(|w| ..)` method takes [data35::W](data35::W) writer structure"] +impl crate::Writable for DATA35 {} #[doc = "Backup data register 35"] pub mod data35; -#[doc = "Backup data register 36"] -pub struct DATA36 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 36\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data36](data36) module"] +pub type DATA36 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA36; +#[doc = "`read()` method returns [data36::R](data36::R) reader structure"] +impl crate::Readable for DATA36 {} +#[doc = "`write(|w| ..)` method takes [data36::W](data36::W) writer structure"] +impl crate::Writable for DATA36 {} #[doc = "Backup data register 36"] pub mod data36; -#[doc = "Backup data register 37"] -pub struct DATA37 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 37\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data37](data37) module"] +pub type DATA37 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA37; +#[doc = "`read()` method returns [data37::R](data37::R) reader structure"] +impl crate::Readable for DATA37 {} +#[doc = "`write(|w| ..)` method takes [data37::W](data37::W) writer structure"] +impl crate::Writable for DATA37 {} #[doc = "Backup data register 37"] pub mod data37; -#[doc = "Backup data register 38"] -pub struct DATA38 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 38\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data38](data38) module"] +pub type DATA38 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA38; +#[doc = "`read()` method returns [data38::R](data38::R) reader structure"] +impl crate::Readable for DATA38 {} +#[doc = "`write(|w| ..)` method takes [data38::W](data38::W) writer structure"] +impl crate::Writable for DATA38 {} #[doc = "Backup data register 38"] pub mod data38; -#[doc = "Backup data register 39"] -pub struct DATA39 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 39\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data39](data39) module"] +pub type DATA39 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA39; +#[doc = "`read()` method returns [data39::R](data39::R) reader structure"] +impl crate::Readable for DATA39 {} +#[doc = "`write(|w| ..)` method takes [data39::W](data39::W) writer structure"] +impl crate::Writable for DATA39 {} #[doc = "Backup data register 39"] pub mod data39; -#[doc = "Backup data register 40"] -pub struct DATA40 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 40\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data40](data40) module"] +pub type DATA40 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA40; +#[doc = "`read()` method returns [data40::R](data40::R) reader structure"] +impl crate::Readable for DATA40 {} +#[doc = "`write(|w| ..)` method takes [data40::W](data40::W) writer structure"] +impl crate::Writable for DATA40 {} #[doc = "Backup data register 40"] pub mod data40; -#[doc = "Backup data register 41"] -pub struct DATA41 { - register: ::vcell::VolatileCell, -} +#[doc = "Backup data register 41\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data41](data41) module"] +pub type DATA41 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA41; +#[doc = "`read()` method returns [data41::R](data41::R) reader structure"] +impl crate::Readable for DATA41 {} +#[doc = "`write(|w| ..)` method takes [data41::W](data41::W) writer structure"] +impl crate::Writable for DATA41 {} #[doc = "Backup data register 41"] pub mod data41; -#[doc = "RTC signal output control register"] -pub struct OCTL { - register: ::vcell::VolatileCell, -} +#[doc = "RTC signal output control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [octl](octl) module"] +pub type OCTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _OCTL; +#[doc = "`read()` method returns [octl::R](octl::R) reader structure"] +impl crate::Readable for OCTL {} +#[doc = "`write(|w| ..)` method takes [octl::W](octl::W) writer structure"] +impl crate::Writable for OCTL {} #[doc = "RTC signal output control register"] pub mod octl; -#[doc = "Tamper pin control register"] -pub struct TPCTL { - register: ::vcell::VolatileCell, -} +#[doc = "Tamper pin control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tpctl](tpctl) module"] +pub type TPCTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _TPCTL; +#[doc = "`read()` method returns [tpctl::R](tpctl::R) reader structure"] +impl crate::Readable for TPCTL {} +#[doc = "`write(|w| ..)` method takes [tpctl::W](tpctl::W) writer structure"] +impl crate::Writable for TPCTL {} #[doc = "Tamper pin control register"] pub mod tpctl; -#[doc = "Tamper control and status register"] -pub struct TPCS { - register: ::vcell::VolatileCell, -} +#[doc = "Tamper control and status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tpcs](tpcs) module"] +pub type TPCS = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _TPCS; +#[doc = "`read()` method returns [tpcs::R](tpcs::R) reader structure"] +impl crate::Readable for TPCS {} +#[doc = "`write(|w| ..)` method takes [tpcs::W](tpcs::W) writer structure"] +impl crate::Writable for TPCS {} #[doc = "Tamper control and status register"] pub mod tpcs; diff --git a/src/bkp/data0.rs b/src/bkp/data0.rs index 2995baf933d4b03b61ad7cb519ea3003c2bc5c08..3f4ebf1e68e124c2053ad3e1d72457cf3abac945 100644 --- a/src/bkp/data0.rs +++ b/src/bkp/data0.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA0"] +pub type R = crate::R; +#[doc = "Writer for register DATA0"] +pub type W = crate::W; +#[doc = "Register DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA0 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data1.rs b/src/bkp/data1.rs index 37e65403987427447085998eedf247640a1ea7f8..6985b977d6e63ff312d7211d19a825e83513ede7 100644 --- a/src/bkp/data1.rs +++ b/src/bkp/data1.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA1"] +pub type R = crate::R; +#[doc = "Writer for register DATA1"] +pub type W = crate::W; +#[doc = "Register DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA1 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data10.rs b/src/bkp/data10.rs index 97b6cf11f046c844cad7f2d329c36af2e6a57a8e..997940d2db73d834445ea910ce995734eb5e7d6a 100644 --- a/src/bkp/data10.rs +++ b/src/bkp/data10.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA10 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA10"] +pub type R = crate::R; +#[doc = "Writer for register DATA10"] +pub type W = crate::W; +#[doc = "Register DATA10 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA10 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data11.rs b/src/bkp/data11.rs index 697946fcf4ccfa82736f7c1cb00d8ad3fccaac53..7febb3e9557b9eb193ae63f848384a9280ea8f06 100644 --- a/src/bkp/data11.rs +++ b/src/bkp/data11.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA11 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA11"] +pub type R = crate::R; +#[doc = "Writer for register DATA11"] +pub type W = crate::W; +#[doc = "Register DATA11 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA11 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data12.rs b/src/bkp/data12.rs index 6d8a4ca9804443cf9c24624ee0a80d08c2a220e2..55537113aa692b473a9e02ed053335b4288a9d45 100644 --- a/src/bkp/data12.rs +++ b/src/bkp/data12.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA12 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA12"] +pub type R = crate::R; +#[doc = "Writer for register DATA12"] +pub type W = crate::W; +#[doc = "Register DATA12 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA12 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data13.rs b/src/bkp/data13.rs index eb85a9edbe7529c87701a2db3506df9a00a516ba..f708cdba1b155b4711f8d61d628bad707ea6dd59 100644 --- a/src/bkp/data13.rs +++ b/src/bkp/data13.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA13 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA13"] +pub type R = crate::R; +#[doc = "Writer for register DATA13"] +pub type W = crate::W; +#[doc = "Register DATA13 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA13 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data14.rs b/src/bkp/data14.rs index 7800ac51552c1de3af1f5cd1201ba108c12c33ae..8458f0f741b145a0ccc5fa604e19336604a5f8f1 100644 --- a/src/bkp/data14.rs +++ b/src/bkp/data14.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA14 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA14"] +pub type R = crate::R; +#[doc = "Writer for register DATA14"] +pub type W = crate::W; +#[doc = "Register DATA14 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA14 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data15.rs b/src/bkp/data15.rs index 9b5105c32b35ea81b237c3d90fc21b94e057f32e..55c1b6cb59fdaa984892fa79cabf9b0270d7dc4b 100644 --- a/src/bkp/data15.rs +++ b/src/bkp/data15.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA15 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA15"] +pub type R = crate::R; +#[doc = "Writer for register DATA15"] +pub type W = crate::W; +#[doc = "Register DATA15 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA15 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data16.rs b/src/bkp/data16.rs index 2003e84b55fa2a640b547a41d7dc3e33003131b3..11f387636772afcfce422b10aceaa32315804410 100644 --- a/src/bkp/data16.rs +++ b/src/bkp/data16.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA16 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA16"] +pub type R = crate::R; +#[doc = "Writer for register DATA16"] +pub type W = crate::W; +#[doc = "Register DATA16 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA16 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data17.rs b/src/bkp/data17.rs index 57cfb61db43d08d976e1eab9c5a905429f527b12..62dc175d3858983f95f09cb4459341136c2e89b7 100644 --- a/src/bkp/data17.rs +++ b/src/bkp/data17.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA17 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA17"] +pub type R = crate::R; +#[doc = "Writer for register DATA17"] +pub type W = crate::W; +#[doc = "Register DATA17 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA17 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data18.rs b/src/bkp/data18.rs index af744bb1073acf798334c49610b6db4751a1b055..89b43c96da08d81720f22be86572fc275b60fded 100644 --- a/src/bkp/data18.rs +++ b/src/bkp/data18.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA18 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA18"] +pub type R = crate::R; +#[doc = "Writer for register DATA18"] +pub type W = crate::W; +#[doc = "Register DATA18 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA18 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data19.rs b/src/bkp/data19.rs index d46fd395ca46bbdf35abd7d7d44d355e53865df5..ae40bf01e8a3ddacf5898e224221a9277a39edb9 100644 --- a/src/bkp/data19.rs +++ b/src/bkp/data19.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA19 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA19"] +pub type R = crate::R; +#[doc = "Writer for register DATA19"] +pub type W = crate::W; +#[doc = "Register DATA19 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA19 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data2.rs b/src/bkp/data2.rs index 438339e45a7eeb40a4a463a9e5cb8168cb74d2f2..fe479db6b6f813a47ae19f01a7a25b9c276db6d3 100644 --- a/src/bkp/data2.rs +++ b/src/bkp/data2.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA2 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA2"] +pub type R = crate::R; +#[doc = "Writer for register DATA2"] +pub type W = crate::W; +#[doc = "Register DATA2 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA2 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data20.rs b/src/bkp/data20.rs index 9e564f0330ad0f463e621d892dccc7e5f4b3e6b2..f18769fa0fefc7df792a1121336eb96a14049f05 100644 --- a/src/bkp/data20.rs +++ b/src/bkp/data20.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA20 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA20"] +pub type R = crate::R; +#[doc = "Writer for register DATA20"] +pub type W = crate::W; +#[doc = "Register DATA20 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA20 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data21.rs b/src/bkp/data21.rs index d6421e05a4bc99eebd3fcd8966b63118ba77700b..a6f7bad7b3fa80260f5b6b36d911c69fb51c16ad 100644 --- a/src/bkp/data21.rs +++ b/src/bkp/data21.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA21 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA21"] +pub type R = crate::R; +#[doc = "Writer for register DATA21"] +pub type W = crate::W; +#[doc = "Register DATA21 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA21 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data22.rs b/src/bkp/data22.rs index 09e38f1513b8c5650824c9a09b0b8de16b76eb32..4cfdb82eead3d061ac8daf15875be7e41d47191d 100644 --- a/src/bkp/data22.rs +++ b/src/bkp/data22.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA22 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA22"] +pub type R = crate::R; +#[doc = "Writer for register DATA22"] +pub type W = crate::W; +#[doc = "Register DATA22 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA22 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data23.rs b/src/bkp/data23.rs index b67545683c517cbf882e606bff1f5b38e8cd9dee..c59426525714923764d444a29428059416757184 100644 --- a/src/bkp/data23.rs +++ b/src/bkp/data23.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA23 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA23"] +pub type R = crate::R; +#[doc = "Writer for register DATA23"] +pub type W = crate::W; +#[doc = "Register DATA23 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA23 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data24.rs b/src/bkp/data24.rs index af7781cea1c3e8b1c09527f45442101b451599aa..2e94d20649533df85d617a2ffaa0697b2c3c9f7e 100644 --- a/src/bkp/data24.rs +++ b/src/bkp/data24.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA24 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA24"] +pub type R = crate::R; +#[doc = "Writer for register DATA24"] +pub type W = crate::W; +#[doc = "Register DATA24 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA24 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data25.rs b/src/bkp/data25.rs index bec84be4e370edd6608a7b1048746311c71b2dd5..9688503c4b694708e313d300d8a2f0df0769abe6 100644 --- a/src/bkp/data25.rs +++ b/src/bkp/data25.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA25 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA25"] +pub type R = crate::R; +#[doc = "Writer for register DATA25"] +pub type W = crate::W; +#[doc = "Register DATA25 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA25 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data26.rs b/src/bkp/data26.rs index 45ca415d0cbbd9f2d85c292aad087f12728a814b..983103bd0ebcf63b5b71778189c5a3969950161c 100644 --- a/src/bkp/data26.rs +++ b/src/bkp/data26.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA26 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA26"] +pub type R = crate::R; +#[doc = "Writer for register DATA26"] +pub type W = crate::W; +#[doc = "Register DATA26 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA26 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data27.rs b/src/bkp/data27.rs index 2c30d601f2757cba6920fd33778bae62800ca23b..09c21723554861cfdb465e4780e8436dec39c7af 100644 --- a/src/bkp/data27.rs +++ b/src/bkp/data27.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA27 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA27"] +pub type R = crate::R; +#[doc = "Writer for register DATA27"] +pub type W = crate::W; +#[doc = "Register DATA27 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA27 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data28.rs b/src/bkp/data28.rs index c0178244d100d160622ff4341cfa4edf6d47446e..6d76a6f213848c5a0201e0bb5a0264c73ee62da5 100644 --- a/src/bkp/data28.rs +++ b/src/bkp/data28.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA28 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA28"] +pub type R = crate::R; +#[doc = "Writer for register DATA28"] +pub type W = crate::W; +#[doc = "Register DATA28 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA28 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data29.rs b/src/bkp/data29.rs index 6151f6cd4fa229e1f33e46617893b67a4e4a3328..c92328d5cd9781748125c159099b3cefd49ce68b 100644 --- a/src/bkp/data29.rs +++ b/src/bkp/data29.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA29 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA29"] +pub type R = crate::R; +#[doc = "Writer for register DATA29"] +pub type W = crate::W; +#[doc = "Register DATA29 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA29 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data3.rs b/src/bkp/data3.rs index bfb0f51988fb14b3d2f3d26589437f886bcfda20..850d99cbe5bc080f8b959353f599f731747b5cba 100644 --- a/src/bkp/data3.rs +++ b/src/bkp/data3.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA3 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA3"] +pub type R = crate::R; +#[doc = "Writer for register DATA3"] +pub type W = crate::W; +#[doc = "Register DATA3 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA3 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data30.rs b/src/bkp/data30.rs index 337a2d247f405a4926aeed5afe268c5fea2537b5..43e46616f9e559cc84f9e9c57be45dd24af8561a 100644 --- a/src/bkp/data30.rs +++ b/src/bkp/data30.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA30 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA30"] +pub type R = crate::R; +#[doc = "Writer for register DATA30"] +pub type W = crate::W; +#[doc = "Register DATA30 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA30 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data31.rs b/src/bkp/data31.rs index 4661e9660f58f2ebd51b250fa5e27fa44b657cc9..6cfca1192d489a45d7bd3974941d51ea3339d4fc 100644 --- a/src/bkp/data31.rs +++ b/src/bkp/data31.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA31 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA31"] +pub type R = crate::R; +#[doc = "Writer for register DATA31"] +pub type W = crate::W; +#[doc = "Register DATA31 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA31 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data32.rs b/src/bkp/data32.rs index fd70c97f67eb082455b0e6b35ecadd4ec8c65aa2..f6ebf7150ae410d97c3dc24ecd9d82735d3e87ba 100644 --- a/src/bkp/data32.rs +++ b/src/bkp/data32.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA32 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA32"] +pub type R = crate::R; +#[doc = "Writer for register DATA32"] +pub type W = crate::W; +#[doc = "Register DATA32 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA32 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data33.rs b/src/bkp/data33.rs index c399a9082384650cf275e6b8c53419be8744b752..8f5e36d34a81d08e3abbde7a7a55060eba3378a7 100644 --- a/src/bkp/data33.rs +++ b/src/bkp/data33.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA33 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA33"] +pub type R = crate::R; +#[doc = "Writer for register DATA33"] +pub type W = crate::W; +#[doc = "Register DATA33 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA33 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data34.rs b/src/bkp/data34.rs index 15d67369ce9be57f05fba144204c87cc1fe8cd4a..0880d43e83e2b07d5223666d77465b7af81b1d74 100644 --- a/src/bkp/data34.rs +++ b/src/bkp/data34.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA34 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA34"] +pub type R = crate::R; +#[doc = "Writer for register DATA34"] +pub type W = crate::W; +#[doc = "Register DATA34 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA34 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data35.rs b/src/bkp/data35.rs index a4cc409c8b9a21b31fe392374ccf405cfa0d552d..97944bfc07b6c949291ad1b67058b127cdc131f4 100644 --- a/src/bkp/data35.rs +++ b/src/bkp/data35.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA35 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA35"] +pub type R = crate::R; +#[doc = "Writer for register DATA35"] +pub type W = crate::W; +#[doc = "Register DATA35 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA35 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data36.rs b/src/bkp/data36.rs index 327eebd8afda7b9a65ad66c30cf8d91b48cca1b4..0792384e69a90cd2c008c2eb9b821176df85920a 100644 --- a/src/bkp/data36.rs +++ b/src/bkp/data36.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA36 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA36"] +pub type R = crate::R; +#[doc = "Writer for register DATA36"] +pub type W = crate::W; +#[doc = "Register DATA36 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA36 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data37.rs b/src/bkp/data37.rs index b5c5d3b214f32a90ba00cb8d4f762cb1b671fdbf..0fa03f18810c7e98eccf6b29681b96db07355a42 100644 --- a/src/bkp/data37.rs +++ b/src/bkp/data37.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA37 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA37"] +pub type R = crate::R; +#[doc = "Writer for register DATA37"] +pub type W = crate::W; +#[doc = "Register DATA37 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA37 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data38.rs b/src/bkp/data38.rs index 34a10254d88a1772c95ab5fbf315eae83bb7456c..7c00255133ded00385b766f3f71e7a10e9ff2352 100644 --- a/src/bkp/data38.rs +++ b/src/bkp/data38.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA38 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA38"] +pub type R = crate::R; +#[doc = "Writer for register DATA38"] +pub type W = crate::W; +#[doc = "Register DATA38 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA38 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data39.rs b/src/bkp/data39.rs index e9d8f537a2d005eb90a2b725053c1acba751c10e..29de8fa9fb7a1673f4a80a627eb37386af62c372 100644 --- a/src/bkp/data39.rs +++ b/src/bkp/data39.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA39 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA39"] +pub type R = crate::R; +#[doc = "Writer for register DATA39"] +pub type W = crate::W; +#[doc = "Register DATA39 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA39 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data4.rs b/src/bkp/data4.rs index d26d74953d3fbfd439b93f674eeaa3bced6e88c2..723fba57153fbb0acd1d92d41a2c7d8ac786aac2 100644 --- a/src/bkp/data4.rs +++ b/src/bkp/data4.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA4 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA4"] +pub type R = crate::R; +#[doc = "Writer for register DATA4"] +pub type W = crate::W; +#[doc = "Register DATA4 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA4 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data40.rs b/src/bkp/data40.rs index 34a1dc4910e57b024b9c53091320a5968721e806..f7a30fc8bf27647ce798f01280e27dc541f4072a 100644 --- a/src/bkp/data40.rs +++ b/src/bkp/data40.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA40 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA40"] +pub type R = crate::R; +#[doc = "Writer for register DATA40"] +pub type W = crate::W; +#[doc = "Register DATA40 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA40 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data41.rs b/src/bkp/data41.rs index a54760a7d30a062532fae2f8d1f338fad4cdb59a..f6c39ad1ad6930edb494c060e3214cc32647ce73 100644 --- a/src/bkp/data41.rs +++ b/src/bkp/data41.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA41 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA41"] +pub type R = crate::R; +#[doc = "Writer for register DATA41"] +pub type W = crate::W; +#[doc = "Register DATA41 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA41 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data5.rs b/src/bkp/data5.rs index 8354aa39341840ab4fbff8dffad00fd987638b13..ae21ffd0c99c64f562a246dff8f543185fa74950 100644 --- a/src/bkp/data5.rs +++ b/src/bkp/data5.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA5 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA5"] +pub type R = crate::R; +#[doc = "Writer for register DATA5"] +pub type W = crate::W; +#[doc = "Register DATA5 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA5 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data6.rs b/src/bkp/data6.rs index a854a95462116b9deca3edeee30758c7a0e2f69a..435fe447ea0226e1b9e5b50b4b589d2b5dcf5dc1 100644 --- a/src/bkp/data6.rs +++ b/src/bkp/data6.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA6 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA6"] +pub type R = crate::R; +#[doc = "Writer for register DATA6"] +pub type W = crate::W; +#[doc = "Register DATA6 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA6 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data7.rs b/src/bkp/data7.rs index 91bf2c46985297c0fd33e081cd179b632a7196d9..17bebc44f1bb3dedab7c17c53881ca43892e3e23 100644 --- a/src/bkp/data7.rs +++ b/src/bkp/data7.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA7 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA7"] +pub type R = crate::R; +#[doc = "Writer for register DATA7"] +pub type W = crate::W; +#[doc = "Register DATA7 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA7 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data8.rs b/src/bkp/data8.rs index 2490148a83b1d5ea2f40d85823bed041a616c028..74c6fa7114cc97bf5ffc88c197eb4937c2e438db 100644 --- a/src/bkp/data8.rs +++ b/src/bkp/data8.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA8 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA8"] +pub type R = crate::R; +#[doc = "Writer for register DATA8"] +pub type W = crate::W; +#[doc = "Register DATA8 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA8 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/data9.rs b/src/bkp/data9.rs index 7a9a8f652eb271d2448e78ee1674f33207aa5b6b..9e0e288214c51de2daf42d64574a4c4b28ff82e8 100644 --- a/src/bkp/data9.rs +++ b/src/bkp/data9.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA9 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA9"] +pub type R = crate::R; +#[doc = "Writer for register DATA9"] +pub type W = crate::W; +#[doc = "Register DATA9 `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA9 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Backup data"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/bkp/octl.rs b/src/bkp/octl.rs index 6093e2fd5cb1f31ac73bc39837d9e1112a6b1b17..3ad79ef85a9469b68fb1b7c8648ebd2f5c98ea50 100644 --- a/src/bkp/octl.rs +++ b/src/bkp/octl.rs @@ -1,282 +1,142 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::OCTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct ROSELR { - bits: bool, -} -impl ROSELR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ASOENR { - bits: bool, -} -impl ASOENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct COENR { - bits: bool, -} -impl COENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RCCVR { - bits: u8, -} -impl RCCVR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _ROSELW<'a> { +#[doc = "Reader of register OCTL"] +pub type R = crate::R; +#[doc = "Writer for register OCTL"] +pub type W = crate::W; +#[doc = "Register OCTL `reset()`'s with value 0"] +impl crate::ResetValue for super::OCTL { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `ROSEL`"] +pub type ROSEL_R = crate::R; +#[doc = "Write proxy for field `ROSEL`"] +pub struct ROSEL_W<'a> { w: &'a mut W, } -impl<'a> _ROSELW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ROSEL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u16) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _ASOENW<'a> { +#[doc = "Reader of field `ASOEN`"] +pub type ASOEN_R = crate::R; +#[doc = "Write proxy for field `ASOEN`"] +pub struct ASOEN_W<'a> { w: &'a mut W, } -impl<'a> _ASOENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ASOEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u16) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _COENW<'a> { +#[doc = "Reader of field `COEN`"] +pub type COEN_R = crate::R; +#[doc = "Write proxy for field `COEN`"] +pub struct COEN_W<'a> { w: &'a mut W, } -impl<'a> _COENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> COEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _RCCVW<'a> { +#[doc = "Reader of field `RCCV`"] +pub type RCCV_R = crate::R; +#[doc = "Write proxy for field `RCCV`"] +pub struct RCCV_W<'a> { w: &'a mut W, } -impl<'a> _RCCVW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RCCV_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x7f) | ((value as u16) & 0x7f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 9 - RTC output selection"] - #[inline] - pub fn rosel(&self) -> ROSELR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ROSELR { bits } + #[inline(always)] + pub fn rosel(&self) -> ROSEL_R { + ROSEL_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - RTC alarm or second signal output enable"] - #[inline] - pub fn asoen(&self) -> ASOENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ASOENR { bits } + #[inline(always)] + pub fn asoen(&self) -> ASOEN_R { + ASOEN_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - RTC clock calibration output enable"] - #[inline] - pub fn coen(&self) -> COENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - COENR { bits } + #[inline(always)] + pub fn coen(&self) -> COEN_R { + COEN_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 0:6 - RTC clock calibration value"] - #[inline] - pub fn rccv(&self) -> RCCVR { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - RCCVR { bits } + #[inline(always)] + pub fn rccv(&self) -> RCCV_R { + RCCV_R::new((self.bits & 0x7f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 9 - RTC output selection"] - #[inline] - pub fn rosel(&mut self) -> _ROSELW { - _ROSELW { w: self } + #[inline(always)] + pub fn rosel(&mut self) -> ROSEL_W { + ROSEL_W { w: self } } #[doc = "Bit 8 - RTC alarm or second signal output enable"] - #[inline] - pub fn asoen(&mut self) -> _ASOENW { - _ASOENW { w: self } + #[inline(always)] + pub fn asoen(&mut self) -> ASOEN_W { + ASOEN_W { w: self } } #[doc = "Bit 7 - RTC clock calibration output enable"] - #[inline] - pub fn coen(&mut self) -> _COENW { - _COENW { w: self } + #[inline(always)] + pub fn coen(&mut self) -> COEN_W { + COEN_W { w: self } } #[doc = "Bits 0:6 - RTC clock calibration value"] - #[inline] - pub fn rccv(&mut self) -> _RCCVW { - _RCCVW { w: self } + #[inline(always)] + pub fn rccv(&mut self) -> RCCV_W { + RCCV_W { w: self } } } diff --git a/src/bkp/tpcs.rs b/src/bkp/tpcs.rs index bc1552523eccf9c8a271d65d4fe3dba6c8b3ce6a..c3eb058ded7b4427b44baf2a8ca095069336dcd0 100644 --- a/src/bkp/tpcs.rs +++ b/src/bkp/tpcs.rs @@ -1,359 +1,186 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::TPCS { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TIFR { - bits: bool, -} -impl TIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TEFR { - bits: bool, -} -impl TEFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TPIER { - bits: bool, -} -impl TPIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIRR { - bits: bool, -} -impl TIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TERR { - bits: bool, -} -impl TERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TIFW<'a> { +#[doc = "Reader of register TPCS"] +pub type R = crate::R; +#[doc = "Writer for register TPCS"] +pub type W = crate::W; +#[doc = "Register TPCS `reset()`'s with value 0"] +impl crate::ResetValue for super::TPCS { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TIF`"] +pub type TIF_R = crate::R; +#[doc = "Write proxy for field `TIF`"] +pub struct TIF_W<'a> { w: &'a mut W, } -impl<'a> _TIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u16) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _TEFW<'a> { +#[doc = "Reader of field `TEF`"] +pub type TEF_R = crate::R; +#[doc = "Write proxy for field `TEF`"] +pub struct TEF_W<'a> { w: &'a mut W, } -impl<'a> _TEFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TEF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u16) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _TPIEW<'a> { +#[doc = "Reader of field `TPIE`"] +pub type TPIE_R = crate::R; +#[doc = "Write proxy for field `TPIE`"] +pub struct TPIE_W<'a> { w: &'a mut W, } -impl<'a> _TPIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TPIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _TIRW<'a> { +#[doc = "Reader of field `TIR`"] +pub type TIR_R = crate::R; +#[doc = "Write proxy for field `TIR`"] +pub struct TIR_W<'a> { w: &'a mut W, } -impl<'a> _TIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _TERW<'a> { +#[doc = "Reader of field `TER`"] +pub type TER_R = crate::R; +#[doc = "Write proxy for field `TER`"] +pub struct TER_W<'a> { w: &'a mut W, } -impl<'a> _TERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 9 - Tamper interrupt flag"] - #[inline] - pub fn tif(&self) -> TIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TIFR { bits } + #[inline(always)] + pub fn tif(&self) -> TIF_R { + TIF_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Tamper event flag"] - #[inline] - pub fn tef(&self) -> TEFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TEFR { bits } + #[inline(always)] + pub fn tef(&self) -> TEF_R { + TEF_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 2 - Tamper interrupt enable"] - #[inline] - pub fn tpie(&self) -> TPIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TPIER { bits } + #[inline(always)] + pub fn tpie(&self) -> TPIE_R { + TPIE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Tamper interrupt reset"] - #[inline] - pub fn tir(&self) -> TIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TIRR { bits } + #[inline(always)] + pub fn tir(&self) -> TIR_R { + TIR_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Tamper event reset"] - #[inline] - pub fn ter(&self) -> TERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TERR { bits } + #[inline(always)] + pub fn ter(&self) -> TER_R { + TER_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 9 - Tamper interrupt flag"] - #[inline] - pub fn tif(&mut self) -> _TIFW { - _TIFW { w: self } + #[inline(always)] + pub fn tif(&mut self) -> TIF_W { + TIF_W { w: self } } #[doc = "Bit 8 - Tamper event flag"] - #[inline] - pub fn tef(&mut self) -> _TEFW { - _TEFW { w: self } + #[inline(always)] + pub fn tef(&mut self) -> TEF_W { + TEF_W { w: self } } #[doc = "Bit 2 - Tamper interrupt enable"] - #[inline] - pub fn tpie(&mut self) -> _TPIEW { - _TPIEW { w: self } + #[inline(always)] + pub fn tpie(&mut self) -> TPIE_W { + TPIE_W { w: self } } #[doc = "Bit 1 - Tamper interrupt reset"] - #[inline] - pub fn tir(&mut self) -> _TIRW { - _TIRW { w: self } + #[inline(always)] + pub fn tir(&mut self) -> TIR_W { + TIR_W { w: self } } #[doc = "Bit 0 - Tamper event reset"] - #[inline] - pub fn ter(&mut self) -> _TERW { - _TERW { w: self } + #[inline(always)] + pub fn ter(&mut self) -> TER_W { + TER_W { w: self } } } diff --git a/src/bkp/tpctl.rs b/src/bkp/tpctl.rs index c01e5bab59e3db5ac4e52978d3ef52ae68cd18af..14dedd37cae886b478e1200c2c35e1e091bb0743 100644 --- a/src/bkp/tpctl.rs +++ b/src/bkp/tpctl.rs @@ -1,182 +1,84 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::TPCTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TPALR { - bits: bool, -} -impl TPALR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() +#[doc = "Reader of register TPCTL"] +pub type R = crate::R; +#[doc = "Writer for register TPCTL"] +pub type W = crate::W; +#[doc = "Register TPCTL `reset()`'s with value 0"] +impl crate::ResetValue for super::TPCTL { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TPENR { - bits: bool, } -impl TPENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TPALW<'a> { +#[doc = "Reader of field `TPAL`"] +pub type TPAL_R = crate::R; +#[doc = "Write proxy for field `TPAL`"] +pub struct TPAL_W<'a> { w: &'a mut W, } -impl<'a> _TPALW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TPAL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _TPENW<'a> { +#[doc = "Reader of field `TPEN`"] +pub type TPEN_R = crate::R; +#[doc = "Write proxy for field `TPEN`"] +pub struct TPEN_W<'a> { w: &'a mut W, } -impl<'a> _TPENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TPEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 1 - TAMPER pin active level"] - #[inline] - pub fn tpal(&self) -> TPALR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TPALR { bits } + #[inline(always)] + pub fn tpal(&self) -> TPAL_R { + TPAL_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - TAMPER detection enable"] - #[inline] - pub fn tpen(&self) -> TPENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TPENR { bits } + #[inline(always)] + pub fn tpen(&self) -> TPEN_R { + TPEN_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 1 - TAMPER pin active level"] - #[inline] - pub fn tpal(&mut self) -> _TPALW { - _TPALW { w: self } + #[inline(always)] + pub fn tpal(&mut self) -> TPAL_W { + TPAL_W { w: self } } #[doc = "Bit 0 - TAMPER detection enable"] - #[inline] - pub fn tpen(&mut self) -> _TPENW { - _TPENW { w: self } + #[inline(always)] + pub fn tpen(&mut self) -> TPEN_W { + TPEN_W { w: self } } } diff --git a/src/can0.rs b/src/can0.rs index e04a04177fda4b0d00414bc0167a6cb013fb2ddd..665a4bcbbd8586beff2e26c1db0bef5b1e7acfca 100644 --- a/src/can0.rs +++ b/src/can0.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Control register"] @@ -17,7 +17,7 @@ pub struct RegisterBlock { pub err: ERR, #[doc = "0x1c - Bit timing register"] pub bt: BT, - _reserved0: [u8; 352usize], + _reserved8: [u8; 352usize], #[doc = "0x180 - Transmit mailbox identifier register 0"] pub tmi0: TMI0, #[doc = "0x184 - Transmit mailbox property register 0"] @@ -58,21 +58,21 @@ pub struct RegisterBlock { pub rfifomdata01: RFIFOMDATA01, #[doc = "0x1cc - Receive FIFO1 mailbox data1 register"] pub rfifomdata11: RFIFOMDATA11, - _reserved1: [u8; 48usize], + _reserved28: [u8; 48usize], #[doc = "0x200 - Filter control register"] pub fctl: FCTL, #[doc = "0x204 - Filter mode configuration register"] pub fmcfg: FMCFG, - _reserved2: [u8; 4usize], + _reserved30: [u8; 4usize], #[doc = "0x20c - Filter scale configuration register"] pub fscfg: FSCFG, - _reserved3: [u8; 4usize], + _reserved31: [u8; 4usize], #[doc = "0x214 - Filter associated FIFO register"] pub fafifo: FAFIFO, - _reserved4: [u8; 4usize], + _reserved32: [u8; 4usize], #[doc = "0x21c - Filter working register"] pub fw: FW, - _reserved5: [u8; 32usize], + _reserved33: [u8; 32usize], #[doc = "0x240 - Filter 0 data 0 register"] pub f0data0: F0DATA0, #[doc = "0x244 - Filter 0 data 1 register"] @@ -186,537 +186,966 @@ pub struct RegisterBlock { #[doc = "0x31c - Filter 27 data 1 register"] pub f27data1: F27DATA1, } -#[doc = "Control register"] -pub struct CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl](ctl) module"] +pub type CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL; +#[doc = "`read()` method returns [ctl::R](ctl::R) reader structure"] +impl crate::Readable for CTL {} +#[doc = "`write(|w| ..)` method takes [ctl::W](ctl::W) writer structure"] +impl crate::Writable for CTL {} #[doc = "Control register"] pub mod ctl; -#[doc = "Status register"] -pub struct STAT { - register: ::vcell::VolatileCell, -} +#[doc = "Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [stat](stat) module"] +pub type STAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _STAT; +#[doc = "`read()` method returns [stat::R](stat::R) reader structure"] +impl crate::Readable for STAT {} +#[doc = "`write(|w| ..)` method takes [stat::W](stat::W) writer structure"] +impl crate::Writable for STAT {} #[doc = "Status register"] pub mod stat; -#[doc = "Transmit status register"] -pub struct TSTAT { - register: ::vcell::VolatileCell, -} +#[doc = "Transmit status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tstat](tstat) module"] +pub type TSTAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _TSTAT; +#[doc = "`read()` method returns [tstat::R](tstat::R) reader structure"] +impl crate::Readable for TSTAT {} +#[doc = "`write(|w| ..)` method takes [tstat::W](tstat::W) writer structure"] +impl crate::Writable for TSTAT {} #[doc = "Transmit status register"] pub mod tstat; -#[doc = "Receive message FIFO0 register"] -pub struct RFIFO0 { - register: ::vcell::VolatileCell, -} +#[doc = "Receive message FIFO0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rfifo0](rfifo0) module"] +pub type RFIFO0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RFIFO0; +#[doc = "`read()` method returns [rfifo0::R](rfifo0::R) reader structure"] +impl crate::Readable for RFIFO0 {} +#[doc = "`write(|w| ..)` method takes [rfifo0::W](rfifo0::W) writer structure"] +impl crate::Writable for RFIFO0 {} #[doc = "Receive message FIFO0 register"] pub mod rfifo0; -#[doc = "Receive message FIFO1 register"] -pub struct RFIFO1 { - register: ::vcell::VolatileCell, -} +#[doc = "Receive message FIFO1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rfifo1](rfifo1) module"] +pub type RFIFO1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RFIFO1; +#[doc = "`read()` method returns [rfifo1::R](rfifo1::R) reader structure"] +impl crate::Readable for RFIFO1 {} +#[doc = "`write(|w| ..)` method takes [rfifo1::W](rfifo1::W) writer structure"] +impl crate::Writable for RFIFO1 {} #[doc = "Receive message FIFO1 register"] pub mod rfifo1; -#[doc = "Interrupt enable register"] -pub struct INTEN { - register: ::vcell::VolatileCell, -} +#[doc = "Interrupt enable register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [inten](inten) module"] +pub type INTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _INTEN; +#[doc = "`read()` method returns [inten::R](inten::R) reader structure"] +impl crate::Readable for INTEN {} +#[doc = "`write(|w| ..)` method takes [inten::W](inten::W) writer structure"] +impl crate::Writable for INTEN {} #[doc = "Interrupt enable register"] pub mod inten; -#[doc = "Error register"] -pub struct ERR { - register: ::vcell::VolatileCell, -} +#[doc = "Error register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [err](err) module"] +pub type ERR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _ERR; +#[doc = "`read()` method returns [err::R](err::R) reader structure"] +impl crate::Readable for ERR {} +#[doc = "`write(|w| ..)` method takes [err::W](err::W) writer structure"] +impl crate::Writable for ERR {} #[doc = "Error register"] pub mod err; -#[doc = "Bit timing register"] -pub struct BT { - register: ::vcell::VolatileCell, -} +#[doc = "Bit timing register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bt](bt) module"] +pub type BT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _BT; +#[doc = "`read()` method returns [bt::R](bt::R) reader structure"] +impl crate::Readable for BT {} +#[doc = "`write(|w| ..)` method takes [bt::W](bt::W) writer structure"] +impl crate::Writable for BT {} #[doc = "Bit timing register"] pub mod bt; -#[doc = "Transmit mailbox identifier register 0"] -pub struct TMI0 { - register: ::vcell::VolatileCell, -} +#[doc = "Transmit mailbox identifier register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tmi0](tmi0) module"] +pub type TMI0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _TMI0; +#[doc = "`read()` method returns [tmi0::R](tmi0::R) reader structure"] +impl crate::Readable for TMI0 {} +#[doc = "`write(|w| ..)` method takes [tmi0::W](tmi0::W) writer structure"] +impl crate::Writable for TMI0 {} #[doc = "Transmit mailbox identifier register 0"] pub mod tmi0; -#[doc = "Transmit mailbox property register 0"] -pub struct TMP0 { - register: ::vcell::VolatileCell, -} +#[doc = "Transmit mailbox property register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tmp0](tmp0) module"] +pub type TMP0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _TMP0; +#[doc = "`read()` method returns [tmp0::R](tmp0::R) reader structure"] +impl crate::Readable for TMP0 {} +#[doc = "`write(|w| ..)` method takes [tmp0::W](tmp0::W) writer structure"] +impl crate::Writable for TMP0 {} #[doc = "Transmit mailbox property register 0"] pub mod tmp0; -#[doc = "Transmit mailbox data0 register"] -pub struct TMDATA00 { - register: ::vcell::VolatileCell, -} +#[doc = "Transmit mailbox data0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tmdata00](tmdata00) module"] +pub type TMDATA00 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _TMDATA00; +#[doc = "`read()` method returns [tmdata00::R](tmdata00::R) reader structure"] +impl crate::Readable for TMDATA00 {} +#[doc = "`write(|w| ..)` method takes [tmdata00::W](tmdata00::W) writer structure"] +impl crate::Writable for TMDATA00 {} #[doc = "Transmit mailbox data0 register"] pub mod tmdata00; -#[doc = "Transmit mailbox data1 register"] -pub struct TMDATA10 { - register: ::vcell::VolatileCell, -} +#[doc = "Transmit mailbox data1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tmdata10](tmdata10) module"] +pub type TMDATA10 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _TMDATA10; +#[doc = "`read()` method returns [tmdata10::R](tmdata10::R) reader structure"] +impl crate::Readable for TMDATA10 {} +#[doc = "`write(|w| ..)` method takes [tmdata10::W](tmdata10::W) writer structure"] +impl crate::Writable for TMDATA10 {} #[doc = "Transmit mailbox data1 register"] pub mod tmdata10; -#[doc = "Transmit mailbox identifier register 1"] -pub struct TMI1 { - register: ::vcell::VolatileCell, -} +#[doc = "Transmit mailbox identifier register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tmi1](tmi1) module"] +pub type TMI1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _TMI1; +#[doc = "`read()` method returns [tmi1::R](tmi1::R) reader structure"] +impl crate::Readable for TMI1 {} +#[doc = "`write(|w| ..)` method takes [tmi1::W](tmi1::W) writer structure"] +impl crate::Writable for TMI1 {} #[doc = "Transmit mailbox identifier register 1"] pub mod tmi1; -#[doc = "Transmit mailbox property register 1"] -pub struct TMP1 { - register: ::vcell::VolatileCell, -} +#[doc = "Transmit mailbox property register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tmp1](tmp1) module"] +pub type TMP1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _TMP1; +#[doc = "`read()` method returns [tmp1::R](tmp1::R) reader structure"] +impl crate::Readable for TMP1 {} +#[doc = "`write(|w| ..)` method takes [tmp1::W](tmp1::W) writer structure"] +impl crate::Writable for TMP1 {} #[doc = "Transmit mailbox property register 1"] pub mod tmp1; -#[doc = "Transmit mailbox data0 register"] -pub struct TMDATA01 { - register: ::vcell::VolatileCell, -} +#[doc = "Transmit mailbox data0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tmdata01](tmdata01) module"] +pub type TMDATA01 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _TMDATA01; +#[doc = "`read()` method returns [tmdata01::R](tmdata01::R) reader structure"] +impl crate::Readable for TMDATA01 {} +#[doc = "`write(|w| ..)` method takes [tmdata01::W](tmdata01::W) writer structure"] +impl crate::Writable for TMDATA01 {} #[doc = "Transmit mailbox data0 register"] pub mod tmdata01; -#[doc = "Transmit mailbox data1 register"] -pub struct TMDATA11 { - register: ::vcell::VolatileCell, -} +#[doc = "Transmit mailbox data1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tmdata11](tmdata11) module"] +pub type TMDATA11 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _TMDATA11; +#[doc = "`read()` method returns [tmdata11::R](tmdata11::R) reader structure"] +impl crate::Readable for TMDATA11 {} +#[doc = "`write(|w| ..)` method takes [tmdata11::W](tmdata11::W) writer structure"] +impl crate::Writable for TMDATA11 {} #[doc = "Transmit mailbox data1 register"] pub mod tmdata11; -#[doc = "Transmit mailbox identifier register 2"] -pub struct TMI2 { - register: ::vcell::VolatileCell, -} +#[doc = "Transmit mailbox identifier register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tmi2](tmi2) module"] +pub type TMI2 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _TMI2; +#[doc = "`read()` method returns [tmi2::R](tmi2::R) reader structure"] +impl crate::Readable for TMI2 {} +#[doc = "`write(|w| ..)` method takes [tmi2::W](tmi2::W) writer structure"] +impl crate::Writable for TMI2 {} #[doc = "Transmit mailbox identifier register 2"] pub mod tmi2; -#[doc = "Transmit mailbox property register 2"] -pub struct TMP2 { - register: ::vcell::VolatileCell, -} +#[doc = "Transmit mailbox property register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tmp2](tmp2) module"] +pub type TMP2 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _TMP2; +#[doc = "`read()` method returns [tmp2::R](tmp2::R) reader structure"] +impl crate::Readable for TMP2 {} +#[doc = "`write(|w| ..)` method takes [tmp2::W](tmp2::W) writer structure"] +impl crate::Writable for TMP2 {} #[doc = "Transmit mailbox property register 2"] pub mod tmp2; -#[doc = "Transmit mailbox data0 register"] -pub struct TMDATA02 { - register: ::vcell::VolatileCell, -} +#[doc = "Transmit mailbox data0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tmdata02](tmdata02) module"] +pub type TMDATA02 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _TMDATA02; +#[doc = "`read()` method returns [tmdata02::R](tmdata02::R) reader structure"] +impl crate::Readable for TMDATA02 {} +#[doc = "`write(|w| ..)` method takes [tmdata02::W](tmdata02::W) writer structure"] +impl crate::Writable for TMDATA02 {} #[doc = "Transmit mailbox data0 register"] pub mod tmdata02; -#[doc = "Transmit mailbox data1 register"] -pub struct TMDATA12 { - register: ::vcell::VolatileCell, -} +#[doc = "Transmit mailbox data1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tmdata12](tmdata12) module"] +pub type TMDATA12 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _TMDATA12; +#[doc = "`read()` method returns [tmdata12::R](tmdata12::R) reader structure"] +impl crate::Readable for TMDATA12 {} +#[doc = "`write(|w| ..)` method takes [tmdata12::W](tmdata12::W) writer structure"] +impl crate::Writable for TMDATA12 {} #[doc = "Transmit mailbox data1 register"] pub mod tmdata12; -#[doc = "Receive FIFO mailbox identifier register"] -pub struct RFIFOMI0 { - register: ::vcell::VolatileCell, -} +#[doc = "Receive FIFO mailbox identifier register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rfifomi0](rfifomi0) module"] +pub type RFIFOMI0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RFIFOMI0; +#[doc = "`read()` method returns [rfifomi0::R](rfifomi0::R) reader structure"] +impl crate::Readable for RFIFOMI0 {} #[doc = "Receive FIFO mailbox identifier register"] pub mod rfifomi0; -#[doc = "Receive FIFO0 mailbox property register"] -pub struct RFIFOMP0 { - register: ::vcell::VolatileCell, -} +#[doc = "Receive FIFO0 mailbox property register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rfifomp0](rfifomp0) module"] +pub type RFIFOMP0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RFIFOMP0; +#[doc = "`read()` method returns [rfifomp0::R](rfifomp0::R) reader structure"] +impl crate::Readable for RFIFOMP0 {} #[doc = "Receive FIFO0 mailbox property register"] pub mod rfifomp0; -#[doc = "Receive FIFO0 mailbox data0 register"] -pub struct RFIFOMDATA00 { - register: ::vcell::VolatileCell, -} +#[doc = "Receive FIFO0 mailbox data0 register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rfifomdata00](rfifomdata00) module"] +pub type RFIFOMDATA00 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RFIFOMDATA00; +#[doc = "`read()` method returns [rfifomdata00::R](rfifomdata00::R) reader structure"] +impl crate::Readable for RFIFOMDATA00 {} #[doc = "Receive FIFO0 mailbox data0 register"] pub mod rfifomdata00; -#[doc = "Receive FIFO0 mailbox data1 register"] -pub struct RFIFOMDATA10 { - register: ::vcell::VolatileCell, -} +#[doc = "Receive FIFO0 mailbox data1 register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rfifomdata10](rfifomdata10) module"] +pub type RFIFOMDATA10 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RFIFOMDATA10; +#[doc = "`read()` method returns [rfifomdata10::R](rfifomdata10::R) reader structure"] +impl crate::Readable for RFIFOMDATA10 {} #[doc = "Receive FIFO0 mailbox data1 register"] pub mod rfifomdata10; -#[doc = "Receive FIFO1 mailbox identifier register"] -pub struct RFIFOMI1 { - register: ::vcell::VolatileCell, -} +#[doc = "Receive FIFO1 mailbox identifier register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rfifomi1](rfifomi1) module"] +pub type RFIFOMI1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RFIFOMI1; +#[doc = "`read()` method returns [rfifomi1::R](rfifomi1::R) reader structure"] +impl crate::Readable for RFIFOMI1 {} #[doc = "Receive FIFO1 mailbox identifier register"] pub mod rfifomi1; -#[doc = "Receive FIFO1 mailbox property register"] -pub struct RFIFOMP1 { - register: ::vcell::VolatileCell, -} +#[doc = "Receive FIFO1 mailbox property register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rfifomp1](rfifomp1) module"] +pub type RFIFOMP1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RFIFOMP1; +#[doc = "`read()` method returns [rfifomp1::R](rfifomp1::R) reader structure"] +impl crate::Readable for RFIFOMP1 {} #[doc = "Receive FIFO1 mailbox property register"] pub mod rfifomp1; -#[doc = "Receive FIFO1 mailbox data0 register"] -pub struct RFIFOMDATA01 { - register: ::vcell::VolatileCell, -} +#[doc = "Receive FIFO1 mailbox data0 register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rfifomdata01](rfifomdata01) module"] +pub type RFIFOMDATA01 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RFIFOMDATA01; +#[doc = "`read()` method returns [rfifomdata01::R](rfifomdata01::R) reader structure"] +impl crate::Readable for RFIFOMDATA01 {} #[doc = "Receive FIFO1 mailbox data0 register"] pub mod rfifomdata01; -#[doc = "Receive FIFO1 mailbox data1 register"] -pub struct RFIFOMDATA11 { - register: ::vcell::VolatileCell, -} +#[doc = "Receive FIFO1 mailbox data1 register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rfifomdata11](rfifomdata11) module"] +pub type RFIFOMDATA11 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RFIFOMDATA11; +#[doc = "`read()` method returns [rfifomdata11::R](rfifomdata11::R) reader structure"] +impl crate::Readable for RFIFOMDATA11 {} #[doc = "Receive FIFO1 mailbox data1 register"] pub mod rfifomdata11; -#[doc = "Filter control register"] -pub struct FCTL { - register: ::vcell::VolatileCell, -} +#[doc = "Filter control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fctl](fctl) module"] +pub type FCTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _FCTL; +#[doc = "`read()` method returns [fctl::R](fctl::R) reader structure"] +impl crate::Readable for FCTL {} +#[doc = "`write(|w| ..)` method takes [fctl::W](fctl::W) writer structure"] +impl crate::Writable for FCTL {} #[doc = "Filter control register"] pub mod fctl; -#[doc = "Filter mode configuration register"] -pub struct FMCFG { - register: ::vcell::VolatileCell, -} +#[doc = "Filter mode configuration register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fmcfg](fmcfg) module"] +pub type FMCFG = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _FMCFG; +#[doc = "`read()` method returns [fmcfg::R](fmcfg::R) reader structure"] +impl crate::Readable for FMCFG {} +#[doc = "`write(|w| ..)` method takes [fmcfg::W](fmcfg::W) writer structure"] +impl crate::Writable for FMCFG {} #[doc = "Filter mode configuration register"] pub mod fmcfg; -#[doc = "Filter scale configuration register"] -pub struct FSCFG { - register: ::vcell::VolatileCell, -} +#[doc = "Filter scale configuration register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fscfg](fscfg) module"] +pub type FSCFG = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _FSCFG; +#[doc = "`read()` method returns [fscfg::R](fscfg::R) reader structure"] +impl crate::Readable for FSCFG {} +#[doc = "`write(|w| ..)` method takes [fscfg::W](fscfg::W) writer structure"] +impl crate::Writable for FSCFG {} #[doc = "Filter scale configuration register"] pub mod fscfg; -#[doc = "Filter associated FIFO register"] -pub struct FAFIFO { - register: ::vcell::VolatileCell, -} +#[doc = "Filter associated FIFO register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fafifo](fafifo) module"] +pub type FAFIFO = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _FAFIFO; +#[doc = "`read()` method returns [fafifo::R](fafifo::R) reader structure"] +impl crate::Readable for FAFIFO {} +#[doc = "`write(|w| ..)` method takes [fafifo::W](fafifo::W) writer structure"] +impl crate::Writable for FAFIFO {} #[doc = "Filter associated FIFO register"] pub mod fafifo; -#[doc = "Filter working register"] -pub struct FW { - register: ::vcell::VolatileCell, -} +#[doc = "Filter working register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fw](fw) module"] +pub type FW = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _FW; +#[doc = "`read()` method returns [fw::R](fw::R) reader structure"] +impl crate::Readable for FW {} +#[doc = "`write(|w| ..)` method takes [fw::W](fw::W) writer structure"] +impl crate::Writable for FW {} #[doc = "Filter working register"] pub mod fw; -#[doc = "Filter 0 data 0 register"] -pub struct F0DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 0 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f0data0](f0data0) module"] +pub type F0DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F0DATA0; +#[doc = "`read()` method returns [f0data0::R](f0data0::R) reader structure"] +impl crate::Readable for F0DATA0 {} +#[doc = "`write(|w| ..)` method takes [f0data0::W](f0data0::W) writer structure"] +impl crate::Writable for F0DATA0 {} #[doc = "Filter 0 data 0 register"] pub mod f0data0; -#[doc = "Filter 0 data 1 register"] -pub struct F0DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 0 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f0data1](f0data1) module"] +pub type F0DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F0DATA1; +#[doc = "`read()` method returns [f0data1::R](f0data1::R) reader structure"] +impl crate::Readable for F0DATA1 {} +#[doc = "`write(|w| ..)` method takes [f0data1::W](f0data1::W) writer structure"] +impl crate::Writable for F0DATA1 {} #[doc = "Filter 0 data 1 register"] pub mod f0data1; -#[doc = "Filter 1 data 0 register"] -pub struct F1DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 1 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f1data0](f1data0) module"] +pub type F1DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F1DATA0; +#[doc = "`read()` method returns [f1data0::R](f1data0::R) reader structure"] +impl crate::Readable for F1DATA0 {} +#[doc = "`write(|w| ..)` method takes [f1data0::W](f1data0::W) writer structure"] +impl crate::Writable for F1DATA0 {} #[doc = "Filter 1 data 0 register"] pub mod f1data0; -#[doc = "Filter 1 data 1 register"] -pub struct F1DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 1 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f1data1](f1data1) module"] +pub type F1DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F1DATA1; +#[doc = "`read()` method returns [f1data1::R](f1data1::R) reader structure"] +impl crate::Readable for F1DATA1 {} +#[doc = "`write(|w| ..)` method takes [f1data1::W](f1data1::W) writer structure"] +impl crate::Writable for F1DATA1 {} #[doc = "Filter 1 data 1 register"] pub mod f1data1; -#[doc = "Filter 2 data 0 register"] -pub struct F2DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 2 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f2data0](f2data0) module"] +pub type F2DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F2DATA0; +#[doc = "`read()` method returns [f2data0::R](f2data0::R) reader structure"] +impl crate::Readable for F2DATA0 {} +#[doc = "`write(|w| ..)` method takes [f2data0::W](f2data0::W) writer structure"] +impl crate::Writable for F2DATA0 {} #[doc = "Filter 2 data 0 register"] pub mod f2data0; -#[doc = "Filter 2 data 1 register"] -pub struct F2DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 2 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f2data1](f2data1) module"] +pub type F2DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F2DATA1; +#[doc = "`read()` method returns [f2data1::R](f2data1::R) reader structure"] +impl crate::Readable for F2DATA1 {} +#[doc = "`write(|w| ..)` method takes [f2data1::W](f2data1::W) writer structure"] +impl crate::Writable for F2DATA1 {} #[doc = "Filter 2 data 1 register"] pub mod f2data1; -#[doc = "Filter 3 data 0 register"] -pub struct F3DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 3 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f3data0](f3data0) module"] +pub type F3DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F3DATA0; +#[doc = "`read()` method returns [f3data0::R](f3data0::R) reader structure"] +impl crate::Readable for F3DATA0 {} +#[doc = "`write(|w| ..)` method takes [f3data0::W](f3data0::W) writer structure"] +impl crate::Writable for F3DATA0 {} #[doc = "Filter 3 data 0 register"] pub mod f3data0; -#[doc = "Filter 3 data 1 register"] -pub struct F3DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 3 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f3data1](f3data1) module"] +pub type F3DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F3DATA1; +#[doc = "`read()` method returns [f3data1::R](f3data1::R) reader structure"] +impl crate::Readable for F3DATA1 {} +#[doc = "`write(|w| ..)` method takes [f3data1::W](f3data1::W) writer structure"] +impl crate::Writable for F3DATA1 {} #[doc = "Filter 3 data 1 register"] pub mod f3data1; -#[doc = "Filter 4 data 0 register"] -pub struct F4DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 4 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f4data0](f4data0) module"] +pub type F4DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F4DATA0; +#[doc = "`read()` method returns [f4data0::R](f4data0::R) reader structure"] +impl crate::Readable for F4DATA0 {} +#[doc = "`write(|w| ..)` method takes [f4data0::W](f4data0::W) writer structure"] +impl crate::Writable for F4DATA0 {} #[doc = "Filter 4 data 0 register"] pub mod f4data0; -#[doc = "Filter 4 data 1 register"] -pub struct F4DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 4 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f4data1](f4data1) module"] +pub type F4DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F4DATA1; +#[doc = "`read()` method returns [f4data1::R](f4data1::R) reader structure"] +impl crate::Readable for F4DATA1 {} +#[doc = "`write(|w| ..)` method takes [f4data1::W](f4data1::W) writer structure"] +impl crate::Writable for F4DATA1 {} #[doc = "Filter 4 data 1 register"] pub mod f4data1; -#[doc = "Filter 5 data 0 register"] -pub struct F5DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 5 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f5data0](f5data0) module"] +pub type F5DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F5DATA0; +#[doc = "`read()` method returns [f5data0::R](f5data0::R) reader structure"] +impl crate::Readable for F5DATA0 {} +#[doc = "`write(|w| ..)` method takes [f5data0::W](f5data0::W) writer structure"] +impl crate::Writable for F5DATA0 {} #[doc = "Filter 5 data 0 register"] pub mod f5data0; -#[doc = "Filter 5 data 1 register"] -pub struct F5DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 5 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f5data1](f5data1) module"] +pub type F5DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F5DATA1; +#[doc = "`read()` method returns [f5data1::R](f5data1::R) reader structure"] +impl crate::Readable for F5DATA1 {} +#[doc = "`write(|w| ..)` method takes [f5data1::W](f5data1::W) writer structure"] +impl crate::Writable for F5DATA1 {} #[doc = "Filter 5 data 1 register"] pub mod f5data1; -#[doc = "Filter 6 data 0 register"] -pub struct F6DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 6 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f6data0](f6data0) module"] +pub type F6DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F6DATA0; +#[doc = "`read()` method returns [f6data0::R](f6data0::R) reader structure"] +impl crate::Readable for F6DATA0 {} +#[doc = "`write(|w| ..)` method takes [f6data0::W](f6data0::W) writer structure"] +impl crate::Writable for F6DATA0 {} #[doc = "Filter 6 data 0 register"] pub mod f6data0; -#[doc = "Filter 6 data 1 register"] -pub struct F6DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 6 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f6data1](f6data1) module"] +pub type F6DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F6DATA1; +#[doc = "`read()` method returns [f6data1::R](f6data1::R) reader structure"] +impl crate::Readable for F6DATA1 {} +#[doc = "`write(|w| ..)` method takes [f6data1::W](f6data1::W) writer structure"] +impl crate::Writable for F6DATA1 {} #[doc = "Filter 6 data 1 register"] pub mod f6data1; -#[doc = "Filter 7 data 0 register"] -pub struct F7DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 7 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f7data0](f7data0) module"] +pub type F7DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F7DATA0; +#[doc = "`read()` method returns [f7data0::R](f7data0::R) reader structure"] +impl crate::Readable for F7DATA0 {} +#[doc = "`write(|w| ..)` method takes [f7data0::W](f7data0::W) writer structure"] +impl crate::Writable for F7DATA0 {} #[doc = "Filter 7 data 0 register"] pub mod f7data0; -#[doc = "Filter 7 data 1 register"] -pub struct F7DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 7 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f7data1](f7data1) module"] +pub type F7DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F7DATA1; +#[doc = "`read()` method returns [f7data1::R](f7data1::R) reader structure"] +impl crate::Readable for F7DATA1 {} +#[doc = "`write(|w| ..)` method takes [f7data1::W](f7data1::W) writer structure"] +impl crate::Writable for F7DATA1 {} #[doc = "Filter 7 data 1 register"] pub mod f7data1; -#[doc = "Filter 8 data 0 register"] -pub struct F8DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 8 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f8data0](f8data0) module"] +pub type F8DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F8DATA0; +#[doc = "`read()` method returns [f8data0::R](f8data0::R) reader structure"] +impl crate::Readable for F8DATA0 {} +#[doc = "`write(|w| ..)` method takes [f8data0::W](f8data0::W) writer structure"] +impl crate::Writable for F8DATA0 {} #[doc = "Filter 8 data 0 register"] pub mod f8data0; -#[doc = "Filter 8 data 1 register"] -pub struct F8DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 8 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f8data1](f8data1) module"] +pub type F8DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F8DATA1; +#[doc = "`read()` method returns [f8data1::R](f8data1::R) reader structure"] +impl crate::Readable for F8DATA1 {} +#[doc = "`write(|w| ..)` method takes [f8data1::W](f8data1::W) writer structure"] +impl crate::Writable for F8DATA1 {} #[doc = "Filter 8 data 1 register"] pub mod f8data1; -#[doc = "Filter 9 data 0 register"] -pub struct F9DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 9 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f9data0](f9data0) module"] +pub type F9DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F9DATA0; +#[doc = "`read()` method returns [f9data0::R](f9data0::R) reader structure"] +impl crate::Readable for F9DATA0 {} +#[doc = "`write(|w| ..)` method takes [f9data0::W](f9data0::W) writer structure"] +impl crate::Writable for F9DATA0 {} #[doc = "Filter 9 data 0 register"] pub mod f9data0; -#[doc = "Filter 9 data 1 register"] -pub struct F9DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 9 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f9data1](f9data1) module"] +pub type F9DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F9DATA1; +#[doc = "`read()` method returns [f9data1::R](f9data1::R) reader structure"] +impl crate::Readable for F9DATA1 {} +#[doc = "`write(|w| ..)` method takes [f9data1::W](f9data1::W) writer structure"] +impl crate::Writable for F9DATA1 {} #[doc = "Filter 9 data 1 register"] pub mod f9data1; -#[doc = "Filter 10 data 0 register"] -pub struct F10DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 10 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f10data0](f10data0) module"] +pub type F10DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F10DATA0; +#[doc = "`read()` method returns [f10data0::R](f10data0::R) reader structure"] +impl crate::Readable for F10DATA0 {} +#[doc = "`write(|w| ..)` method takes [f10data0::W](f10data0::W) writer structure"] +impl crate::Writable for F10DATA0 {} #[doc = "Filter 10 data 0 register"] pub mod f10data0; -#[doc = "Filter 10 data 1 register"] -pub struct F10DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 10 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f10data1](f10data1) module"] +pub type F10DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F10DATA1; +#[doc = "`read()` method returns [f10data1::R](f10data1::R) reader structure"] +impl crate::Readable for F10DATA1 {} +#[doc = "`write(|w| ..)` method takes [f10data1::W](f10data1::W) writer structure"] +impl crate::Writable for F10DATA1 {} #[doc = "Filter 10 data 1 register"] pub mod f10data1; -#[doc = "Filter 11 data 0 register"] -pub struct F11DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 11 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f11data0](f11data0) module"] +pub type F11DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F11DATA0; +#[doc = "`read()` method returns [f11data0::R](f11data0::R) reader structure"] +impl crate::Readable for F11DATA0 {} +#[doc = "`write(|w| ..)` method takes [f11data0::W](f11data0::W) writer structure"] +impl crate::Writable for F11DATA0 {} #[doc = "Filter 11 data 0 register"] pub mod f11data0; -#[doc = "Filter 11 data 1 register"] -pub struct F11DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 11 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f11data1](f11data1) module"] +pub type F11DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F11DATA1; +#[doc = "`read()` method returns [f11data1::R](f11data1::R) reader structure"] +impl crate::Readable for F11DATA1 {} +#[doc = "`write(|w| ..)` method takes [f11data1::W](f11data1::W) writer structure"] +impl crate::Writable for F11DATA1 {} #[doc = "Filter 11 data 1 register"] pub mod f11data1; -#[doc = "Filter 12 data 0 register"] -pub struct F12DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 12 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f12data0](f12data0) module"] +pub type F12DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F12DATA0; +#[doc = "`read()` method returns [f12data0::R](f12data0::R) reader structure"] +impl crate::Readable for F12DATA0 {} +#[doc = "`write(|w| ..)` method takes [f12data0::W](f12data0::W) writer structure"] +impl crate::Writable for F12DATA0 {} #[doc = "Filter 12 data 0 register"] pub mod f12data0; -#[doc = "Filter 12 data 1 register"] -pub struct F12DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 12 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f12data1](f12data1) module"] +pub type F12DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F12DATA1; +#[doc = "`read()` method returns [f12data1::R](f12data1::R) reader structure"] +impl crate::Readable for F12DATA1 {} +#[doc = "`write(|w| ..)` method takes [f12data1::W](f12data1::W) writer structure"] +impl crate::Writable for F12DATA1 {} #[doc = "Filter 12 data 1 register"] pub mod f12data1; -#[doc = "Filter 13 data 0 register"] -pub struct F13DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 13 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f13data0](f13data0) module"] +pub type F13DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F13DATA0; +#[doc = "`read()` method returns [f13data0::R](f13data0::R) reader structure"] +impl crate::Readable for F13DATA0 {} +#[doc = "`write(|w| ..)` method takes [f13data0::W](f13data0::W) writer structure"] +impl crate::Writable for F13DATA0 {} #[doc = "Filter 13 data 0 register"] pub mod f13data0; -#[doc = "Filter 13 data 1 register"] -pub struct F13DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 13 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f13data1](f13data1) module"] +pub type F13DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F13DATA1; +#[doc = "`read()` method returns [f13data1::R](f13data1::R) reader structure"] +impl crate::Readable for F13DATA1 {} +#[doc = "`write(|w| ..)` method takes [f13data1::W](f13data1::W) writer structure"] +impl crate::Writable for F13DATA1 {} #[doc = "Filter 13 data 1 register"] pub mod f13data1; -#[doc = "Filter 14 data 0 register"] -pub struct F14DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 14 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f14data0](f14data0) module"] +pub type F14DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F14DATA0; +#[doc = "`read()` method returns [f14data0::R](f14data0::R) reader structure"] +impl crate::Readable for F14DATA0 {} +#[doc = "`write(|w| ..)` method takes [f14data0::W](f14data0::W) writer structure"] +impl crate::Writable for F14DATA0 {} #[doc = "Filter 14 data 0 register"] pub mod f14data0; -#[doc = "Filter 14 data 1 register"] -pub struct F14DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 14 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f14data1](f14data1) module"] +pub type F14DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F14DATA1; +#[doc = "`read()` method returns [f14data1::R](f14data1::R) reader structure"] +impl crate::Readable for F14DATA1 {} +#[doc = "`write(|w| ..)` method takes [f14data1::W](f14data1::W) writer structure"] +impl crate::Writable for F14DATA1 {} #[doc = "Filter 14 data 1 register"] pub mod f14data1; -#[doc = "Filter 15 data 0 register"] -pub struct F15DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 15 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f15data0](f15data0) module"] +pub type F15DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F15DATA0; +#[doc = "`read()` method returns [f15data0::R](f15data0::R) reader structure"] +impl crate::Readable for F15DATA0 {} +#[doc = "`write(|w| ..)` method takes [f15data0::W](f15data0::W) writer structure"] +impl crate::Writable for F15DATA0 {} #[doc = "Filter 15 data 0 register"] pub mod f15data0; -#[doc = "Filter 15 data 1 register"] -pub struct F15DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 15 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f15data1](f15data1) module"] +pub type F15DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F15DATA1; +#[doc = "`read()` method returns [f15data1::R](f15data1::R) reader structure"] +impl crate::Readable for F15DATA1 {} +#[doc = "`write(|w| ..)` method takes [f15data1::W](f15data1::W) writer structure"] +impl crate::Writable for F15DATA1 {} #[doc = "Filter 15 data 1 register"] pub mod f15data1; -#[doc = "Filter 16 data 0 register"] -pub struct F16DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 16 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f16data0](f16data0) module"] +pub type F16DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F16DATA0; +#[doc = "`read()` method returns [f16data0::R](f16data0::R) reader structure"] +impl crate::Readable for F16DATA0 {} +#[doc = "`write(|w| ..)` method takes [f16data0::W](f16data0::W) writer structure"] +impl crate::Writable for F16DATA0 {} #[doc = "Filter 16 data 0 register"] pub mod f16data0; -#[doc = "Filter 16 data 1 register"] -pub struct F16DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 16 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f16data1](f16data1) module"] +pub type F16DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F16DATA1; +#[doc = "`read()` method returns [f16data1::R](f16data1::R) reader structure"] +impl crate::Readable for F16DATA1 {} +#[doc = "`write(|w| ..)` method takes [f16data1::W](f16data1::W) writer structure"] +impl crate::Writable for F16DATA1 {} #[doc = "Filter 16 data 1 register"] pub mod f16data1; -#[doc = "Filter 17 data 0 register"] -pub struct F17DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 17 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f17data0](f17data0) module"] +pub type F17DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F17DATA0; +#[doc = "`read()` method returns [f17data0::R](f17data0::R) reader structure"] +impl crate::Readable for F17DATA0 {} +#[doc = "`write(|w| ..)` method takes [f17data0::W](f17data0::W) writer structure"] +impl crate::Writable for F17DATA0 {} #[doc = "Filter 17 data 0 register"] pub mod f17data0; -#[doc = "Filter 17 data 1 register"] -pub struct F17DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 17 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f17data1](f17data1) module"] +pub type F17DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F17DATA1; +#[doc = "`read()` method returns [f17data1::R](f17data1::R) reader structure"] +impl crate::Readable for F17DATA1 {} +#[doc = "`write(|w| ..)` method takes [f17data1::W](f17data1::W) writer structure"] +impl crate::Writable for F17DATA1 {} #[doc = "Filter 17 data 1 register"] pub mod f17data1; -#[doc = "Filter 18 data 0 register"] -pub struct F18DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 18 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f18data0](f18data0) module"] +pub type F18DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F18DATA0; +#[doc = "`read()` method returns [f18data0::R](f18data0::R) reader structure"] +impl crate::Readable for F18DATA0 {} +#[doc = "`write(|w| ..)` method takes [f18data0::W](f18data0::W) writer structure"] +impl crate::Writable for F18DATA0 {} #[doc = "Filter 18 data 0 register"] pub mod f18data0; -#[doc = "Filter 18 data 1 register"] -pub struct F18DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 18 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f18data1](f18data1) module"] +pub type F18DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F18DATA1; +#[doc = "`read()` method returns [f18data1::R](f18data1::R) reader structure"] +impl crate::Readable for F18DATA1 {} +#[doc = "`write(|w| ..)` method takes [f18data1::W](f18data1::W) writer structure"] +impl crate::Writable for F18DATA1 {} #[doc = "Filter 18 data 1 register"] pub mod f18data1; -#[doc = "Filter 19 data 0 register"] -pub struct F19DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 19 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f19data0](f19data0) module"] +pub type F19DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F19DATA0; +#[doc = "`read()` method returns [f19data0::R](f19data0::R) reader structure"] +impl crate::Readable for F19DATA0 {} +#[doc = "`write(|w| ..)` method takes [f19data0::W](f19data0::W) writer structure"] +impl crate::Writable for F19DATA0 {} #[doc = "Filter 19 data 0 register"] pub mod f19data0; -#[doc = "Filter 19 data 1 register"] -pub struct F19DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 19 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f19data1](f19data1) module"] +pub type F19DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F19DATA1; +#[doc = "`read()` method returns [f19data1::R](f19data1::R) reader structure"] +impl crate::Readable for F19DATA1 {} +#[doc = "`write(|w| ..)` method takes [f19data1::W](f19data1::W) writer structure"] +impl crate::Writable for F19DATA1 {} #[doc = "Filter 19 data 1 register"] pub mod f19data1; -#[doc = "Filter 20 data 0 register"] -pub struct F20DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 20 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f20data0](f20data0) module"] +pub type F20DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F20DATA0; +#[doc = "`read()` method returns [f20data0::R](f20data0::R) reader structure"] +impl crate::Readable for F20DATA0 {} +#[doc = "`write(|w| ..)` method takes [f20data0::W](f20data0::W) writer structure"] +impl crate::Writable for F20DATA0 {} #[doc = "Filter 20 data 0 register"] pub mod f20data0; -#[doc = "Filter 20 data 1 register"] -pub struct F20DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 20 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f20data1](f20data1) module"] +pub type F20DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F20DATA1; +#[doc = "`read()` method returns [f20data1::R](f20data1::R) reader structure"] +impl crate::Readable for F20DATA1 {} +#[doc = "`write(|w| ..)` method takes [f20data1::W](f20data1::W) writer structure"] +impl crate::Writable for F20DATA1 {} #[doc = "Filter 20 data 1 register"] pub mod f20data1; -#[doc = "Filter 21 data 0 register"] -pub struct F21DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 21 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f21data0](f21data0) module"] +pub type F21DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F21DATA0; +#[doc = "`read()` method returns [f21data0::R](f21data0::R) reader structure"] +impl crate::Readable for F21DATA0 {} +#[doc = "`write(|w| ..)` method takes [f21data0::W](f21data0::W) writer structure"] +impl crate::Writable for F21DATA0 {} #[doc = "Filter 21 data 0 register"] pub mod f21data0; -#[doc = "Filter 21 data 1 register"] -pub struct F21DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 21 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f21data1](f21data1) module"] +pub type F21DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F21DATA1; +#[doc = "`read()` method returns [f21data1::R](f21data1::R) reader structure"] +impl crate::Readable for F21DATA1 {} +#[doc = "`write(|w| ..)` method takes [f21data1::W](f21data1::W) writer structure"] +impl crate::Writable for F21DATA1 {} #[doc = "Filter 21 data 1 register"] pub mod f21data1; -#[doc = "Filter 22 data 0 register"] -pub struct F22DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 22 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f22data0](f22data0) module"] +pub type F22DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F22DATA0; +#[doc = "`read()` method returns [f22data0::R](f22data0::R) reader structure"] +impl crate::Readable for F22DATA0 {} +#[doc = "`write(|w| ..)` method takes [f22data0::W](f22data0::W) writer structure"] +impl crate::Writable for F22DATA0 {} #[doc = "Filter 22 data 0 register"] pub mod f22data0; -#[doc = "Filter 22 data 1 register"] -pub struct F22DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 22 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f22data1](f22data1) module"] +pub type F22DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F22DATA1; +#[doc = "`read()` method returns [f22data1::R](f22data1::R) reader structure"] +impl crate::Readable for F22DATA1 {} +#[doc = "`write(|w| ..)` method takes [f22data1::W](f22data1::W) writer structure"] +impl crate::Writable for F22DATA1 {} #[doc = "Filter 22 data 1 register"] pub mod f22data1; -#[doc = "Filter 23 data 0 register"] -pub struct F23DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 23 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f23data0](f23data0) module"] +pub type F23DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F23DATA0; +#[doc = "`read()` method returns [f23data0::R](f23data0::R) reader structure"] +impl crate::Readable for F23DATA0 {} +#[doc = "`write(|w| ..)` method takes [f23data0::W](f23data0::W) writer structure"] +impl crate::Writable for F23DATA0 {} #[doc = "Filter 23 data 0 register"] pub mod f23data0; -#[doc = "Filter 23 data 1 register"] -pub struct F23DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 23 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f23data1](f23data1) module"] +pub type F23DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F23DATA1; +#[doc = "`read()` method returns [f23data1::R](f23data1::R) reader structure"] +impl crate::Readable for F23DATA1 {} +#[doc = "`write(|w| ..)` method takes [f23data1::W](f23data1::W) writer structure"] +impl crate::Writable for F23DATA1 {} #[doc = "Filter 23 data 1 register"] pub mod f23data1; -#[doc = "Filter 24 data 0 register"] -pub struct F24DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 24 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f24data0](f24data0) module"] +pub type F24DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F24DATA0; +#[doc = "`read()` method returns [f24data0::R](f24data0::R) reader structure"] +impl crate::Readable for F24DATA0 {} +#[doc = "`write(|w| ..)` method takes [f24data0::W](f24data0::W) writer structure"] +impl crate::Writable for F24DATA0 {} #[doc = "Filter 24 data 0 register"] pub mod f24data0; -#[doc = "Filter 24 data 1 register"] -pub struct F24DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 24 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f24data1](f24data1) module"] +pub type F24DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F24DATA1; +#[doc = "`read()` method returns [f24data1::R](f24data1::R) reader structure"] +impl crate::Readable for F24DATA1 {} +#[doc = "`write(|w| ..)` method takes [f24data1::W](f24data1::W) writer structure"] +impl crate::Writable for F24DATA1 {} #[doc = "Filter 24 data 1 register"] pub mod f24data1; -#[doc = "Filter 25 data 0 register"] -pub struct F25DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 25 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f25data0](f25data0) module"] +pub type F25DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F25DATA0; +#[doc = "`read()` method returns [f25data0::R](f25data0::R) reader structure"] +impl crate::Readable for F25DATA0 {} +#[doc = "`write(|w| ..)` method takes [f25data0::W](f25data0::W) writer structure"] +impl crate::Writable for F25DATA0 {} #[doc = "Filter 25 data 0 register"] pub mod f25data0; -#[doc = "Filter 25 data 1 register"] -pub struct F25DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 25 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f25data1](f25data1) module"] +pub type F25DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F25DATA1; +#[doc = "`read()` method returns [f25data1::R](f25data1::R) reader structure"] +impl crate::Readable for F25DATA1 {} +#[doc = "`write(|w| ..)` method takes [f25data1::W](f25data1::W) writer structure"] +impl crate::Writable for F25DATA1 {} #[doc = "Filter 25 data 1 register"] pub mod f25data1; -#[doc = "Filter 26 data 0 register"] -pub struct F26DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 26 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f26data0](f26data0) module"] +pub type F26DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F26DATA0; +#[doc = "`read()` method returns [f26data0::R](f26data0::R) reader structure"] +impl crate::Readable for F26DATA0 {} +#[doc = "`write(|w| ..)` method takes [f26data0::W](f26data0::W) writer structure"] +impl crate::Writable for F26DATA0 {} #[doc = "Filter 26 data 0 register"] pub mod f26data0; -#[doc = "Filter 26 data 1 register"] -pub struct F26DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 26 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f26data1](f26data1) module"] +pub type F26DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F26DATA1; +#[doc = "`read()` method returns [f26data1::R](f26data1::R) reader structure"] +impl crate::Readable for F26DATA1 {} +#[doc = "`write(|w| ..)` method takes [f26data1::W](f26data1::W) writer structure"] +impl crate::Writable for F26DATA1 {} #[doc = "Filter 26 data 1 register"] pub mod f26data1; -#[doc = "Filter 27 data 0 register"] -pub struct F27DATA0 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 27 data 0 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f27data0](f27data0) module"] +pub type F27DATA0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F27DATA0; +#[doc = "`read()` method returns [f27data0::R](f27data0::R) reader structure"] +impl crate::Readable for F27DATA0 {} +#[doc = "`write(|w| ..)` method takes [f27data0::W](f27data0::W) writer structure"] +impl crate::Writable for F27DATA0 {} #[doc = "Filter 27 data 0 register"] pub mod f27data0; -#[doc = "Filter 27 data 1 register"] -pub struct F27DATA1 { - register: ::vcell::VolatileCell, -} +#[doc = "Filter 27 data 1 register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [f27data1](f27data1) module"] +pub type F27DATA1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _F27DATA1; +#[doc = "`read()` method returns [f27data1::R](f27data1::R) reader structure"] +impl crate::Readable for F27DATA1 {} +#[doc = "`write(|w| ..)` method takes [f27data1::W](f27data1::W) writer structure"] +impl crate::Writable for F27DATA1 {} #[doc = "Filter 27 data 1 register"] pub mod f27data1; diff --git a/src/can0/bt.rs b/src/can0/bt.rs index 7a6f4b7c2cdb7e98171af0b27b2f2d81874a8af2..11b8de4c596978f7c7a4273bcd7d67589d1d7689 100644 --- a/src/can0/bt.rs +++ b/src/can0/bt.rs @@ -1,346 +1,180 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::BT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SCMODR { - bits: bool, -} -impl SCMODR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LCMODR { - bits: bool, -} -impl LCMODR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SJWR { - bits: u8, -} -impl SJWR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct BS2R { - bits: u8, -} -impl BS2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct BS1R { - bits: u8, -} -impl BS1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct BAUDPSCR { - bits: u16, -} -impl BAUDPSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _SCMODW<'a> { +#[doc = "Reader of register BT"] +pub type R = crate::R; +#[doc = "Writer for register BT"] +pub type W = crate::W; +#[doc = "Register BT `reset()`'s with value 0x0123_0000"] +impl crate::ResetValue for super::BT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0123_0000 + } +} +#[doc = "Reader of field `SCMOD`"] +pub type SCMOD_R = crate::R; +#[doc = "Write proxy for field `SCMOD`"] +pub struct SCMOD_W<'a> { w: &'a mut W, } -impl<'a> _SCMODW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SCMOD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } -#[doc = r" Proxy"] -pub struct _LCMODW<'a> { +#[doc = "Reader of field `LCMOD`"] +pub type LCMOD_R = crate::R; +#[doc = "Write proxy for field `LCMOD`"] +pub struct LCMOD_W<'a> { w: &'a mut W, } -impl<'a> _LCMODW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LCMOD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _SJWW<'a> { +#[doc = "Reader of field `SJW`"] +pub type SJW_R = crate::R; +#[doc = "Write proxy for field `SJW`"] +pub struct SJW_W<'a> { w: &'a mut W, } -impl<'a> _SJWW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SJW_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 24)) | (((value as u32) & 0x03) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _BS2W<'a> { +#[doc = "Reader of field `BS2`"] +pub type BS2_R = crate::R; +#[doc = "Write proxy for field `BS2`"] +pub struct BS2_W<'a> { w: &'a mut W, } -impl<'a> _BS2W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> BS2_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 20)) | (((value as u32) & 0x07) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _BS1W<'a> { +#[doc = "Reader of field `BS1`"] +pub type BS1_R = crate::R; +#[doc = "Write proxy for field `BS1`"] +pub struct BS1_W<'a> { w: &'a mut W, } -impl<'a> _BS1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> BS1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 16)) | (((value as u32) & 0x0f) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _BAUDPSCW<'a> { +#[doc = "Reader of field `BAUDPSC`"] +pub type BAUDPSC_R = crate::R; +#[doc = "Write proxy for field `BAUDPSC`"] +pub struct BAUDPSC_W<'a> { w: &'a mut W, } -impl<'a> _BAUDPSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> BAUDPSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x03ff) | ((value as u32) & 0x03ff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 31 - Silent communication mode"] - #[inline] - pub fn scmod(&self) -> SCMODR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SCMODR { bits } + #[inline(always)] + pub fn scmod(&self) -> SCMOD_R { + SCMOD_R::new(((self.bits >> 31) & 0x01) != 0) } #[doc = "Bit 30 - Loopback communication mode"] - #[inline] - pub fn lcmod(&self) -> LCMODR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LCMODR { bits } + #[inline(always)] + pub fn lcmod(&self) -> LCMOD_R { + LCMOD_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bits 24:25 - Resynchronization jump width"] - #[inline] - pub fn sjw(&self) -> SJWR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SJWR { bits } + #[inline(always)] + pub fn sjw(&self) -> SJW_R { + SJW_R::new(((self.bits >> 24) & 0x03) as u8) } #[doc = "Bits 20:22 - Bit segment 2"] - #[inline] - pub fn bs2(&self) -> BS2R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - BS2R { bits } + #[inline(always)] + pub fn bs2(&self) -> BS2_R { + BS2_R::new(((self.bits >> 20) & 0x07) as u8) } #[doc = "Bits 16:19 - Bit segment 1"] - #[inline] - pub fn bs1(&self) -> BS1R { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - BS1R { bits } + #[inline(always)] + pub fn bs1(&self) -> BS1_R { + BS1_R::new(((self.bits >> 16) & 0x0f) as u8) } #[doc = "Bits 0:9 - Baud rate prescaler"] - #[inline] - pub fn baudpsc(&self) -> BAUDPSCR { - let bits = { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - BAUDPSCR { bits } + #[inline(always)] + pub fn baudpsc(&self) -> BAUDPSC_R { + BAUDPSC_R::new((self.bits & 0x03ff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0123_0000 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 31 - Silent communication mode"] - #[inline] - pub fn scmod(&mut self) -> _SCMODW { - _SCMODW { w: self } + #[inline(always)] + pub fn scmod(&mut self) -> SCMOD_W { + SCMOD_W { w: self } } #[doc = "Bit 30 - Loopback communication mode"] - #[inline] - pub fn lcmod(&mut self) -> _LCMODW { - _LCMODW { w: self } + #[inline(always)] + pub fn lcmod(&mut self) -> LCMOD_W { + LCMOD_W { w: self } } #[doc = "Bits 24:25 - Resynchronization jump width"] - #[inline] - pub fn sjw(&mut self) -> _SJWW { - _SJWW { w: self } + #[inline(always)] + pub fn sjw(&mut self) -> SJW_W { + SJW_W { w: self } } #[doc = "Bits 20:22 - Bit segment 2"] - #[inline] - pub fn bs2(&mut self) -> _BS2W { - _BS2W { w: self } + #[inline(always)] + pub fn bs2(&mut self) -> BS2_W { + BS2_W { w: self } } #[doc = "Bits 16:19 - Bit segment 1"] - #[inline] - pub fn bs1(&mut self) -> _BS1W { - _BS1W { w: self } + #[inline(always)] + pub fn bs1(&mut self) -> BS1_W { + BS1_W { w: self } } #[doc = "Bits 0:9 - Baud rate prescaler"] - #[inline] - pub fn baudpsc(&mut self) -> _BAUDPSCW { - _BAUDPSCW { w: self } + #[inline(always)] + pub fn baudpsc(&mut self) -> BAUDPSC_W { + BAUDPSC_W { w: self } } } diff --git a/src/can0/ctl.rs b/src/can0/ctl.rs index ce77bf2c2b483ac80e9310df031efb94b81560fd..3cf72bfc518f15b673dd77ef81b2f71213f973cc 100644 --- a/src/can0/ctl.rs +++ b/src/can0/ctl.rs @@ -1,654 +1,356 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DFZR { - bits: bool, -} -impl DFZR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWRSTR { - bits: bool, -} -impl SWRSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TTCR { - bits: bool, -} -impl TTCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ABORR { - bits: bool, -} -impl ABORR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct AWUR { - bits: bool, -} -impl AWUR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ARDR { - bits: bool, -} -impl ARDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RFODR { - bits: bool, -} -impl RFODR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TFOR { - bits: bool, -} -impl TFOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SLPWMODR { - bits: bool, -} -impl SLPWMODR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IWMODR { - bits: bool, -} -impl IWMODR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _DFZW<'a> { +#[doc = "Reader of register CTL"] +pub type R = crate::R; +#[doc = "Writer for register CTL"] +pub type W = crate::W; +#[doc = "Register CTL `reset()`'s with value 0x0001_0002"] +impl crate::ResetValue for super::CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0001_0002 + } +} +#[doc = "Reader of field `DFZ`"] +pub type DFZ_R = crate::R; +#[doc = "Write proxy for field `DFZ`"] +pub struct DFZ_W<'a> { w: &'a mut W, } -impl<'a> _DFZW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DFZ_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _SWRSTW<'a> { +#[doc = "Reader of field `SWRST`"] +pub type SWRST_R = crate::R; +#[doc = "Write proxy for field `SWRST`"] +pub struct SWRST_W<'a> { w: &'a mut W, } -impl<'a> _SWRSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWRST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _TTCW<'a> { +#[doc = "Reader of field `TTC`"] +pub type TTC_R = crate::R; +#[doc = "Write proxy for field `TTC`"] +pub struct TTC_W<'a> { w: &'a mut W, } -impl<'a> _TTCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TTC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _ABORW<'a> { +#[doc = "Reader of field `ABOR`"] +pub type ABOR_R = crate::R; +#[doc = "Write proxy for field `ABOR`"] +pub struct ABOR_W<'a> { w: &'a mut W, } -impl<'a> _ABORW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ABOR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _AWUW<'a> { +#[doc = "Reader of field `AWU`"] +pub type AWU_R = crate::R; +#[doc = "Write proxy for field `AWU`"] +pub struct AWU_W<'a> { w: &'a mut W, } -impl<'a> _AWUW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> AWU_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _ARDW<'a> { +#[doc = "Reader of field `ARD`"] +pub type ARD_R = crate::R; +#[doc = "Write proxy for field `ARD`"] +pub struct ARD_W<'a> { w: &'a mut W, } -impl<'a> _ARDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ARD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _RFODW<'a> { +#[doc = "Reader of field `RFOD`"] +pub type RFOD_R = crate::R; +#[doc = "Write proxy for field `RFOD`"] +pub struct RFOD_W<'a> { w: &'a mut W, } -impl<'a> _RFODW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RFOD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _TFOW<'a> { +#[doc = "Reader of field `TFO`"] +pub type TFO_R = crate::R; +#[doc = "Write proxy for field `TFO`"] +pub struct TFO_W<'a> { w: &'a mut W, } -impl<'a> _TFOW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TFO_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _SLPWMODW<'a> { +#[doc = "Reader of field `SLPWMOD`"] +pub type SLPWMOD_R = crate::R; +#[doc = "Write proxy for field `SLPWMOD`"] +pub struct SLPWMOD_W<'a> { w: &'a mut W, } -impl<'a> _SLPWMODW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SLPWMOD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _IWMODW<'a> { +#[doc = "Reader of field `IWMOD`"] +pub type IWMOD_R = crate::R; +#[doc = "Write proxy for field `IWMOD`"] +pub struct IWMOD_W<'a> { w: &'a mut W, } -impl<'a> _IWMODW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IWMOD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 16 - Debug freeze"] - #[inline] - pub fn dfz(&self) -> DFZR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DFZR { bits } + #[inline(always)] + pub fn dfz(&self) -> DFZ_R { + DFZ_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 15 - Software reset"] - #[inline] - pub fn swrst(&self) -> SWRSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWRSTR { bits } + #[inline(always)] + pub fn swrst(&self) -> SWRST_R { + SWRST_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 7 - Time-triggered communication"] - #[inline] - pub fn ttc(&self) -> TTCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TTCR { bits } + #[inline(always)] + pub fn ttc(&self) -> TTC_R { + TTC_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Automatic bus-off recovery"] - #[inline] - pub fn abor(&self) -> ABORR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ABORR { bits } + #[inline(always)] + pub fn abor(&self) -> ABOR_R { + ABOR_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Automatic wakeup"] - #[inline] - pub fn awu(&self) -> AWUR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - AWUR { bits } + #[inline(always)] + pub fn awu(&self) -> AWU_R { + AWU_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Automatic retransmission disable"] - #[inline] - pub fn ard(&self) -> ARDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ARDR { bits } + #[inline(always)] + pub fn ard(&self) -> ARD_R { + ARD_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Receive FIFO overwrite disable"] - #[inline] - pub fn rfod(&self) -> RFODR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RFODR { bits } + #[inline(always)] + pub fn rfod(&self) -> RFOD_R { + RFOD_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Transmit FIFO order"] - #[inline] - pub fn tfo(&self) -> TFOR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFOR { bits } + #[inline(always)] + pub fn tfo(&self) -> TFO_R { + TFO_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Sleep working mode"] - #[inline] - pub fn slpwmod(&self) -> SLPWMODR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SLPWMODR { bits } + #[inline(always)] + pub fn slpwmod(&self) -> SLPWMOD_R { + SLPWMOD_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Initial working mode"] - #[inline] - pub fn iwmod(&self) -> IWMODR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IWMODR { bits } + #[inline(always)] + pub fn iwmod(&self) -> IWMOD_R { + IWMOD_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0001_0002 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 16 - Debug freeze"] - #[inline] - pub fn dfz(&mut self) -> _DFZW { - _DFZW { w: self } + #[inline(always)] + pub fn dfz(&mut self) -> DFZ_W { + DFZ_W { w: self } } #[doc = "Bit 15 - Software reset"] - #[inline] - pub fn swrst(&mut self) -> _SWRSTW { - _SWRSTW { w: self } + #[inline(always)] + pub fn swrst(&mut self) -> SWRST_W { + SWRST_W { w: self } } #[doc = "Bit 7 - Time-triggered communication"] - #[inline] - pub fn ttc(&mut self) -> _TTCW { - _TTCW { w: self } + #[inline(always)] + pub fn ttc(&mut self) -> TTC_W { + TTC_W { w: self } } #[doc = "Bit 6 - Automatic bus-off recovery"] - #[inline] - pub fn abor(&mut self) -> _ABORW { - _ABORW { w: self } + #[inline(always)] + pub fn abor(&mut self) -> ABOR_W { + ABOR_W { w: self } } #[doc = "Bit 5 - Automatic wakeup"] - #[inline] - pub fn awu(&mut self) -> _AWUW { - _AWUW { w: self } + #[inline(always)] + pub fn awu(&mut self) -> AWU_W { + AWU_W { w: self } } #[doc = "Bit 4 - Automatic retransmission disable"] - #[inline] - pub fn ard(&mut self) -> _ARDW { - _ARDW { w: self } + #[inline(always)] + pub fn ard(&mut self) -> ARD_W { + ARD_W { w: self } } #[doc = "Bit 3 - Receive FIFO overwrite disable"] - #[inline] - pub fn rfod(&mut self) -> _RFODW { - _RFODW { w: self } + #[inline(always)] + pub fn rfod(&mut self) -> RFOD_W { + RFOD_W { w: self } } #[doc = "Bit 2 - Transmit FIFO order"] - #[inline] - pub fn tfo(&mut self) -> _TFOW { - _TFOW { w: self } + #[inline(always)] + pub fn tfo(&mut self) -> TFO_W { + TFO_W { w: self } } #[doc = "Bit 1 - Sleep working mode"] - #[inline] - pub fn slpwmod(&mut self) -> _SLPWMODW { - _SLPWMODW { w: self } + #[inline(always)] + pub fn slpwmod(&mut self) -> SLPWMOD_W { + SLPWMOD_W { w: self } } #[doc = "Bit 0 - Initial working mode"] - #[inline] - pub fn iwmod(&mut self) -> _IWMODW { - _IWMODW { w: self } + #[inline(always)] + pub fn iwmod(&mut self) -> IWMOD_W { + IWMOD_W { w: self } } } diff --git a/src/can0/err.rs b/src/can0/err.rs index cd75fc8bdd001b62379505a0d47cfa04e586ba59..63e44e36bbbc0e13ca25c65b066db8ccd553bfbc 100644 --- a/src/can0/err.rs +++ b/src/can0/err.rs @@ -1,240 +1,75 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::ERR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RECNTR { - bits: u8, -} -impl RECNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct TECNTR { - bits: u8, -} -impl TECNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ERRNR { - bits: u8, -} -impl ERRNR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct BOERRR { - bits: bool, -} -impl BOERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PERRR { - bits: bool, -} -impl PERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WERRR { - bits: bool, -} -impl WERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _ERRNW<'a> { +#[doc = "Reader of register ERR"] +pub type R = crate::R; +#[doc = "Writer for register ERR"] +pub type W = crate::W; +#[doc = "Register ERR `reset()`'s with value 0"] +impl crate::ResetValue for super::ERR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `RECNT`"] +pub type RECNT_R = crate::R; +#[doc = "Reader of field `TECNT`"] +pub type TECNT_R = crate::R; +#[doc = "Reader of field `ERRN`"] +pub type ERRN_R = crate::R; +#[doc = "Write proxy for field `ERRN`"] +pub struct ERRN_W<'a> { w: &'a mut W, } -impl<'a> _ERRNW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ERRN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 4)) | (((value as u32) & 0x07) << 4); self.w } } +#[doc = "Reader of field `BOERR`"] +pub type BOERR_R = crate::R; +#[doc = "Reader of field `PERR`"] +pub type PERR_R = crate::R; +#[doc = "Reader of field `WERR`"] +pub type WERR_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 24:31 - Receive Error Count defined by the CAN standard"] - #[inline] - pub fn recnt(&self) -> RECNTR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RECNTR { bits } + #[inline(always)] + pub fn recnt(&self) -> RECNT_R { + RECNT_R::new(((self.bits >> 24) & 0xff) as u8) } #[doc = "Bits 16:23 - Transmit Error Count defined by the CAN standard"] - #[inline] - pub fn tecnt(&self) -> TECNTR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - TECNTR { bits } + #[inline(always)] + pub fn tecnt(&self) -> TECNT_R { + TECNT_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bits 4:6 - Error number"] - #[inline] - pub fn errn(&self) -> ERRNR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ERRNR { bits } + #[inline(always)] + pub fn errn(&self) -> ERRN_R { + ERRN_R::new(((self.bits >> 4) & 0x07) as u8) } #[doc = "Bit 2 - Bus-off error"] - #[inline] - pub fn boerr(&self) -> BOERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BOERRR { bits } + #[inline(always)] + pub fn boerr(&self) -> BOERR_R { + BOERR_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Passive error"] - #[inline] - pub fn perr(&self) -> PERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PERRR { bits } + #[inline(always)] + pub fn perr(&self) -> PERR_R { + PERR_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Warning error"] - #[inline] - pub fn werr(&self) -> WERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WERRR { bits } + #[inline(always)] + pub fn werr(&self) -> WERR_R { + WERR_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 4:6 - Error number"] - #[inline] - pub fn errn(&mut self) -> _ERRNW { - _ERRNW { w: self } + #[inline(always)] + pub fn errn(&mut self) -> ERRN_W { + ERRN_W { w: self } } } diff --git a/src/can0/f0data0.rs b/src/can0/f0data0.rs index bfbd020f662ce330c4637d11a7c2a6cbbc70d7f2..6b56485c8badf64906026353ec0f45d0f5b8cc02 100644 --- a/src/can0/f0data0.rs +++ b/src/can0/f0data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F0DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F0DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F0DATA0"] +pub type W = crate::W; +#[doc = "Register F0DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F0DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f0data1.rs b/src/can0/f0data1.rs index eb8a13ce0d7fbe80b84ede33db69503459d7cae2..c060c7865476373a47c2d163aa55bca9b5be757f 100644 --- a/src/can0/f0data1.rs +++ b/src/can0/f0data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F0DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F0DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F0DATA1"] +pub type W = crate::W; +#[doc = "Register F0DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F0DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f10data0.rs b/src/can0/f10data0.rs index cdb7300cd1d45e0966f3c4a6a3af0fa74fe0646d..734b21a8311c19daee9824d0d3c58d8efb11c1ef 100644 --- a/src/can0/f10data0.rs +++ b/src/can0/f10data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F10DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F10DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F10DATA0"] +pub type W = crate::W; +#[doc = "Register F10DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F10DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f10data1.rs b/src/can0/f10data1.rs index 7aa91fe9e795ffac8c1ed5019ccd4cbdab773639..930489fa64a9a395b6fde95c4cb925e3ce34c848 100644 --- a/src/can0/f10data1.rs +++ b/src/can0/f10data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F10DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F10DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F10DATA1"] +pub type W = crate::W; +#[doc = "Register F10DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F10DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f11data0.rs b/src/can0/f11data0.rs index 99db07a04115956f5b8689a96cb9e9bf8bf8aa24..850d3586ff0460ff387e2f2c20c5756fd29559aa 100644 --- a/src/can0/f11data0.rs +++ b/src/can0/f11data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F11DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F11DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F11DATA0"] +pub type W = crate::W; +#[doc = "Register F11DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F11DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f11data1.rs b/src/can0/f11data1.rs index b2fcc527831736d505022331556f70d6c889019b..04c160847622a6b2f5d7350b07a77a08264a94c4 100644 --- a/src/can0/f11data1.rs +++ b/src/can0/f11data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F11DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F11DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F11DATA1"] +pub type W = crate::W; +#[doc = "Register F11DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F11DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f12data0.rs b/src/can0/f12data0.rs index 98f3b0e5648307dc6e46e0ac0780ce32a174aa76..fb21a270176bfe67d05f20bfe25f0b62de549316 100644 --- a/src/can0/f12data0.rs +++ b/src/can0/f12data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F12DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F12DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F12DATA0"] +pub type W = crate::W; +#[doc = "Register F12DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F12DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f12data1.rs b/src/can0/f12data1.rs index fcd20b184cc9110334c042ffa92a6c539693a823..14ef40e161119fe9bde9f5f354825196e32ad321 100644 --- a/src/can0/f12data1.rs +++ b/src/can0/f12data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F12DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F12DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F12DATA1"] +pub type W = crate::W; +#[doc = "Register F12DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F12DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f13data0.rs b/src/can0/f13data0.rs index 42d4b729592a533a777a917a1966a339cd91a71b..f0336369b25a19ded6307f8ff0ea544579c1bc42 100644 --- a/src/can0/f13data0.rs +++ b/src/can0/f13data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F13DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F13DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F13DATA0"] +pub type W = crate::W; +#[doc = "Register F13DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F13DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f13data1.rs b/src/can0/f13data1.rs index d245c7568976455a8295ad0351062d4c91792f96..931712ccf54c32865e1999528caa57f018461725 100644 --- a/src/can0/f13data1.rs +++ b/src/can0/f13data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F13DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F13DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F13DATA1"] +pub type W = crate::W; +#[doc = "Register F13DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F13DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f14data0.rs b/src/can0/f14data0.rs index b1052ab288d8e650a0d23535485475680a7374f3..dc4e47c2aa65744db4c3102489d0f2c21a12b794 100644 --- a/src/can0/f14data0.rs +++ b/src/can0/f14data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F14DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F14DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F14DATA0"] +pub type W = crate::W; +#[doc = "Register F14DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F14DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f14data1.rs b/src/can0/f14data1.rs index fd34880c9795db853bee467ca4008a1cee7aecfa..1507fcfbd695063f5e3a4f57f7bcb98c6ab70b28 100644 --- a/src/can0/f14data1.rs +++ b/src/can0/f14data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F14DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F14DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F14DATA1"] +pub type W = crate::W; +#[doc = "Register F14DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F14DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f15data0.rs b/src/can0/f15data0.rs index 29d50f06d3add56c61740c3425af464cdc020082..e2d42c4bea1f4ffbddf543165cc5235cbf1bb411 100644 --- a/src/can0/f15data0.rs +++ b/src/can0/f15data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F15DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F15DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F15DATA0"] +pub type W = crate::W; +#[doc = "Register F15DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F15DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f15data1.rs b/src/can0/f15data1.rs index 6cffbeaa42a74f481baffdd395006b26150596c1..77f54fe3d29a23bac9ff707678ca50cb10c6df6d 100644 --- a/src/can0/f15data1.rs +++ b/src/can0/f15data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F15DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F15DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F15DATA1"] +pub type W = crate::W; +#[doc = "Register F15DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F15DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f16data0.rs b/src/can0/f16data0.rs index 135c466903fd8ae8eeaae51f3680f9c5e95b7dce..960960e4b82f93af80febb88f4bd24a2026946b4 100644 --- a/src/can0/f16data0.rs +++ b/src/can0/f16data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F16DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F16DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F16DATA0"] +pub type W = crate::W; +#[doc = "Register F16DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F16DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f16data1.rs b/src/can0/f16data1.rs index 7a45f0397305d79c1810a156daab0a17777ef048..56d3cbdfb50592e93693c2d5bc8225927640ff42 100644 --- a/src/can0/f16data1.rs +++ b/src/can0/f16data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F16DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F16DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F16DATA1"] +pub type W = crate::W; +#[doc = "Register F16DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F16DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f17data0.rs b/src/can0/f17data0.rs index daf1b42554d41c6513403338eaa07e1cab825c0e..7b073baa863b2a11f43b7d712069ac9f1ac713e0 100644 --- a/src/can0/f17data0.rs +++ b/src/can0/f17data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F17DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F17DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F17DATA0"] +pub type W = crate::W; +#[doc = "Register F17DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F17DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f17data1.rs b/src/can0/f17data1.rs index ee987df0dd89cb95620fd3eb48090c812b51a2fb..7e757c3946390a34cd8845b81ad96bd313dab70e 100644 --- a/src/can0/f17data1.rs +++ b/src/can0/f17data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F17DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F17DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F17DATA1"] +pub type W = crate::W; +#[doc = "Register F17DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F17DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f18data0.rs b/src/can0/f18data0.rs index 7f03bd1d2b928d1fc3aec7a05d4ffc5f4bf0eaf6..d6f8f8e33ca5ec36c5a46d928bd92281bb812b15 100644 --- a/src/can0/f18data0.rs +++ b/src/can0/f18data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F18DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F18DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F18DATA0"] +pub type W = crate::W; +#[doc = "Register F18DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F18DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f18data1.rs b/src/can0/f18data1.rs index 9bd785f9b9c82bb04e0cc7627bba51d560142481..63ca609c9e47b04dd90b2a4c4e430f96745cdd64 100644 --- a/src/can0/f18data1.rs +++ b/src/can0/f18data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F18DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F18DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F18DATA1"] +pub type W = crate::W; +#[doc = "Register F18DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F18DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f19data0.rs b/src/can0/f19data0.rs index 33780d4d2724bc6dd5172047b1b22bbcc5569a4f..4f8eb744b52adb328b6a759eb9c8d44fb8054105 100644 --- a/src/can0/f19data0.rs +++ b/src/can0/f19data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F19DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F19DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F19DATA0"] +pub type W = crate::W; +#[doc = "Register F19DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F19DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f19data1.rs b/src/can0/f19data1.rs index 2d05d5ac5b0e5d1f8ad2288e2c05eb3ff227dee0..035aab6fc02650a0f04042b51e2a1deecc21c4e2 100644 --- a/src/can0/f19data1.rs +++ b/src/can0/f19data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F19DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F19DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F19DATA1"] +pub type W = crate::W; +#[doc = "Register F19DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F19DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f1data0.rs b/src/can0/f1data0.rs index 5835475b7b9b8648943f92628add6f63c6539192..8f40e8541a0b5385ef630a8d44179b61ccdcc548 100644 --- a/src/can0/f1data0.rs +++ b/src/can0/f1data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F1DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F1DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F1DATA0"] +pub type W = crate::W; +#[doc = "Register F1DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F1DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f1data1.rs b/src/can0/f1data1.rs index b187caa329f0da7695ba47841c538d8ef52b7e07..0aa2307ee7aedb54bd1218f5955b88b8cfdd18f4 100644 --- a/src/can0/f1data1.rs +++ b/src/can0/f1data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F1DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F1DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F1DATA1"] +pub type W = crate::W; +#[doc = "Register F1DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F1DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f20data0.rs b/src/can0/f20data0.rs index 0f2a873be517b7f3aa10a462711e16944a18f80d..aab2e3a324538a566a967a480eb639fa417b11d9 100644 --- a/src/can0/f20data0.rs +++ b/src/can0/f20data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F20DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F20DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F20DATA0"] +pub type W = crate::W; +#[doc = "Register F20DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F20DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f20data1.rs b/src/can0/f20data1.rs index c2fc7f6130d2d531ea0c4296353adb636407550c..bff861db773854dcb1c0163253c80e0c63afa78a 100644 --- a/src/can0/f20data1.rs +++ b/src/can0/f20data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F20DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F20DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F20DATA1"] +pub type W = crate::W; +#[doc = "Register F20DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F20DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f21data0.rs b/src/can0/f21data0.rs index c5f8b13689b81ae247607598b3ec0c8274853977..40485d35cba95ef22d32f48b0864036786a9f314 100644 --- a/src/can0/f21data0.rs +++ b/src/can0/f21data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F21DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F21DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F21DATA0"] +pub type W = crate::W; +#[doc = "Register F21DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F21DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f21data1.rs b/src/can0/f21data1.rs index 608e22b492ba3316b40c338e641df439977f890c..135f01deda08da0b353e4e032b52d9c68bf95283 100644 --- a/src/can0/f21data1.rs +++ b/src/can0/f21data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F21DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F21DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F21DATA1"] +pub type W = crate::W; +#[doc = "Register F21DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F21DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f22data0.rs b/src/can0/f22data0.rs index 1ae76eee2a81a5fb95400c01fba950539c92a2ba..527734af914f19435138b86b1c7bd10328278d9f 100644 --- a/src/can0/f22data0.rs +++ b/src/can0/f22data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F22DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F22DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F22DATA0"] +pub type W = crate::W; +#[doc = "Register F22DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F22DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f22data1.rs b/src/can0/f22data1.rs index 5583e0f5801075d0d73909ed93eb53ee68e7fabb..e61e537632c3733fde3c51d8e151f1e3f98ca003 100644 --- a/src/can0/f22data1.rs +++ b/src/can0/f22data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F22DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F22DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F22DATA1"] +pub type W = crate::W; +#[doc = "Register F22DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F22DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f23data0.rs b/src/can0/f23data0.rs index 6a4a637d6a0e5ed1befab0206917d2f134bc9947..2537d611d65ecffd82118b07aac0261ddb7b5bf0 100644 --- a/src/can0/f23data0.rs +++ b/src/can0/f23data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F23DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F23DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F23DATA0"] +pub type W = crate::W; +#[doc = "Register F23DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F23DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f23data1.rs b/src/can0/f23data1.rs index 85f2c06b21d2ea5c78e44e4cdf507643c1bec2a5..cee5a007bda44aed2420c7d7d9121247959c1efc 100644 --- a/src/can0/f23data1.rs +++ b/src/can0/f23data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F23DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F23DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F23DATA1"] +pub type W = crate::W; +#[doc = "Register F23DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F23DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f24data0.rs b/src/can0/f24data0.rs index 6f11bb805985bda2966065c1dd3887bd49938ec2..12fa79cff133fcbc34de76f483f8ec8761f543b9 100644 --- a/src/can0/f24data0.rs +++ b/src/can0/f24data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F24DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F24DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F24DATA0"] +pub type W = crate::W; +#[doc = "Register F24DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F24DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f24data1.rs b/src/can0/f24data1.rs index 39ac6b1ae3273ecc40ced973772dc1789c7044b0..62e60458b1a8929fa24d9aab4f642d711ddb81f6 100644 --- a/src/can0/f24data1.rs +++ b/src/can0/f24data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F24DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F24DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F24DATA1"] +pub type W = crate::W; +#[doc = "Register F24DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F24DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f25data0.rs b/src/can0/f25data0.rs index e612c559480840ded0b54fa51861194bded2e6a6..c764e8159ab19f4ee88c9c483f194a24df5f8780 100644 --- a/src/can0/f25data0.rs +++ b/src/can0/f25data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F25DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F25DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F25DATA0"] +pub type W = crate::W; +#[doc = "Register F25DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F25DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f25data1.rs b/src/can0/f25data1.rs index ab53172fe2240fe4c0951dac87b30d484dfbfea3..a019f3b27e60e5952cdc2d5c191dea9d7aa012ba 100644 --- a/src/can0/f25data1.rs +++ b/src/can0/f25data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F25DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F25DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F25DATA1"] +pub type W = crate::W; +#[doc = "Register F25DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F25DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f26data0.rs b/src/can0/f26data0.rs index 04340f48580202cacbee2b8c013588d15aa7b67c..7e34721cf93bdc71419790d751ec66b0032b245c 100644 --- a/src/can0/f26data0.rs +++ b/src/can0/f26data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F26DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F26DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F26DATA0"] +pub type W = crate::W; +#[doc = "Register F26DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F26DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f26data1.rs b/src/can0/f26data1.rs index 2ae7849c588881e4a4b1a291d15048abae2dd533..f2d04cc0b3517878e422dd3d1a051316c35f563a 100644 --- a/src/can0/f26data1.rs +++ b/src/can0/f26data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F26DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F26DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F26DATA1"] +pub type W = crate::W; +#[doc = "Register F26DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F26DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f27data0.rs b/src/can0/f27data0.rs index 0c655c30caff9eb60e6ac78d3e355d6aa7c25582..d7aa6b44697911237a7773372b6cc5e3b40b1ee4 100644 --- a/src/can0/f27data0.rs +++ b/src/can0/f27data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F27DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F27DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F27DATA0"] +pub type W = crate::W; +#[doc = "Register F27DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F27DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f27data1.rs b/src/can0/f27data1.rs index d9a127853f9e14b722641d409a149fa7c59b1b71..2c24319b1ec96aa8f8e044d63eb23bac02efab3d 100644 --- a/src/can0/f27data1.rs +++ b/src/can0/f27data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F27DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F27DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F27DATA1"] +pub type W = crate::W; +#[doc = "Register F27DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F27DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f2data0.rs b/src/can0/f2data0.rs index fda0e980f4c7bc15fcbd8df876b359599d7990f3..078366053b173445e7d88ca6956e921a113eb702 100644 --- a/src/can0/f2data0.rs +++ b/src/can0/f2data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F2DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F2DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F2DATA0"] +pub type W = crate::W; +#[doc = "Register F2DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F2DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f2data1.rs b/src/can0/f2data1.rs index 93dcb127c400d0f43889e66c86ddb4c4e05fa9da..05af9ae9eedb203c261a7d21e03ae122072d4853 100644 --- a/src/can0/f2data1.rs +++ b/src/can0/f2data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F2DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F2DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F2DATA1"] +pub type W = crate::W; +#[doc = "Register F2DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F2DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f3data0.rs b/src/can0/f3data0.rs index ec7b3e081afc354e26b2b7fecd0721329ff00586..0d3094e5b6ffd528149e20ab1d7ab158ae595e27 100644 --- a/src/can0/f3data0.rs +++ b/src/can0/f3data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F3DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F3DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F3DATA0"] +pub type W = crate::W; +#[doc = "Register F3DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F3DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f3data1.rs b/src/can0/f3data1.rs index eac650282c57d8b74a0017c2809f0191de55412e..45fdb0561ad1dac6d6de2929653d8dccfcefe589 100644 --- a/src/can0/f3data1.rs +++ b/src/can0/f3data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F3DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F3DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F3DATA1"] +pub type W = crate::W; +#[doc = "Register F3DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F3DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f4data0.rs b/src/can0/f4data0.rs index ea0586308810cb0e099be522fd53b3e528ee4339..50e03695d00b2459c007660def5ee85e90b84927 100644 --- a/src/can0/f4data0.rs +++ b/src/can0/f4data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F4DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F4DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F4DATA0"] +pub type W = crate::W; +#[doc = "Register F4DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F4DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f4data1.rs b/src/can0/f4data1.rs index 783eac0da8d204caf4f8335ed6917c526dc37e46..61bfa7ee6c2d0859edf0ee940b3f6153c33aa469 100644 --- a/src/can0/f4data1.rs +++ b/src/can0/f4data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F4DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F4DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F4DATA1"] +pub type W = crate::W; +#[doc = "Register F4DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F4DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f5data0.rs b/src/can0/f5data0.rs index 28a8311ea1d714e1d6411f0935158a6aacab2ce7..b830628befc2a6f385c8d4be48200ccf7c57cc43 100644 --- a/src/can0/f5data0.rs +++ b/src/can0/f5data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F5DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F5DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F5DATA0"] +pub type W = crate::W; +#[doc = "Register F5DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F5DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f5data1.rs b/src/can0/f5data1.rs index 811fcfc280e508544d844932e493c9f2e4d0acaa..de0038dc4f7ba8bde3cff1f24262ff965bc34893 100644 --- a/src/can0/f5data1.rs +++ b/src/can0/f5data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F5DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F5DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F5DATA1"] +pub type W = crate::W; +#[doc = "Register F5DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F5DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f6data0.rs b/src/can0/f6data0.rs index 89730a73af16beb31298b78fc82f8440c783fac4..50e7f1ef7336ae5bc958941cdc6dd0432ff19f11 100644 --- a/src/can0/f6data0.rs +++ b/src/can0/f6data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F6DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F6DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F6DATA0"] +pub type W = crate::W; +#[doc = "Register F6DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F6DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f6data1.rs b/src/can0/f6data1.rs index ca9f40dd71b3506785575c1ca94b933222ba20be..558717eb7412c267ece1396f1198fb810e777441 100644 --- a/src/can0/f6data1.rs +++ b/src/can0/f6data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F6DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F6DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F6DATA1"] +pub type W = crate::W; +#[doc = "Register F6DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F6DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f7data0.rs b/src/can0/f7data0.rs index 26a89ee86e09118b8dc7397863eccaeecd8400b2..2e862ffa1300dd3cc1d513ecdb4611434bf31ff4 100644 --- a/src/can0/f7data0.rs +++ b/src/can0/f7data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F7DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F7DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F7DATA0"] +pub type W = crate::W; +#[doc = "Register F7DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F7DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f7data1.rs b/src/can0/f7data1.rs index 8be883da5a99d778a8047ecfb5346ca8e57bb823..a89666ed85571e2772a17daf6da449918f18aadf 100644 --- a/src/can0/f7data1.rs +++ b/src/can0/f7data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F7DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F7DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F7DATA1"] +pub type W = crate::W; +#[doc = "Register F7DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F7DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f8data0.rs b/src/can0/f8data0.rs index 8fd87a54b5cd473a2ba8138f64b22c1a8d6d5c88..825317001705e1b6a0e532e8fef532eb048df886 100644 --- a/src/can0/f8data0.rs +++ b/src/can0/f8data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F8DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F8DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F8DATA0"] +pub type W = crate::W; +#[doc = "Register F8DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F8DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f8data1.rs b/src/can0/f8data1.rs index 31f276d39eafdfa045092719dd4424ca8799e53d..88f31b87c51abef1e45c3fd69c72d03f97b332e1 100644 --- a/src/can0/f8data1.rs +++ b/src/can0/f8data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F8DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F8DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F8DATA1"] +pub type W = crate::W; +#[doc = "Register F8DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F8DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f9data0.rs b/src/can0/f9data0.rs index d4513a67c9af6dd3e03746ec4bde70f0b3733247..96007c2b9a7e66c42bfc352f6c66fed20931d374 100644 --- a/src/can0/f9data0.rs +++ b/src/can0/f9data0.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F9DATA0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F9DATA0"] +pub type R = crate::R; +#[doc = "Writer for register F9DATA0"] +pub type W = crate::W; +#[doc = "Register F9DATA0 `reset()`'s with value 0"] +impl crate::ResetValue for super::F9DATA0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/f9data1.rs b/src/can0/f9data1.rs index a1a57e96738bd30855d222ebe90708972949a81b..7460b79c5d20d21fb62c1e20093ef4649723b726 100644 --- a/src/can0/f9data1.rs +++ b/src/can0/f9data1.rs @@ -1,1952 +1,1104 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::F9DATA1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FD0R { - bits: bool, -} -impl FD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD1R { - bits: bool, -} -impl FD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD2R { - bits: bool, -} -impl FD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD3R { - bits: bool, -} -impl FD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD4R { - bits: bool, -} -impl FD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD5R { - bits: bool, -} -impl FD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD6R { - bits: bool, -} -impl FD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD7R { - bits: bool, -} -impl FD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD8R { - bits: bool, -} -impl FD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD9R { - bits: bool, -} -impl FD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD10R { - bits: bool, -} -impl FD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD11R { - bits: bool, -} -impl FD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD12R { - bits: bool, -} -impl FD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD13R { - bits: bool, -} -impl FD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD14R { - bits: bool, -} -impl FD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD15R { - bits: bool, -} -impl FD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD16R { - bits: bool, -} -impl FD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD17R { - bits: bool, -} -impl FD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD18R { - bits: bool, -} -impl FD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD19R { - bits: bool, -} -impl FD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD20R { - bits: bool, -} -impl FD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD21R { - bits: bool, -} -impl FD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD22R { - bits: bool, -} -impl FD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD23R { - bits: bool, -} -impl FD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD24R { - bits: bool, -} -impl FD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD25R { - bits: bool, -} -impl FD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD26R { - bits: bool, -} -impl FD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD27R { - bits: bool, -} -impl FD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD28R { - bits: bool, -} -impl FD28R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD29R { - bits: bool, -} -impl FD29R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD30R { - bits: bool, -} -impl FD30R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FD31R { - bits: bool, -} -impl FD31R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FD0W<'a> { +#[doc = "Reader of register F9DATA1"] +pub type R = crate::R; +#[doc = "Writer for register F9DATA1"] +pub type W = crate::W; +#[doc = "Register F9DATA1 `reset()`'s with value 0"] +impl crate::ResetValue for super::F9DATA1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FD0`"] +pub type FD0_R = crate::R; +#[doc = "Write proxy for field `FD0`"] +pub struct FD0_W<'a> { w: &'a mut W, } -impl<'a> _FD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FD1W<'a> { +#[doc = "Reader of field `FD1`"] +pub type FD1_R = crate::R; +#[doc = "Write proxy for field `FD1`"] +pub struct FD1_W<'a> { w: &'a mut W, } -impl<'a> _FD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FD2W<'a> { +#[doc = "Reader of field `FD2`"] +pub type FD2_R = crate::R; +#[doc = "Write proxy for field `FD2`"] +pub struct FD2_W<'a> { w: &'a mut W, } -impl<'a> _FD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FD3W<'a> { +#[doc = "Reader of field `FD3`"] +pub type FD3_R = crate::R; +#[doc = "Write proxy for field `FD3`"] +pub struct FD3_W<'a> { w: &'a mut W, } -impl<'a> _FD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FD4W<'a> { +#[doc = "Reader of field `FD4`"] +pub type FD4_R = crate::R; +#[doc = "Write proxy for field `FD4`"] +pub struct FD4_W<'a> { w: &'a mut W, } -impl<'a> _FD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FD5W<'a> { +#[doc = "Reader of field `FD5`"] +pub type FD5_R = crate::R; +#[doc = "Write proxy for field `FD5`"] +pub struct FD5_W<'a> { w: &'a mut W, } -impl<'a> _FD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FD6W<'a> { +#[doc = "Reader of field `FD6`"] +pub type FD6_R = crate::R; +#[doc = "Write proxy for field `FD6`"] +pub struct FD6_W<'a> { w: &'a mut W, } -impl<'a> _FD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FD7W<'a> { +#[doc = "Reader of field `FD7`"] +pub type FD7_R = crate::R; +#[doc = "Write proxy for field `FD7`"] +pub struct FD7_W<'a> { w: &'a mut W, } -impl<'a> _FD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FD8W<'a> { +#[doc = "Reader of field `FD8`"] +pub type FD8_R = crate::R; +#[doc = "Write proxy for field `FD8`"] +pub struct FD8_W<'a> { w: &'a mut W, } -impl<'a> _FD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FD9W<'a> { +#[doc = "Reader of field `FD9`"] +pub type FD9_R = crate::R; +#[doc = "Write proxy for field `FD9`"] +pub struct FD9_W<'a> { w: &'a mut W, } -impl<'a> _FD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FD10W<'a> { +#[doc = "Reader of field `FD10`"] +pub type FD10_R = crate::R; +#[doc = "Write proxy for field `FD10`"] +pub struct FD10_W<'a> { w: &'a mut W, } -impl<'a> _FD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FD11W<'a> { +#[doc = "Reader of field `FD11`"] +pub type FD11_R = crate::R; +#[doc = "Write proxy for field `FD11`"] +pub struct FD11_W<'a> { w: &'a mut W, } -impl<'a> _FD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FD12W<'a> { +#[doc = "Reader of field `FD12`"] +pub type FD12_R = crate::R; +#[doc = "Write proxy for field `FD12`"] +pub struct FD12_W<'a> { w: &'a mut W, } -impl<'a> _FD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FD13W<'a> { +#[doc = "Reader of field `FD13`"] +pub type FD13_R = crate::R; +#[doc = "Write proxy for field `FD13`"] +pub struct FD13_W<'a> { w: &'a mut W, } -impl<'a> _FD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FD14W<'a> { +#[doc = "Reader of field `FD14`"] +pub type FD14_R = crate::R; +#[doc = "Write proxy for field `FD14`"] +pub struct FD14_W<'a> { w: &'a mut W, } -impl<'a> _FD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FD15W<'a> { +#[doc = "Reader of field `FD15`"] +pub type FD15_R = crate::R; +#[doc = "Write proxy for field `FD15`"] +pub struct FD15_W<'a> { w: &'a mut W, } -impl<'a> _FD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FD16W<'a> { +#[doc = "Reader of field `FD16`"] +pub type FD16_R = crate::R; +#[doc = "Write proxy for field `FD16`"] +pub struct FD16_W<'a> { w: &'a mut W, } -impl<'a> _FD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FD17W<'a> { +#[doc = "Reader of field `FD17`"] +pub type FD17_R = crate::R; +#[doc = "Write proxy for field `FD17`"] +pub struct FD17_W<'a> { w: &'a mut W, } -impl<'a> _FD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FD18W<'a> { +#[doc = "Reader of field `FD18`"] +pub type FD18_R = crate::R; +#[doc = "Write proxy for field `FD18`"] +pub struct FD18_W<'a> { w: &'a mut W, } -impl<'a> _FD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FD19W<'a> { +#[doc = "Reader of field `FD19`"] +pub type FD19_R = crate::R; +#[doc = "Write proxy for field `FD19`"] +pub struct FD19_W<'a> { w: &'a mut W, } -impl<'a> _FD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FD20W<'a> { +#[doc = "Reader of field `FD20`"] +pub type FD20_R = crate::R; +#[doc = "Write proxy for field `FD20`"] +pub struct FD20_W<'a> { w: &'a mut W, } -impl<'a> _FD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FD21W<'a> { +#[doc = "Reader of field `FD21`"] +pub type FD21_R = crate::R; +#[doc = "Write proxy for field `FD21`"] +pub struct FD21_W<'a> { w: &'a mut W, } -impl<'a> _FD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FD22W<'a> { +#[doc = "Reader of field `FD22`"] +pub type FD22_R = crate::R; +#[doc = "Write proxy for field `FD22`"] +pub struct FD22_W<'a> { w: &'a mut W, } -impl<'a> _FD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FD23W<'a> { +#[doc = "Reader of field `FD23`"] +pub type FD23_R = crate::R; +#[doc = "Write proxy for field `FD23`"] +pub struct FD23_W<'a> { w: &'a mut W, } -impl<'a> _FD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FD24W<'a> { +#[doc = "Reader of field `FD24`"] +pub type FD24_R = crate::R; +#[doc = "Write proxy for field `FD24`"] +pub struct FD24_W<'a> { w: &'a mut W, } -impl<'a> _FD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FD25W<'a> { +#[doc = "Reader of field `FD25`"] +pub type FD25_R = crate::R; +#[doc = "Write proxy for field `FD25`"] +pub struct FD25_W<'a> { w: &'a mut W, } -impl<'a> _FD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FD26W<'a> { +#[doc = "Reader of field `FD26`"] +pub type FD26_R = crate::R; +#[doc = "Write proxy for field `FD26`"] +pub struct FD26_W<'a> { w: &'a mut W, } -impl<'a> _FD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FD27W<'a> { +#[doc = "Reader of field `FD27`"] +pub type FD27_R = crate::R; +#[doc = "Write proxy for field `FD27`"] +pub struct FD27_W<'a> { w: &'a mut W, } -impl<'a> _FD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FD28W<'a> { +#[doc = "Reader of field `FD28`"] +pub type FD28_R = crate::R; +#[doc = "Write proxy for field `FD28`"] +pub struct FD28_W<'a> { w: &'a mut W, } -impl<'a> _FD28W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD28_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _FD29W<'a> { +#[doc = "Reader of field `FD29`"] +pub type FD29_R = crate::R; +#[doc = "Write proxy for field `FD29`"] +pub struct FD29_W<'a> { w: &'a mut W, } -impl<'a> _FD29W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD29_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FD30W<'a> { +#[doc = "Reader of field `FD30`"] +pub type FD30_R = crate::R; +#[doc = "Write proxy for field `FD30`"] +pub struct FD30_W<'a> { w: &'a mut W, } -impl<'a> _FD30W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD30_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _FD31W<'a> { +#[doc = "Reader of field `FD31`"] +pub type FD31_R = crate::R; +#[doc = "Write proxy for field `FD31`"] +pub struct FD31_W<'a> { w: &'a mut W, } -impl<'a> _FD31W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FD31_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&self) -> FD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD0R { bits } + #[inline(always)] + pub fn fd0(&self) -> FD0_R { + FD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&self) -> FD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD1R { bits } + #[inline(always)] + pub fn fd1(&self) -> FD1_R { + FD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&self) -> FD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD2R { bits } + #[inline(always)] + pub fn fd2(&self) -> FD2_R { + FD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&self) -> FD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD3R { bits } + #[inline(always)] + pub fn fd3(&self) -> FD3_R { + FD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&self) -> FD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD4R { bits } + #[inline(always)] + pub fn fd4(&self) -> FD4_R { + FD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&self) -> FD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD5R { bits } + #[inline(always)] + pub fn fd5(&self) -> FD5_R { + FD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&self) -> FD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD6R { bits } + #[inline(always)] + pub fn fd6(&self) -> FD6_R { + FD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&self) -> FD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD7R { bits } + #[inline(always)] + pub fn fd7(&self) -> FD7_R { + FD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&self) -> FD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD8R { bits } + #[inline(always)] + pub fn fd8(&self) -> FD8_R { + FD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&self) -> FD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD9R { bits } + #[inline(always)] + pub fn fd9(&self) -> FD9_R { + FD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&self) -> FD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD10R { bits } + #[inline(always)] + pub fn fd10(&self) -> FD10_R { + FD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&self) -> FD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD11R { bits } + #[inline(always)] + pub fn fd11(&self) -> FD11_R { + FD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&self) -> FD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD12R { bits } + #[inline(always)] + pub fn fd12(&self) -> FD12_R { + FD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&self) -> FD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD13R { bits } + #[inline(always)] + pub fn fd13(&self) -> FD13_R { + FD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&self) -> FD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD14R { bits } + #[inline(always)] + pub fn fd14(&self) -> FD14_R { + FD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&self) -> FD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD15R { bits } + #[inline(always)] + pub fn fd15(&self) -> FD15_R { + FD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&self) -> FD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD16R { bits } + #[inline(always)] + pub fn fd16(&self) -> FD16_R { + FD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&self) -> FD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD17R { bits } + #[inline(always)] + pub fn fd17(&self) -> FD17_R { + FD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&self) -> FD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD18R { bits } + #[inline(always)] + pub fn fd18(&self) -> FD18_R { + FD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&self) -> FD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD19R { bits } + #[inline(always)] + pub fn fd19(&self) -> FD19_R { + FD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&self) -> FD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD20R { bits } + #[inline(always)] + pub fn fd20(&self) -> FD20_R { + FD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&self) -> FD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD21R { bits } + #[inline(always)] + pub fn fd21(&self) -> FD21_R { + FD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&self) -> FD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD22R { bits } + #[inline(always)] + pub fn fd22(&self) -> FD22_R { + FD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&self) -> FD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD23R { bits } + #[inline(always)] + pub fn fd23(&self) -> FD23_R { + FD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&self) -> FD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD24R { bits } + #[inline(always)] + pub fn fd24(&self) -> FD24_R { + FD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&self) -> FD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD25R { bits } + #[inline(always)] + pub fn fd25(&self) -> FD25_R { + FD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&self) -> FD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD26R { bits } + #[inline(always)] + pub fn fd26(&self) -> FD26_R { + FD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&self) -> FD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD27R { bits } + #[inline(always)] + pub fn fd27(&self) -> FD27_R { + FD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&self) -> FD28R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD28R { bits } + #[inline(always)] + pub fn fd28(&self) -> FD28_R { + FD28_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&self) -> FD29R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD29R { bits } + #[inline(always)] + pub fn fd29(&self) -> FD29_R { + FD29_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&self) -> FD30R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD30R { bits } + #[inline(always)] + pub fn fd30(&self) -> FD30_R { + FD30_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&self) -> FD31R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FD31R { bits } + #[inline(always)] + pub fn fd31(&self) -> FD31_R { + FD31_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter bits"] - #[inline] - pub fn fd0(&mut self) -> _FD0W { - _FD0W { w: self } + #[inline(always)] + pub fn fd0(&mut self) -> FD0_W { + FD0_W { w: self } } #[doc = "Bit 1 - Filter bits"] - #[inline] - pub fn fd1(&mut self) -> _FD1W { - _FD1W { w: self } + #[inline(always)] + pub fn fd1(&mut self) -> FD1_W { + FD1_W { w: self } } #[doc = "Bit 2 - Filter bits"] - #[inline] - pub fn fd2(&mut self) -> _FD2W { - _FD2W { w: self } + #[inline(always)] + pub fn fd2(&mut self) -> FD2_W { + FD2_W { w: self } } #[doc = "Bit 3 - Filter bits"] - #[inline] - pub fn fd3(&mut self) -> _FD3W { - _FD3W { w: self } + #[inline(always)] + pub fn fd3(&mut self) -> FD3_W { + FD3_W { w: self } } #[doc = "Bit 4 - Filter bits"] - #[inline] - pub fn fd4(&mut self) -> _FD4W { - _FD4W { w: self } + #[inline(always)] + pub fn fd4(&mut self) -> FD4_W { + FD4_W { w: self } } #[doc = "Bit 5 - Filter bits"] - #[inline] - pub fn fd5(&mut self) -> _FD5W { - _FD5W { w: self } + #[inline(always)] + pub fn fd5(&mut self) -> FD5_W { + FD5_W { w: self } } #[doc = "Bit 6 - Filter bits"] - #[inline] - pub fn fd6(&mut self) -> _FD6W { - _FD6W { w: self } + #[inline(always)] + pub fn fd6(&mut self) -> FD6_W { + FD6_W { w: self } } #[doc = "Bit 7 - Filter bits"] - #[inline] - pub fn fd7(&mut self) -> _FD7W { - _FD7W { w: self } + #[inline(always)] + pub fn fd7(&mut self) -> FD7_W { + FD7_W { w: self } } #[doc = "Bit 8 - Filter bits"] - #[inline] - pub fn fd8(&mut self) -> _FD8W { - _FD8W { w: self } + #[inline(always)] + pub fn fd8(&mut self) -> FD8_W { + FD8_W { w: self } } #[doc = "Bit 9 - Filter bits"] - #[inline] - pub fn fd9(&mut self) -> _FD9W { - _FD9W { w: self } + #[inline(always)] + pub fn fd9(&mut self) -> FD9_W { + FD9_W { w: self } } #[doc = "Bit 10 - Filter bits"] - #[inline] - pub fn fd10(&mut self) -> _FD10W { - _FD10W { w: self } + #[inline(always)] + pub fn fd10(&mut self) -> FD10_W { + FD10_W { w: self } } #[doc = "Bit 11 - Filter bits"] - #[inline] - pub fn fd11(&mut self) -> _FD11W { - _FD11W { w: self } + #[inline(always)] + pub fn fd11(&mut self) -> FD11_W { + FD11_W { w: self } } #[doc = "Bit 12 - Filter bits"] - #[inline] - pub fn fd12(&mut self) -> _FD12W { - _FD12W { w: self } + #[inline(always)] + pub fn fd12(&mut self) -> FD12_W { + FD12_W { w: self } } #[doc = "Bit 13 - Filter bits"] - #[inline] - pub fn fd13(&mut self) -> _FD13W { - _FD13W { w: self } + #[inline(always)] + pub fn fd13(&mut self) -> FD13_W { + FD13_W { w: self } } #[doc = "Bit 14 - Filter bits"] - #[inline] - pub fn fd14(&mut self) -> _FD14W { - _FD14W { w: self } + #[inline(always)] + pub fn fd14(&mut self) -> FD14_W { + FD14_W { w: self } } #[doc = "Bit 15 - Filter bits"] - #[inline] - pub fn fd15(&mut self) -> _FD15W { - _FD15W { w: self } + #[inline(always)] + pub fn fd15(&mut self) -> FD15_W { + FD15_W { w: self } } #[doc = "Bit 16 - Filter bits"] - #[inline] - pub fn fd16(&mut self) -> _FD16W { - _FD16W { w: self } + #[inline(always)] + pub fn fd16(&mut self) -> FD16_W { + FD16_W { w: self } } #[doc = "Bit 17 - Filter bits"] - #[inline] - pub fn fd17(&mut self) -> _FD17W { - _FD17W { w: self } + #[inline(always)] + pub fn fd17(&mut self) -> FD17_W { + FD17_W { w: self } } #[doc = "Bit 18 - Filter bits"] - #[inline] - pub fn fd18(&mut self) -> _FD18W { - _FD18W { w: self } + #[inline(always)] + pub fn fd18(&mut self) -> FD18_W { + FD18_W { w: self } } #[doc = "Bit 19 - Filter bits"] - #[inline] - pub fn fd19(&mut self) -> _FD19W { - _FD19W { w: self } + #[inline(always)] + pub fn fd19(&mut self) -> FD19_W { + FD19_W { w: self } } #[doc = "Bit 20 - Filter bits"] - #[inline] - pub fn fd20(&mut self) -> _FD20W { - _FD20W { w: self } + #[inline(always)] + pub fn fd20(&mut self) -> FD20_W { + FD20_W { w: self } } #[doc = "Bit 21 - Filter bits"] - #[inline] - pub fn fd21(&mut self) -> _FD21W { - _FD21W { w: self } + #[inline(always)] + pub fn fd21(&mut self) -> FD21_W { + FD21_W { w: self } } #[doc = "Bit 22 - Filter bits"] - #[inline] - pub fn fd22(&mut self) -> _FD22W { - _FD22W { w: self } + #[inline(always)] + pub fn fd22(&mut self) -> FD22_W { + FD22_W { w: self } } #[doc = "Bit 23 - Filter bits"] - #[inline] - pub fn fd23(&mut self) -> _FD23W { - _FD23W { w: self } + #[inline(always)] + pub fn fd23(&mut self) -> FD23_W { + FD23_W { w: self } } #[doc = "Bit 24 - Filter bits"] - #[inline] - pub fn fd24(&mut self) -> _FD24W { - _FD24W { w: self } + #[inline(always)] + pub fn fd24(&mut self) -> FD24_W { + FD24_W { w: self } } #[doc = "Bit 25 - Filter bits"] - #[inline] - pub fn fd25(&mut self) -> _FD25W { - _FD25W { w: self } + #[inline(always)] + pub fn fd25(&mut self) -> FD25_W { + FD25_W { w: self } } #[doc = "Bit 26 - Filter bits"] - #[inline] - pub fn fd26(&mut self) -> _FD26W { - _FD26W { w: self } + #[inline(always)] + pub fn fd26(&mut self) -> FD26_W { + FD26_W { w: self } } #[doc = "Bit 27 - Filter bits"] - #[inline] - pub fn fd27(&mut self) -> _FD27W { - _FD27W { w: self } + #[inline(always)] + pub fn fd27(&mut self) -> FD27_W { + FD27_W { w: self } } #[doc = "Bit 28 - Filter bits"] - #[inline] - pub fn fd28(&mut self) -> _FD28W { - _FD28W { w: self } + #[inline(always)] + pub fn fd28(&mut self) -> FD28_W { + FD28_W { w: self } } #[doc = "Bit 29 - Filter bits"] - #[inline] - pub fn fd29(&mut self) -> _FD29W { - _FD29W { w: self } + #[inline(always)] + pub fn fd29(&mut self) -> FD29_W { + FD29_W { w: self } } #[doc = "Bit 30 - Filter bits"] - #[inline] - pub fn fd30(&mut self) -> _FD30W { - _FD30W { w: self } + #[inline(always)] + pub fn fd30(&mut self) -> FD30_W { + FD30_W { w: self } } #[doc = "Bit 31 - Filter bits"] - #[inline] - pub fn fd31(&mut self) -> _FD31W { - _FD31W { w: self } + #[inline(always)] + pub fn fd31(&mut self) -> FD31_W { + FD31_W { w: self } } } diff --git a/src/can0/fafifo.rs b/src/can0/fafifo.rs index 15f9d5ed9df745e8d558c6939560d5330fb69452..6c16195451b1187670ffba14f4c27c927bd18a8c 100644 --- a/src/can0/fafifo.rs +++ b/src/can0/fafifo.rs @@ -1,1716 +1,968 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::FAFIFO { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FAF0R { - bits: bool, -} -impl FAF0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF1R { - bits: bool, -} -impl FAF1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF2R { - bits: bool, -} -impl FAF2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF3R { - bits: bool, -} -impl FAF3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF4R { - bits: bool, -} -impl FAF4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF5R { - bits: bool, -} -impl FAF5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF6R { - bits: bool, -} -impl FAF6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF7R { - bits: bool, -} -impl FAF7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF8R { - bits: bool, -} -impl FAF8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF9R { - bits: bool, -} -impl FAF9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF10R { - bits: bool, -} -impl FAF10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF11R { - bits: bool, -} -impl FAF11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF12R { - bits: bool, -} -impl FAF12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF13R { - bits: bool, -} -impl FAF13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF14R { - bits: bool, -} -impl FAF14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF15R { - bits: bool, -} -impl FAF15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF16R { - bits: bool, -} -impl FAF16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF17R { - bits: bool, -} -impl FAF17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF18R { - bits: bool, -} -impl FAF18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF19R { - bits: bool, -} -impl FAF19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF20R { - bits: bool, -} -impl FAF20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF21R { - bits: bool, -} -impl FAF21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF22R { - bits: bool, -} -impl FAF22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF23R { - bits: bool, -} -impl FAF23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF24R { - bits: bool, -} -impl FAF24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF25R { - bits: bool, -} -impl FAF25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF26R { - bits: bool, -} -impl FAF26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FAF27R { - bits: bool, -} -impl FAF27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FAF0W<'a> { +#[doc = "Reader of register FAFIFO"] +pub type R = crate::R; +#[doc = "Writer for register FAFIFO"] +pub type W = crate::W; +#[doc = "Register FAFIFO `reset()`'s with value 0"] +impl crate::ResetValue for super::FAFIFO { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FAF0`"] +pub type FAF0_R = crate::R; +#[doc = "Write proxy for field `FAF0`"] +pub struct FAF0_W<'a> { w: &'a mut W, } -impl<'a> _FAF0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FAF1W<'a> { +#[doc = "Reader of field `FAF1`"] +pub type FAF1_R = crate::R; +#[doc = "Write proxy for field `FAF1`"] +pub struct FAF1_W<'a> { w: &'a mut W, } -impl<'a> _FAF1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FAF2W<'a> { +#[doc = "Reader of field `FAF2`"] +pub type FAF2_R = crate::R; +#[doc = "Write proxy for field `FAF2`"] +pub struct FAF2_W<'a> { w: &'a mut W, } -impl<'a> _FAF2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FAF3W<'a> { +#[doc = "Reader of field `FAF3`"] +pub type FAF3_R = crate::R; +#[doc = "Write proxy for field `FAF3`"] +pub struct FAF3_W<'a> { w: &'a mut W, } -impl<'a> _FAF3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FAF4W<'a> { +#[doc = "Reader of field `FAF4`"] +pub type FAF4_R = crate::R; +#[doc = "Write proxy for field `FAF4`"] +pub struct FAF4_W<'a> { w: &'a mut W, } -impl<'a> _FAF4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FAF5W<'a> { +#[doc = "Reader of field `FAF5`"] +pub type FAF5_R = crate::R; +#[doc = "Write proxy for field `FAF5`"] +pub struct FAF5_W<'a> { w: &'a mut W, } -impl<'a> _FAF5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FAF6W<'a> { +#[doc = "Reader of field `FAF6`"] +pub type FAF6_R = crate::R; +#[doc = "Write proxy for field `FAF6`"] +pub struct FAF6_W<'a> { w: &'a mut W, } -impl<'a> _FAF6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FAF7W<'a> { +#[doc = "Reader of field `FAF7`"] +pub type FAF7_R = crate::R; +#[doc = "Write proxy for field `FAF7`"] +pub struct FAF7_W<'a> { w: &'a mut W, } -impl<'a> _FAF7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FAF8W<'a> { +#[doc = "Reader of field `FAF8`"] +pub type FAF8_R = crate::R; +#[doc = "Write proxy for field `FAF8`"] +pub struct FAF8_W<'a> { w: &'a mut W, } -impl<'a> _FAF8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FAF9W<'a> { +#[doc = "Reader of field `FAF9`"] +pub type FAF9_R = crate::R; +#[doc = "Write proxy for field `FAF9`"] +pub struct FAF9_W<'a> { w: &'a mut W, } -impl<'a> _FAF9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FAF10W<'a> { +#[doc = "Reader of field `FAF10`"] +pub type FAF10_R = crate::R; +#[doc = "Write proxy for field `FAF10`"] +pub struct FAF10_W<'a> { w: &'a mut W, } -impl<'a> _FAF10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FAF11W<'a> { +#[doc = "Reader of field `FAF11`"] +pub type FAF11_R = crate::R; +#[doc = "Write proxy for field `FAF11`"] +pub struct FAF11_W<'a> { w: &'a mut W, } -impl<'a> _FAF11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FAF12W<'a> { +#[doc = "Reader of field `FAF12`"] +pub type FAF12_R = crate::R; +#[doc = "Write proxy for field `FAF12`"] +pub struct FAF12_W<'a> { w: &'a mut W, } -impl<'a> _FAF12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FAF13W<'a> { +#[doc = "Reader of field `FAF13`"] +pub type FAF13_R = crate::R; +#[doc = "Write proxy for field `FAF13`"] +pub struct FAF13_W<'a> { w: &'a mut W, } -impl<'a> _FAF13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FAF14W<'a> { +#[doc = "Reader of field `FAF14`"] +pub type FAF14_R = crate::R; +#[doc = "Write proxy for field `FAF14`"] +pub struct FAF14_W<'a> { w: &'a mut W, } -impl<'a> _FAF14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FAF15W<'a> { +#[doc = "Reader of field `FAF15`"] +pub type FAF15_R = crate::R; +#[doc = "Write proxy for field `FAF15`"] +pub struct FAF15_W<'a> { w: &'a mut W, } -impl<'a> _FAF15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FAF16W<'a> { +#[doc = "Reader of field `FAF16`"] +pub type FAF16_R = crate::R; +#[doc = "Write proxy for field `FAF16`"] +pub struct FAF16_W<'a> { w: &'a mut W, } -impl<'a> _FAF16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FAF17W<'a> { +#[doc = "Reader of field `FAF17`"] +pub type FAF17_R = crate::R; +#[doc = "Write proxy for field `FAF17`"] +pub struct FAF17_W<'a> { w: &'a mut W, } -impl<'a> _FAF17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FAF18W<'a> { +#[doc = "Reader of field `FAF18`"] +pub type FAF18_R = crate::R; +#[doc = "Write proxy for field `FAF18`"] +pub struct FAF18_W<'a> { w: &'a mut W, } -impl<'a> _FAF18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FAF19W<'a> { +#[doc = "Reader of field `FAF19`"] +pub type FAF19_R = crate::R; +#[doc = "Write proxy for field `FAF19`"] +pub struct FAF19_W<'a> { w: &'a mut W, } -impl<'a> _FAF19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FAF20W<'a> { +#[doc = "Reader of field `FAF20`"] +pub type FAF20_R = crate::R; +#[doc = "Write proxy for field `FAF20`"] +pub struct FAF20_W<'a> { w: &'a mut W, } -impl<'a> _FAF20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FAF21W<'a> { +#[doc = "Reader of field `FAF21`"] +pub type FAF21_R = crate::R; +#[doc = "Write proxy for field `FAF21`"] +pub struct FAF21_W<'a> { w: &'a mut W, } -impl<'a> _FAF21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FAF22W<'a> { +#[doc = "Reader of field `FAF22`"] +pub type FAF22_R = crate::R; +#[doc = "Write proxy for field `FAF22`"] +pub struct FAF22_W<'a> { w: &'a mut W, } -impl<'a> _FAF22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FAF23W<'a> { +#[doc = "Reader of field `FAF23`"] +pub type FAF23_R = crate::R; +#[doc = "Write proxy for field `FAF23`"] +pub struct FAF23_W<'a> { w: &'a mut W, } -impl<'a> _FAF23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FAF24W<'a> { +#[doc = "Reader of field `FAF24`"] +pub type FAF24_R = crate::R; +#[doc = "Write proxy for field `FAF24`"] +pub struct FAF24_W<'a> { w: &'a mut W, } -impl<'a> _FAF24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FAF25W<'a> { +#[doc = "Reader of field `FAF25`"] +pub type FAF25_R = crate::R; +#[doc = "Write proxy for field `FAF25`"] +pub struct FAF25_W<'a> { w: &'a mut W, } -impl<'a> _FAF25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FAF26W<'a> { +#[doc = "Reader of field `FAF26`"] +pub type FAF26_R = crate::R; +#[doc = "Write proxy for field `FAF26`"] +pub struct FAF26_W<'a> { w: &'a mut W, } -impl<'a> _FAF26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FAF27W<'a> { +#[doc = "Reader of field `FAF27`"] +pub type FAF27_R = crate::R; +#[doc = "Write proxy for field `FAF27`"] +pub struct FAF27_W<'a> { w: &'a mut W, } -impl<'a> _FAF27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAF27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter 0 associated with FIFO"] - #[inline] - pub fn faf0(&self) -> FAF0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF0R { bits } + #[inline(always)] + pub fn faf0(&self) -> FAF0_R { + FAF0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter 1 associated with FIFO"] - #[inline] - pub fn faf1(&self) -> FAF1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF1R { bits } + #[inline(always)] + pub fn faf1(&self) -> FAF1_R { + FAF1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter 2 associated with FIFO"] - #[inline] - pub fn faf2(&self) -> FAF2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF2R { bits } + #[inline(always)] + pub fn faf2(&self) -> FAF2_R { + FAF2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter 3 associated with FIFO"] - #[inline] - pub fn faf3(&self) -> FAF3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF3R { bits } + #[inline(always)] + pub fn faf3(&self) -> FAF3_R { + FAF3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter 4 associated with FIFO"] - #[inline] - pub fn faf4(&self) -> FAF4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF4R { bits } + #[inline(always)] + pub fn faf4(&self) -> FAF4_R { + FAF4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter 5 associated with FIFO"] - #[inline] - pub fn faf5(&self) -> FAF5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF5R { bits } + #[inline(always)] + pub fn faf5(&self) -> FAF5_R { + FAF5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter 6 associated with FIFO"] - #[inline] - pub fn faf6(&self) -> FAF6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF6R { bits } + #[inline(always)] + pub fn faf6(&self) -> FAF6_R { + FAF6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter 7 associated with FIFO"] - #[inline] - pub fn faf7(&self) -> FAF7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF7R { bits } + #[inline(always)] + pub fn faf7(&self) -> FAF7_R { + FAF7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter 8 associated with FIFO"] - #[inline] - pub fn faf8(&self) -> FAF8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF8R { bits } + #[inline(always)] + pub fn faf8(&self) -> FAF8_R { + FAF8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter 9 associated with FIFO"] - #[inline] - pub fn faf9(&self) -> FAF9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF9R { bits } + #[inline(always)] + pub fn faf9(&self) -> FAF9_R { + FAF9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter 10 associated with FIFO"] - #[inline] - pub fn faf10(&self) -> FAF10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF10R { bits } + #[inline(always)] + pub fn faf10(&self) -> FAF10_R { + FAF10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter 11 associated with FIFO"] - #[inline] - pub fn faf11(&self) -> FAF11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF11R { bits } + #[inline(always)] + pub fn faf11(&self) -> FAF11_R { + FAF11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter 12 associated with FIFO"] - #[inline] - pub fn faf12(&self) -> FAF12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF12R { bits } + #[inline(always)] + pub fn faf12(&self) -> FAF12_R { + FAF12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter 13 associated with FIFO"] - #[inline] - pub fn faf13(&self) -> FAF13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF13R { bits } + #[inline(always)] + pub fn faf13(&self) -> FAF13_R { + FAF13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter 14 associated with FIFO"] - #[inline] - pub fn faf14(&self) -> FAF14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF14R { bits } + #[inline(always)] + pub fn faf14(&self) -> FAF14_R { + FAF14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter 15 associated with FIFO"] - #[inline] - pub fn faf15(&self) -> FAF15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF15R { bits } + #[inline(always)] + pub fn faf15(&self) -> FAF15_R { + FAF15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter 16 associated with FIFO"] - #[inline] - pub fn faf16(&self) -> FAF16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF16R { bits } + #[inline(always)] + pub fn faf16(&self) -> FAF16_R { + FAF16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter 17 associated with FIFO"] - #[inline] - pub fn faf17(&self) -> FAF17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF17R { bits } + #[inline(always)] + pub fn faf17(&self) -> FAF17_R { + FAF17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter 18 associated with FIFO"] - #[inline] - pub fn faf18(&self) -> FAF18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF18R { bits } + #[inline(always)] + pub fn faf18(&self) -> FAF18_R { + FAF18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter 19 associated with FIFO"] - #[inline] - pub fn faf19(&self) -> FAF19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF19R { bits } + #[inline(always)] + pub fn faf19(&self) -> FAF19_R { + FAF19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter 20 associated with FIFO"] - #[inline] - pub fn faf20(&self) -> FAF20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF20R { bits } + #[inline(always)] + pub fn faf20(&self) -> FAF20_R { + FAF20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter 21 associated with FIFO"] - #[inline] - pub fn faf21(&self) -> FAF21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF21R { bits } + #[inline(always)] + pub fn faf21(&self) -> FAF21_R { + FAF21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter 22 associated with FIFO"] - #[inline] - pub fn faf22(&self) -> FAF22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF22R { bits } + #[inline(always)] + pub fn faf22(&self) -> FAF22_R { + FAF22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter 23 associated with FIFO"] - #[inline] - pub fn faf23(&self) -> FAF23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF23R { bits } + #[inline(always)] + pub fn faf23(&self) -> FAF23_R { + FAF23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter 24 associated with FIFO"] - #[inline] - pub fn faf24(&self) -> FAF24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF24R { bits } + #[inline(always)] + pub fn faf24(&self) -> FAF24_R { + FAF24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter 25 associated with FIFO"] - #[inline] - pub fn faf25(&self) -> FAF25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF25R { bits } + #[inline(always)] + pub fn faf25(&self) -> FAF25_R { + FAF25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter 26 associated with FIFO"] - #[inline] - pub fn faf26(&self) -> FAF26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF26R { bits } + #[inline(always)] + pub fn faf26(&self) -> FAF26_R { + FAF26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter 27 associated with FIFO"] - #[inline] - pub fn faf27(&self) -> FAF27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FAF27R { bits } + #[inline(always)] + pub fn faf27(&self) -> FAF27_R { + FAF27_R::new(((self.bits >> 27) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter 0 associated with FIFO"] - #[inline] - pub fn faf0(&mut self) -> _FAF0W { - _FAF0W { w: self } + #[inline(always)] + pub fn faf0(&mut self) -> FAF0_W { + FAF0_W { w: self } } #[doc = "Bit 1 - Filter 1 associated with FIFO"] - #[inline] - pub fn faf1(&mut self) -> _FAF1W { - _FAF1W { w: self } + #[inline(always)] + pub fn faf1(&mut self) -> FAF1_W { + FAF1_W { w: self } } #[doc = "Bit 2 - Filter 2 associated with FIFO"] - #[inline] - pub fn faf2(&mut self) -> _FAF2W { - _FAF2W { w: self } + #[inline(always)] + pub fn faf2(&mut self) -> FAF2_W { + FAF2_W { w: self } } #[doc = "Bit 3 - Filter 3 associated with FIFO"] - #[inline] - pub fn faf3(&mut self) -> _FAF3W { - _FAF3W { w: self } + #[inline(always)] + pub fn faf3(&mut self) -> FAF3_W { + FAF3_W { w: self } } #[doc = "Bit 4 - Filter 4 associated with FIFO"] - #[inline] - pub fn faf4(&mut self) -> _FAF4W { - _FAF4W { w: self } + #[inline(always)] + pub fn faf4(&mut self) -> FAF4_W { + FAF4_W { w: self } } #[doc = "Bit 5 - Filter 5 associated with FIFO"] - #[inline] - pub fn faf5(&mut self) -> _FAF5W { - _FAF5W { w: self } + #[inline(always)] + pub fn faf5(&mut self) -> FAF5_W { + FAF5_W { w: self } } #[doc = "Bit 6 - Filter 6 associated with FIFO"] - #[inline] - pub fn faf6(&mut self) -> _FAF6W { - _FAF6W { w: self } + #[inline(always)] + pub fn faf6(&mut self) -> FAF6_W { + FAF6_W { w: self } } #[doc = "Bit 7 - Filter 7 associated with FIFO"] - #[inline] - pub fn faf7(&mut self) -> _FAF7W { - _FAF7W { w: self } + #[inline(always)] + pub fn faf7(&mut self) -> FAF7_W { + FAF7_W { w: self } } #[doc = "Bit 8 - Filter 8 associated with FIFO"] - #[inline] - pub fn faf8(&mut self) -> _FAF8W { - _FAF8W { w: self } + #[inline(always)] + pub fn faf8(&mut self) -> FAF8_W { + FAF8_W { w: self } } #[doc = "Bit 9 - Filter 9 associated with FIFO"] - #[inline] - pub fn faf9(&mut self) -> _FAF9W { - _FAF9W { w: self } + #[inline(always)] + pub fn faf9(&mut self) -> FAF9_W { + FAF9_W { w: self } } #[doc = "Bit 10 - Filter 10 associated with FIFO"] - #[inline] - pub fn faf10(&mut self) -> _FAF10W { - _FAF10W { w: self } + #[inline(always)] + pub fn faf10(&mut self) -> FAF10_W { + FAF10_W { w: self } } #[doc = "Bit 11 - Filter 11 associated with FIFO"] - #[inline] - pub fn faf11(&mut self) -> _FAF11W { - _FAF11W { w: self } + #[inline(always)] + pub fn faf11(&mut self) -> FAF11_W { + FAF11_W { w: self } } #[doc = "Bit 12 - Filter 12 associated with FIFO"] - #[inline] - pub fn faf12(&mut self) -> _FAF12W { - _FAF12W { w: self } + #[inline(always)] + pub fn faf12(&mut self) -> FAF12_W { + FAF12_W { w: self } } #[doc = "Bit 13 - Filter 13 associated with FIFO"] - #[inline] - pub fn faf13(&mut self) -> _FAF13W { - _FAF13W { w: self } + #[inline(always)] + pub fn faf13(&mut self) -> FAF13_W { + FAF13_W { w: self } } #[doc = "Bit 14 - Filter 14 associated with FIFO"] - #[inline] - pub fn faf14(&mut self) -> _FAF14W { - _FAF14W { w: self } + #[inline(always)] + pub fn faf14(&mut self) -> FAF14_W { + FAF14_W { w: self } } #[doc = "Bit 15 - Filter 15 associated with FIFO"] - #[inline] - pub fn faf15(&mut self) -> _FAF15W { - _FAF15W { w: self } + #[inline(always)] + pub fn faf15(&mut self) -> FAF15_W { + FAF15_W { w: self } } #[doc = "Bit 16 - Filter 16 associated with FIFO"] - #[inline] - pub fn faf16(&mut self) -> _FAF16W { - _FAF16W { w: self } + #[inline(always)] + pub fn faf16(&mut self) -> FAF16_W { + FAF16_W { w: self } } #[doc = "Bit 17 - Filter 17 associated with FIFO"] - #[inline] - pub fn faf17(&mut self) -> _FAF17W { - _FAF17W { w: self } + #[inline(always)] + pub fn faf17(&mut self) -> FAF17_W { + FAF17_W { w: self } } #[doc = "Bit 18 - Filter 18 associated with FIFO"] - #[inline] - pub fn faf18(&mut self) -> _FAF18W { - _FAF18W { w: self } + #[inline(always)] + pub fn faf18(&mut self) -> FAF18_W { + FAF18_W { w: self } } #[doc = "Bit 19 - Filter 19 associated with FIFO"] - #[inline] - pub fn faf19(&mut self) -> _FAF19W { - _FAF19W { w: self } + #[inline(always)] + pub fn faf19(&mut self) -> FAF19_W { + FAF19_W { w: self } } #[doc = "Bit 20 - Filter 20 associated with FIFO"] - #[inline] - pub fn faf20(&mut self) -> _FAF20W { - _FAF20W { w: self } + #[inline(always)] + pub fn faf20(&mut self) -> FAF20_W { + FAF20_W { w: self } } #[doc = "Bit 21 - Filter 21 associated with FIFO"] - #[inline] - pub fn faf21(&mut self) -> _FAF21W { - _FAF21W { w: self } + #[inline(always)] + pub fn faf21(&mut self) -> FAF21_W { + FAF21_W { w: self } } #[doc = "Bit 22 - Filter 22 associated with FIFO"] - #[inline] - pub fn faf22(&mut self) -> _FAF22W { - _FAF22W { w: self } + #[inline(always)] + pub fn faf22(&mut self) -> FAF22_W { + FAF22_W { w: self } } #[doc = "Bit 23 - Filter 23 associated with FIFO"] - #[inline] - pub fn faf23(&mut self) -> _FAF23W { - _FAF23W { w: self } + #[inline(always)] + pub fn faf23(&mut self) -> FAF23_W { + FAF23_W { w: self } } #[doc = "Bit 24 - Filter 24 associated with FIFO"] - #[inline] - pub fn faf24(&mut self) -> _FAF24W { - _FAF24W { w: self } + #[inline(always)] + pub fn faf24(&mut self) -> FAF24_W { + FAF24_W { w: self } } #[doc = "Bit 25 - Filter 25 associated with FIFO"] - #[inline] - pub fn faf25(&mut self) -> _FAF25W { - _FAF25W { w: self } + #[inline(always)] + pub fn faf25(&mut self) -> FAF25_W { + FAF25_W { w: self } } #[doc = "Bit 26 - Filter 26 associated with FIFO"] - #[inline] - pub fn faf26(&mut self) -> _FAF26W { - _FAF26W { w: self } + #[inline(always)] + pub fn faf26(&mut self) -> FAF26_W { + FAF26_W { w: self } } #[doc = "Bit 27 - Filter 27 associated with FIFO"] - #[inline] - pub fn faf27(&mut self) -> _FAF27W { - _FAF27W { w: self } + #[inline(always)] + pub fn faf27(&mut self) -> FAF27_W { + FAF27_W { w: self } } } diff --git a/src/can0/fctl.rs b/src/can0/fctl.rs index 57c20f9b1c7d72cc4e3f6d23d64ecbfb63cfe1cf..21623d005398d15ef09886b3f53a3dc22523f0a9 100644 --- a/src/can0/fctl.rs +++ b/src/can0/fctl.rs @@ -1,164 +1,74 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::FCTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct HBC1FR { - bits: u8, -} -impl HBC1FR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits +#[doc = "Reader of register FCTL"] +pub type R = crate::R; +#[doc = "Writer for register FCTL"] +pub type W = crate::W; +#[doc = "Register FCTL `reset()`'s with value 0x2a1c_0e01"] +impl crate::ResetValue for super::FCTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x2a1c_0e01 } } -#[doc = r" Value of the field"] -pub struct FLDR { - bits: bool, -} -impl FLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _HBC1FW<'a> { +#[doc = "Reader of field `HBC1F`"] +pub type HBC1F_R = crate::R; +#[doc = "Write proxy for field `HBC1F`"] +pub struct HBC1F_W<'a> { w: &'a mut W, } -impl<'a> _HBC1FW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> HBC1F_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x3f; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x3f << 8)) | (((value as u32) & 0x3f) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FLDW<'a> { +#[doc = "Reader of field `FLD`"] +pub type FLD_R = crate::R; +#[doc = "Write proxy for field `FLD`"] +pub struct FLD_W<'a> { w: &'a mut W, } -impl<'a> _FLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 8:13 - Header bank of CAN1 filter"] - #[inline] - pub fn hbc1f(&self) -> HBC1FR { - let bits = { - const MASK: u8 = 0x3f; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - HBC1FR { bits } + #[inline(always)] + pub fn hbc1f(&self) -> HBC1F_R { + HBC1F_R::new(((self.bits >> 8) & 0x3f) as u8) } #[doc = "Bit 0 - Filter lock disable"] - #[inline] - pub fn fld(&self) -> FLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FLDR { bits } + #[inline(always)] + pub fn fld(&self) -> FLD_R { + FLD_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x2a1c_0e01 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 8:13 - Header bank of CAN1 filter"] - #[inline] - pub fn hbc1f(&mut self) -> _HBC1FW { - _HBC1FW { w: self } + #[inline(always)] + pub fn hbc1f(&mut self) -> HBC1F_W { + HBC1F_W { w: self } } #[doc = "Bit 0 - Filter lock disable"] - #[inline] - pub fn fld(&mut self) -> _FLDW { - _FLDW { w: self } + #[inline(always)] + pub fn fld(&mut self) -> FLD_W { + FLD_W { w: self } } } diff --git a/src/can0/fmcfg.rs b/src/can0/fmcfg.rs index 652643d1be9ec552668b62f5d94174e273b8c23f..fe7f9b58dc530327ce220e7e5313d604831e1b6d 100644 --- a/src/can0/fmcfg.rs +++ b/src/can0/fmcfg.rs @@ -1,1716 +1,968 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::FMCFG { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FMOD27R { - bits: bool, -} -impl FMOD27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD26R { - bits: bool, -} -impl FMOD26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD25R { - bits: bool, -} -impl FMOD25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD24R { - bits: bool, -} -impl FMOD24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD23R { - bits: bool, -} -impl FMOD23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD22R { - bits: bool, -} -impl FMOD22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD21R { - bits: bool, -} -impl FMOD21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD20R { - bits: bool, -} -impl FMOD20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD19R { - bits: bool, -} -impl FMOD19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD18R { - bits: bool, -} -impl FMOD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD17R { - bits: bool, -} -impl FMOD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD16R { - bits: bool, -} -impl FMOD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD15R { - bits: bool, -} -impl FMOD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD14R { - bits: bool, -} -impl FMOD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD13R { - bits: bool, -} -impl FMOD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD12R { - bits: bool, -} -impl FMOD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD11R { - bits: bool, -} -impl FMOD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD10R { - bits: bool, -} -impl FMOD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD9R { - bits: bool, -} -impl FMOD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD8R { - bits: bool, -} -impl FMOD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD7R { - bits: bool, -} -impl FMOD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD6R { - bits: bool, -} -impl FMOD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD5R { - bits: bool, -} -impl FMOD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD4R { - bits: bool, -} -impl FMOD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD3R { - bits: bool, -} -impl FMOD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD2R { - bits: bool, -} -impl FMOD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD1R { - bits: bool, -} -impl FMOD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMOD0R { - bits: bool, -} -impl FMOD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FMOD27W<'a> { +#[doc = "Reader of register FMCFG"] +pub type R = crate::R; +#[doc = "Writer for register FMCFG"] +pub type W = crate::W; +#[doc = "Register FMCFG `reset()`'s with value 0"] +impl crate::ResetValue for super::FMCFG { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FMOD27`"] +pub type FMOD27_R = crate::R; +#[doc = "Write proxy for field `FMOD27`"] +pub struct FMOD27_W<'a> { w: &'a mut W, } -impl<'a> _FMOD27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD26W<'a> { +#[doc = "Reader of field `FMOD26`"] +pub type FMOD26_R = crate::R; +#[doc = "Write proxy for field `FMOD26`"] +pub struct FMOD26_W<'a> { w: &'a mut W, } -impl<'a> _FMOD26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD25W<'a> { +#[doc = "Reader of field `FMOD25`"] +pub type FMOD25_R = crate::R; +#[doc = "Write proxy for field `FMOD25`"] +pub struct FMOD25_W<'a> { w: &'a mut W, } -impl<'a> _FMOD25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD24W<'a> { +#[doc = "Reader of field `FMOD24`"] +pub type FMOD24_R = crate::R; +#[doc = "Write proxy for field `FMOD24`"] +pub struct FMOD24_W<'a> { w: &'a mut W, } -impl<'a> _FMOD24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD23W<'a> { +#[doc = "Reader of field `FMOD23`"] +pub type FMOD23_R = crate::R; +#[doc = "Write proxy for field `FMOD23`"] +pub struct FMOD23_W<'a> { w: &'a mut W, } -impl<'a> _FMOD23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD22W<'a> { +#[doc = "Reader of field `FMOD22`"] +pub type FMOD22_R = crate::R; +#[doc = "Write proxy for field `FMOD22`"] +pub struct FMOD22_W<'a> { w: &'a mut W, } -impl<'a> _FMOD22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD21W<'a> { +#[doc = "Reader of field `FMOD21`"] +pub type FMOD21_R = crate::R; +#[doc = "Write proxy for field `FMOD21`"] +pub struct FMOD21_W<'a> { w: &'a mut W, } -impl<'a> _FMOD21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD20W<'a> { +#[doc = "Reader of field `FMOD20`"] +pub type FMOD20_R = crate::R; +#[doc = "Write proxy for field `FMOD20`"] +pub struct FMOD20_W<'a> { w: &'a mut W, } -impl<'a> _FMOD20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD19W<'a> { +#[doc = "Reader of field `FMOD19`"] +pub type FMOD19_R = crate::R; +#[doc = "Write proxy for field `FMOD19`"] +pub struct FMOD19_W<'a> { w: &'a mut W, } -impl<'a> _FMOD19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD18W<'a> { +#[doc = "Reader of field `FMOD18`"] +pub type FMOD18_R = crate::R; +#[doc = "Write proxy for field `FMOD18`"] +pub struct FMOD18_W<'a> { w: &'a mut W, } -impl<'a> _FMOD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD17W<'a> { +#[doc = "Reader of field `FMOD17`"] +pub type FMOD17_R = crate::R; +#[doc = "Write proxy for field `FMOD17`"] +pub struct FMOD17_W<'a> { w: &'a mut W, } -impl<'a> _FMOD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD16W<'a> { +#[doc = "Reader of field `FMOD16`"] +pub type FMOD16_R = crate::R; +#[doc = "Write proxy for field `FMOD16`"] +pub struct FMOD16_W<'a> { w: &'a mut W, } -impl<'a> _FMOD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD15W<'a> { +#[doc = "Reader of field `FMOD15`"] +pub type FMOD15_R = crate::R; +#[doc = "Write proxy for field `FMOD15`"] +pub struct FMOD15_W<'a> { w: &'a mut W, } -impl<'a> _FMOD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD14W<'a> { +#[doc = "Reader of field `FMOD14`"] +pub type FMOD14_R = crate::R; +#[doc = "Write proxy for field `FMOD14`"] +pub struct FMOD14_W<'a> { w: &'a mut W, } -impl<'a> _FMOD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD13W<'a> { +#[doc = "Reader of field `FMOD13`"] +pub type FMOD13_R = crate::R; +#[doc = "Write proxy for field `FMOD13`"] +pub struct FMOD13_W<'a> { w: &'a mut W, } -impl<'a> _FMOD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD12W<'a> { +#[doc = "Reader of field `FMOD12`"] +pub type FMOD12_R = crate::R; +#[doc = "Write proxy for field `FMOD12`"] +pub struct FMOD12_W<'a> { w: &'a mut W, } -impl<'a> _FMOD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD11W<'a> { +#[doc = "Reader of field `FMOD11`"] +pub type FMOD11_R = crate::R; +#[doc = "Write proxy for field `FMOD11`"] +pub struct FMOD11_W<'a> { w: &'a mut W, } -impl<'a> _FMOD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD10W<'a> { +#[doc = "Reader of field `FMOD10`"] +pub type FMOD10_R = crate::R; +#[doc = "Write proxy for field `FMOD10`"] +pub struct FMOD10_W<'a> { w: &'a mut W, } -impl<'a> _FMOD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD9W<'a> { +#[doc = "Reader of field `FMOD9`"] +pub type FMOD9_R = crate::R; +#[doc = "Write proxy for field `FMOD9`"] +pub struct FMOD9_W<'a> { w: &'a mut W, } -impl<'a> _FMOD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD8W<'a> { +#[doc = "Reader of field `FMOD8`"] +pub type FMOD8_R = crate::R; +#[doc = "Write proxy for field `FMOD8`"] +pub struct FMOD8_W<'a> { w: &'a mut W, } -impl<'a> _FMOD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD7W<'a> { +#[doc = "Reader of field `FMOD7`"] +pub type FMOD7_R = crate::R; +#[doc = "Write proxy for field `FMOD7`"] +pub struct FMOD7_W<'a> { w: &'a mut W, } -impl<'a> _FMOD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD6W<'a> { +#[doc = "Reader of field `FMOD6`"] +pub type FMOD6_R = crate::R; +#[doc = "Write proxy for field `FMOD6`"] +pub struct FMOD6_W<'a> { w: &'a mut W, } -impl<'a> _FMOD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD5W<'a> { +#[doc = "Reader of field `FMOD5`"] +pub type FMOD5_R = crate::R; +#[doc = "Write proxy for field `FMOD5`"] +pub struct FMOD5_W<'a> { w: &'a mut W, } -impl<'a> _FMOD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD4W<'a> { +#[doc = "Reader of field `FMOD4`"] +pub type FMOD4_R = crate::R; +#[doc = "Write proxy for field `FMOD4`"] +pub struct FMOD4_W<'a> { w: &'a mut W, } -impl<'a> _FMOD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD3W<'a> { +#[doc = "Reader of field `FMOD3`"] +pub type FMOD3_R = crate::R; +#[doc = "Write proxy for field `FMOD3`"] +pub struct FMOD3_W<'a> { w: &'a mut W, } -impl<'a> _FMOD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD2W<'a> { +#[doc = "Reader of field `FMOD2`"] +pub type FMOD2_R = crate::R; +#[doc = "Write proxy for field `FMOD2`"] +pub struct FMOD2_W<'a> { w: &'a mut W, } -impl<'a> _FMOD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD1W<'a> { +#[doc = "Reader of field `FMOD1`"] +pub type FMOD1_R = crate::R; +#[doc = "Write proxy for field `FMOD1`"] +pub struct FMOD1_W<'a> { w: &'a mut W, } -impl<'a> _FMOD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FMOD0W<'a> { +#[doc = "Reader of field `FMOD0`"] +pub type FMOD0_R = crate::R; +#[doc = "Write proxy for field `FMOD0`"] +pub struct FMOD0_W<'a> { w: &'a mut W, } -impl<'a> _FMOD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMOD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 27 - Filter mode"] - #[inline] - pub fn fmod27(&self) -> FMOD27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD27R { bits } + #[inline(always)] + pub fn fmod27(&self) -> FMOD27_R { + FMOD27_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 26 - Filter mode"] - #[inline] - pub fn fmod26(&self) -> FMOD26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD26R { bits } + #[inline(always)] + pub fn fmod26(&self) -> FMOD26_R { + FMOD26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 25 - Filter mode"] - #[inline] - pub fn fmod25(&self) -> FMOD25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD25R { bits } + #[inline(always)] + pub fn fmod25(&self) -> FMOD25_R { + FMOD25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 24 - Filter mode"] - #[inline] - pub fn fmod24(&self) -> FMOD24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD24R { bits } + #[inline(always)] + pub fn fmod24(&self) -> FMOD24_R { + FMOD24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 23 - Filter mode"] - #[inline] - pub fn fmod23(&self) -> FMOD23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD23R { bits } + #[inline(always)] + pub fn fmod23(&self) -> FMOD23_R { + FMOD23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 22 - Filter mode"] - #[inline] - pub fn fmod22(&self) -> FMOD22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD22R { bits } + #[inline(always)] + pub fn fmod22(&self) -> FMOD22_R { + FMOD22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 21 - Filter mode"] - #[inline] - pub fn fmod21(&self) -> FMOD21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD21R { bits } + #[inline(always)] + pub fn fmod21(&self) -> FMOD21_R { + FMOD21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 20 - Filter mode"] - #[inline] - pub fn fmod20(&self) -> FMOD20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD20R { bits } + #[inline(always)] + pub fn fmod20(&self) -> FMOD20_R { + FMOD20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 19 - Filter mode"] - #[inline] - pub fn fmod19(&self) -> FMOD19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD19R { bits } + #[inline(always)] + pub fn fmod19(&self) -> FMOD19_R { + FMOD19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 18 - Filter mode"] - #[inline] - pub fn fmod18(&self) -> FMOD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD18R { bits } + #[inline(always)] + pub fn fmod18(&self) -> FMOD18_R { + FMOD18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 17 - Filter mode"] - #[inline] - pub fn fmod17(&self) -> FMOD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD17R { bits } + #[inline(always)] + pub fn fmod17(&self) -> FMOD17_R { + FMOD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 16 - Filter mode"] - #[inline] - pub fn fmod16(&self) -> FMOD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD16R { bits } + #[inline(always)] + pub fn fmod16(&self) -> FMOD16_R { + FMOD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 15 - Filter mode"] - #[inline] - pub fn fmod15(&self) -> FMOD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD15R { bits } + #[inline(always)] + pub fn fmod15(&self) -> FMOD15_R { + FMOD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 14 - Filter mode"] - #[inline] - pub fn fmod14(&self) -> FMOD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD14R { bits } + #[inline(always)] + pub fn fmod14(&self) -> FMOD14_R { + FMOD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 13 - Filter mode"] - #[inline] - pub fn fmod13(&self) -> FMOD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD13R { bits } + #[inline(always)] + pub fn fmod13(&self) -> FMOD13_R { + FMOD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - Filter mode"] - #[inline] - pub fn fmod12(&self) -> FMOD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD12R { bits } + #[inline(always)] + pub fn fmod12(&self) -> FMOD12_R { + FMOD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Filter mode"] - #[inline] - pub fn fmod11(&self) -> FMOD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD11R { bits } + #[inline(always)] + pub fn fmod11(&self) -> FMOD11_R { + FMOD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Filter mode"] - #[inline] - pub fn fmod10(&self) -> FMOD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD10R { bits } + #[inline(always)] + pub fn fmod10(&self) -> FMOD10_R { + FMOD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Filter mode"] - #[inline] - pub fn fmod9(&self) -> FMOD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD9R { bits } + #[inline(always)] + pub fn fmod9(&self) -> FMOD9_R { + FMOD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Filter mode"] - #[inline] - pub fn fmod8(&self) -> FMOD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD8R { bits } + #[inline(always)] + pub fn fmod8(&self) -> FMOD8_R { + FMOD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - Filter mode"] - #[inline] - pub fn fmod7(&self) -> FMOD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD7R { bits } + #[inline(always)] + pub fn fmod7(&self) -> FMOD7_R { + FMOD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Filter mode"] - #[inline] - pub fn fmod6(&self) -> FMOD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD6R { bits } + #[inline(always)] + pub fn fmod6(&self) -> FMOD6_R { + FMOD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Filter mode"] - #[inline] - pub fn fmod5(&self) -> FMOD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD5R { bits } + #[inline(always)] + pub fn fmod5(&self) -> FMOD5_R { + FMOD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Filter mode"] - #[inline] - pub fn fmod4(&self) -> FMOD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD4R { bits } + #[inline(always)] + pub fn fmod4(&self) -> FMOD4_R { + FMOD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Filter mode"] - #[inline] - pub fn fmod3(&self) -> FMOD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD3R { bits } + #[inline(always)] + pub fn fmod3(&self) -> FMOD3_R { + FMOD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Filter mode"] - #[inline] - pub fn fmod2(&self) -> FMOD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD2R { bits } + #[inline(always)] + pub fn fmod2(&self) -> FMOD2_R { + FMOD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Filter mode"] - #[inline] - pub fn fmod1(&self) -> FMOD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD1R { bits } + #[inline(always)] + pub fn fmod1(&self) -> FMOD1_R { + FMOD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Filter mode"] - #[inline] - pub fn fmod0(&self) -> FMOD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMOD0R { bits } + #[inline(always)] + pub fn fmod0(&self) -> FMOD0_R { + FMOD0_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 27 - Filter mode"] - #[inline] - pub fn fmod27(&mut self) -> _FMOD27W { - _FMOD27W { w: self } + #[inline(always)] + pub fn fmod27(&mut self) -> FMOD27_W { + FMOD27_W { w: self } } #[doc = "Bit 26 - Filter mode"] - #[inline] - pub fn fmod26(&mut self) -> _FMOD26W { - _FMOD26W { w: self } + #[inline(always)] + pub fn fmod26(&mut self) -> FMOD26_W { + FMOD26_W { w: self } } #[doc = "Bit 25 - Filter mode"] - #[inline] - pub fn fmod25(&mut self) -> _FMOD25W { - _FMOD25W { w: self } + #[inline(always)] + pub fn fmod25(&mut self) -> FMOD25_W { + FMOD25_W { w: self } } #[doc = "Bit 24 - Filter mode"] - #[inline] - pub fn fmod24(&mut self) -> _FMOD24W { - _FMOD24W { w: self } + #[inline(always)] + pub fn fmod24(&mut self) -> FMOD24_W { + FMOD24_W { w: self } } #[doc = "Bit 23 - Filter mode"] - #[inline] - pub fn fmod23(&mut self) -> _FMOD23W { - _FMOD23W { w: self } + #[inline(always)] + pub fn fmod23(&mut self) -> FMOD23_W { + FMOD23_W { w: self } } #[doc = "Bit 22 - Filter mode"] - #[inline] - pub fn fmod22(&mut self) -> _FMOD22W { - _FMOD22W { w: self } + #[inline(always)] + pub fn fmod22(&mut self) -> FMOD22_W { + FMOD22_W { w: self } } #[doc = "Bit 21 - Filter mode"] - #[inline] - pub fn fmod21(&mut self) -> _FMOD21W { - _FMOD21W { w: self } + #[inline(always)] + pub fn fmod21(&mut self) -> FMOD21_W { + FMOD21_W { w: self } } #[doc = "Bit 20 - Filter mode"] - #[inline] - pub fn fmod20(&mut self) -> _FMOD20W { - _FMOD20W { w: self } + #[inline(always)] + pub fn fmod20(&mut self) -> FMOD20_W { + FMOD20_W { w: self } } #[doc = "Bit 19 - Filter mode"] - #[inline] - pub fn fmod19(&mut self) -> _FMOD19W { - _FMOD19W { w: self } + #[inline(always)] + pub fn fmod19(&mut self) -> FMOD19_W { + FMOD19_W { w: self } } #[doc = "Bit 18 - Filter mode"] - #[inline] - pub fn fmod18(&mut self) -> _FMOD18W { - _FMOD18W { w: self } + #[inline(always)] + pub fn fmod18(&mut self) -> FMOD18_W { + FMOD18_W { w: self } } #[doc = "Bit 17 - Filter mode"] - #[inline] - pub fn fmod17(&mut self) -> _FMOD17W { - _FMOD17W { w: self } + #[inline(always)] + pub fn fmod17(&mut self) -> FMOD17_W { + FMOD17_W { w: self } } #[doc = "Bit 16 - Filter mode"] - #[inline] - pub fn fmod16(&mut self) -> _FMOD16W { - _FMOD16W { w: self } + #[inline(always)] + pub fn fmod16(&mut self) -> FMOD16_W { + FMOD16_W { w: self } } #[doc = "Bit 15 - Filter mode"] - #[inline] - pub fn fmod15(&mut self) -> _FMOD15W { - _FMOD15W { w: self } + #[inline(always)] + pub fn fmod15(&mut self) -> FMOD15_W { + FMOD15_W { w: self } } #[doc = "Bit 14 - Filter mode"] - #[inline] - pub fn fmod14(&mut self) -> _FMOD14W { - _FMOD14W { w: self } + #[inline(always)] + pub fn fmod14(&mut self) -> FMOD14_W { + FMOD14_W { w: self } } #[doc = "Bit 13 - Filter mode"] - #[inline] - pub fn fmod13(&mut self) -> _FMOD13W { - _FMOD13W { w: self } + #[inline(always)] + pub fn fmod13(&mut self) -> FMOD13_W { + FMOD13_W { w: self } } #[doc = "Bit 12 - Filter mode"] - #[inline] - pub fn fmod12(&mut self) -> _FMOD12W { - _FMOD12W { w: self } + #[inline(always)] + pub fn fmod12(&mut self) -> FMOD12_W { + FMOD12_W { w: self } } #[doc = "Bit 11 - Filter mode"] - #[inline] - pub fn fmod11(&mut self) -> _FMOD11W { - _FMOD11W { w: self } + #[inline(always)] + pub fn fmod11(&mut self) -> FMOD11_W { + FMOD11_W { w: self } } #[doc = "Bit 10 - Filter mode"] - #[inline] - pub fn fmod10(&mut self) -> _FMOD10W { - _FMOD10W { w: self } + #[inline(always)] + pub fn fmod10(&mut self) -> FMOD10_W { + FMOD10_W { w: self } } #[doc = "Bit 9 - Filter mode"] - #[inline] - pub fn fmod9(&mut self) -> _FMOD9W { - _FMOD9W { w: self } + #[inline(always)] + pub fn fmod9(&mut self) -> FMOD9_W { + FMOD9_W { w: self } } #[doc = "Bit 8 - Filter mode"] - #[inline] - pub fn fmod8(&mut self) -> _FMOD8W { - _FMOD8W { w: self } + #[inline(always)] + pub fn fmod8(&mut self) -> FMOD8_W { + FMOD8_W { w: self } } #[doc = "Bit 7 - Filter mode"] - #[inline] - pub fn fmod7(&mut self) -> _FMOD7W { - _FMOD7W { w: self } + #[inline(always)] + pub fn fmod7(&mut self) -> FMOD7_W { + FMOD7_W { w: self } } #[doc = "Bit 6 - Filter mode"] - #[inline] - pub fn fmod6(&mut self) -> _FMOD6W { - _FMOD6W { w: self } + #[inline(always)] + pub fn fmod6(&mut self) -> FMOD6_W { + FMOD6_W { w: self } } #[doc = "Bit 5 - Filter mode"] - #[inline] - pub fn fmod5(&mut self) -> _FMOD5W { - _FMOD5W { w: self } + #[inline(always)] + pub fn fmod5(&mut self) -> FMOD5_W { + FMOD5_W { w: self } } #[doc = "Bit 4 - Filter mode"] - #[inline] - pub fn fmod4(&mut self) -> _FMOD4W { - _FMOD4W { w: self } + #[inline(always)] + pub fn fmod4(&mut self) -> FMOD4_W { + FMOD4_W { w: self } } #[doc = "Bit 3 - Filter mode"] - #[inline] - pub fn fmod3(&mut self) -> _FMOD3W { - _FMOD3W { w: self } + #[inline(always)] + pub fn fmod3(&mut self) -> FMOD3_W { + FMOD3_W { w: self } } #[doc = "Bit 2 - Filter mode"] - #[inline] - pub fn fmod2(&mut self) -> _FMOD2W { - _FMOD2W { w: self } + #[inline(always)] + pub fn fmod2(&mut self) -> FMOD2_W { + FMOD2_W { w: self } } #[doc = "Bit 1 - Filter mode"] - #[inline] - pub fn fmod1(&mut self) -> _FMOD1W { - _FMOD1W { w: self } + #[inline(always)] + pub fn fmod1(&mut self) -> FMOD1_W { + FMOD1_W { w: self } } #[doc = "Bit 0 - Filter mode"] - #[inline] - pub fn fmod0(&mut self) -> _FMOD0W { - _FMOD0W { w: self } + #[inline(always)] + pub fn fmod0(&mut self) -> FMOD0_W { + FMOD0_W { w: self } } } diff --git a/src/can0/fscfg.rs b/src/can0/fscfg.rs index b9dac95705ea01988b64f1d6da2b36302ab34e15..0f06cd41615dba74471e93cfab48d7bb2a9df703 100644 --- a/src/can0/fscfg.rs +++ b/src/can0/fscfg.rs @@ -1,1716 +1,968 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::FSCFG { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FS0R { - bits: bool, -} -impl FS0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS1R { - bits: bool, -} -impl FS1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS2R { - bits: bool, -} -impl FS2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS3R { - bits: bool, -} -impl FS3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS4R { - bits: bool, -} -impl FS4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS5R { - bits: bool, -} -impl FS5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS6R { - bits: bool, -} -impl FS6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS7R { - bits: bool, -} -impl FS7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS8R { - bits: bool, -} -impl FS8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS9R { - bits: bool, -} -impl FS9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS10R { - bits: bool, -} -impl FS10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS11R { - bits: bool, -} -impl FS11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS12R { - bits: bool, -} -impl FS12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS13R { - bits: bool, -} -impl FS13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS14R { - bits: bool, -} -impl FS14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS15R { - bits: bool, -} -impl FS15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS16R { - bits: bool, -} -impl FS16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS17R { - bits: bool, -} -impl FS17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS18R { - bits: bool, -} -impl FS18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS19R { - bits: bool, -} -impl FS19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS20R { - bits: bool, -} -impl FS20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS21R { - bits: bool, -} -impl FS21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS22R { - bits: bool, -} -impl FS22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS23R { - bits: bool, -} -impl FS23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS24R { - bits: bool, -} -impl FS24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS25R { - bits: bool, -} -impl FS25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS26R { - bits: bool, -} -impl FS26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FS27R { - bits: bool, -} -impl FS27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FS0W<'a> { +#[doc = "Reader of register FSCFG"] +pub type R = crate::R; +#[doc = "Writer for register FSCFG"] +pub type W = crate::W; +#[doc = "Register FSCFG `reset()`'s with value 0"] +impl crate::ResetValue for super::FSCFG { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FS0`"] +pub type FS0_R = crate::R; +#[doc = "Write proxy for field `FS0`"] +pub struct FS0_W<'a> { w: &'a mut W, } -impl<'a> _FS0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FS1W<'a> { +#[doc = "Reader of field `FS1`"] +pub type FS1_R = crate::R; +#[doc = "Write proxy for field `FS1`"] +pub struct FS1_W<'a> { w: &'a mut W, } -impl<'a> _FS1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FS2W<'a> { +#[doc = "Reader of field `FS2`"] +pub type FS2_R = crate::R; +#[doc = "Write proxy for field `FS2`"] +pub struct FS2_W<'a> { w: &'a mut W, } -impl<'a> _FS2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FS3W<'a> { +#[doc = "Reader of field `FS3`"] +pub type FS3_R = crate::R; +#[doc = "Write proxy for field `FS3`"] +pub struct FS3_W<'a> { w: &'a mut W, } -impl<'a> _FS3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FS4W<'a> { +#[doc = "Reader of field `FS4`"] +pub type FS4_R = crate::R; +#[doc = "Write proxy for field `FS4`"] +pub struct FS4_W<'a> { w: &'a mut W, } -impl<'a> _FS4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FS5W<'a> { +#[doc = "Reader of field `FS5`"] +pub type FS5_R = crate::R; +#[doc = "Write proxy for field `FS5`"] +pub struct FS5_W<'a> { w: &'a mut W, } -impl<'a> _FS5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FS6W<'a> { +#[doc = "Reader of field `FS6`"] +pub type FS6_R = crate::R; +#[doc = "Write proxy for field `FS6`"] +pub struct FS6_W<'a> { w: &'a mut W, } -impl<'a> _FS6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FS7W<'a> { +#[doc = "Reader of field `FS7`"] +pub type FS7_R = crate::R; +#[doc = "Write proxy for field `FS7`"] +pub struct FS7_W<'a> { w: &'a mut W, } -impl<'a> _FS7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FS8W<'a> { +#[doc = "Reader of field `FS8`"] +pub type FS8_R = crate::R; +#[doc = "Write proxy for field `FS8`"] +pub struct FS8_W<'a> { w: &'a mut W, } -impl<'a> _FS8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FS9W<'a> { +#[doc = "Reader of field `FS9`"] +pub type FS9_R = crate::R; +#[doc = "Write proxy for field `FS9`"] +pub struct FS9_W<'a> { w: &'a mut W, } -impl<'a> _FS9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FS10W<'a> { +#[doc = "Reader of field `FS10`"] +pub type FS10_R = crate::R; +#[doc = "Write proxy for field `FS10`"] +pub struct FS10_W<'a> { w: &'a mut W, } -impl<'a> _FS10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FS11W<'a> { +#[doc = "Reader of field `FS11`"] +pub type FS11_R = crate::R; +#[doc = "Write proxy for field `FS11`"] +pub struct FS11_W<'a> { w: &'a mut W, } -impl<'a> _FS11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FS12W<'a> { +#[doc = "Reader of field `FS12`"] +pub type FS12_R = crate::R; +#[doc = "Write proxy for field `FS12`"] +pub struct FS12_W<'a> { w: &'a mut W, } -impl<'a> _FS12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FS13W<'a> { +#[doc = "Reader of field `FS13`"] +pub type FS13_R = crate::R; +#[doc = "Write proxy for field `FS13`"] +pub struct FS13_W<'a> { w: &'a mut W, } -impl<'a> _FS13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FS14W<'a> { +#[doc = "Reader of field `FS14`"] +pub type FS14_R = crate::R; +#[doc = "Write proxy for field `FS14`"] +pub struct FS14_W<'a> { w: &'a mut W, } -impl<'a> _FS14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FS15W<'a> { +#[doc = "Reader of field `FS15`"] +pub type FS15_R = crate::R; +#[doc = "Write proxy for field `FS15`"] +pub struct FS15_W<'a> { w: &'a mut W, } -impl<'a> _FS15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FS16W<'a> { +#[doc = "Reader of field `FS16`"] +pub type FS16_R = crate::R; +#[doc = "Write proxy for field `FS16`"] +pub struct FS16_W<'a> { w: &'a mut W, } -impl<'a> _FS16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FS17W<'a> { +#[doc = "Reader of field `FS17`"] +pub type FS17_R = crate::R; +#[doc = "Write proxy for field `FS17`"] +pub struct FS17_W<'a> { w: &'a mut W, } -impl<'a> _FS17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FS18W<'a> { +#[doc = "Reader of field `FS18`"] +pub type FS18_R = crate::R; +#[doc = "Write proxy for field `FS18`"] +pub struct FS18_W<'a> { w: &'a mut W, } -impl<'a> _FS18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FS19W<'a> { +#[doc = "Reader of field `FS19`"] +pub type FS19_R = crate::R; +#[doc = "Write proxy for field `FS19`"] +pub struct FS19_W<'a> { w: &'a mut W, } -impl<'a> _FS19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FS20W<'a> { +#[doc = "Reader of field `FS20`"] +pub type FS20_R = crate::R; +#[doc = "Write proxy for field `FS20`"] +pub struct FS20_W<'a> { w: &'a mut W, } -impl<'a> _FS20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FS21W<'a> { +#[doc = "Reader of field `FS21`"] +pub type FS21_R = crate::R; +#[doc = "Write proxy for field `FS21`"] +pub struct FS21_W<'a> { w: &'a mut W, } -impl<'a> _FS21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FS22W<'a> { +#[doc = "Reader of field `FS22`"] +pub type FS22_R = crate::R; +#[doc = "Write proxy for field `FS22`"] +pub struct FS22_W<'a> { w: &'a mut W, } -impl<'a> _FS22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FS23W<'a> { +#[doc = "Reader of field `FS23`"] +pub type FS23_R = crate::R; +#[doc = "Write proxy for field `FS23`"] +pub struct FS23_W<'a> { w: &'a mut W, } -impl<'a> _FS23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FS24W<'a> { +#[doc = "Reader of field `FS24`"] +pub type FS24_R = crate::R; +#[doc = "Write proxy for field `FS24`"] +pub struct FS24_W<'a> { w: &'a mut W, } -impl<'a> _FS24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FS25W<'a> { +#[doc = "Reader of field `FS25`"] +pub type FS25_R = crate::R; +#[doc = "Write proxy for field `FS25`"] +pub struct FS25_W<'a> { w: &'a mut W, } -impl<'a> _FS25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FS26W<'a> { +#[doc = "Reader of field `FS26`"] +pub type FS26_R = crate::R; +#[doc = "Write proxy for field `FS26`"] +pub struct FS26_W<'a> { w: &'a mut W, } -impl<'a> _FS26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FS27W<'a> { +#[doc = "Reader of field `FS27`"] +pub type FS27_R = crate::R; +#[doc = "Write proxy for field `FS27`"] +pub struct FS27_W<'a> { w: &'a mut W, } -impl<'a> _FS27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FS27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter scale configuration"] - #[inline] - pub fn fs0(&self) -> FS0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS0R { bits } + #[inline(always)] + pub fn fs0(&self) -> FS0_R { + FS0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter scale configuration"] - #[inline] - pub fn fs1(&self) -> FS1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS1R { bits } + #[inline(always)] + pub fn fs1(&self) -> FS1_R { + FS1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter scale configuration"] - #[inline] - pub fn fs2(&self) -> FS2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS2R { bits } + #[inline(always)] + pub fn fs2(&self) -> FS2_R { + FS2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter scale configuration"] - #[inline] - pub fn fs3(&self) -> FS3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS3R { bits } + #[inline(always)] + pub fn fs3(&self) -> FS3_R { + FS3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter scale configuration"] - #[inline] - pub fn fs4(&self) -> FS4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS4R { bits } + #[inline(always)] + pub fn fs4(&self) -> FS4_R { + FS4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter scale configuration"] - #[inline] - pub fn fs5(&self) -> FS5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS5R { bits } + #[inline(always)] + pub fn fs5(&self) -> FS5_R { + FS5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter scale configuration"] - #[inline] - pub fn fs6(&self) -> FS6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS6R { bits } + #[inline(always)] + pub fn fs6(&self) -> FS6_R { + FS6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter scale configuration"] - #[inline] - pub fn fs7(&self) -> FS7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS7R { bits } + #[inline(always)] + pub fn fs7(&self) -> FS7_R { + FS7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter scale configuration"] - #[inline] - pub fn fs8(&self) -> FS8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS8R { bits } + #[inline(always)] + pub fn fs8(&self) -> FS8_R { + FS8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter scale configuration"] - #[inline] - pub fn fs9(&self) -> FS9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS9R { bits } + #[inline(always)] + pub fn fs9(&self) -> FS9_R { + FS9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter scale configuration"] - #[inline] - pub fn fs10(&self) -> FS10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS10R { bits } + #[inline(always)] + pub fn fs10(&self) -> FS10_R { + FS10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter scale configuration"] - #[inline] - pub fn fs11(&self) -> FS11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS11R { bits } + #[inline(always)] + pub fn fs11(&self) -> FS11_R { + FS11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter scale configuration"] - #[inline] - pub fn fs12(&self) -> FS12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS12R { bits } + #[inline(always)] + pub fn fs12(&self) -> FS12_R { + FS12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter scale configuration"] - #[inline] - pub fn fs13(&self) -> FS13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS13R { bits } + #[inline(always)] + pub fn fs13(&self) -> FS13_R { + FS13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter scale configuration"] - #[inline] - pub fn fs14(&self) -> FS14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS14R { bits } + #[inline(always)] + pub fn fs14(&self) -> FS14_R { + FS14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter scale configuration"] - #[inline] - pub fn fs15(&self) -> FS15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS15R { bits } + #[inline(always)] + pub fn fs15(&self) -> FS15_R { + FS15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter scale configuration"] - #[inline] - pub fn fs16(&self) -> FS16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS16R { bits } + #[inline(always)] + pub fn fs16(&self) -> FS16_R { + FS16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter scale configuration"] - #[inline] - pub fn fs17(&self) -> FS17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS17R { bits } + #[inline(always)] + pub fn fs17(&self) -> FS17_R { + FS17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter scale configuration"] - #[inline] - pub fn fs18(&self) -> FS18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS18R { bits } + #[inline(always)] + pub fn fs18(&self) -> FS18_R { + FS18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter scale configuration"] - #[inline] - pub fn fs19(&self) -> FS19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS19R { bits } + #[inline(always)] + pub fn fs19(&self) -> FS19_R { + FS19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter scale configuration"] - #[inline] - pub fn fs20(&self) -> FS20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS20R { bits } + #[inline(always)] + pub fn fs20(&self) -> FS20_R { + FS20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter scale configuration"] - #[inline] - pub fn fs21(&self) -> FS21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS21R { bits } + #[inline(always)] + pub fn fs21(&self) -> FS21_R { + FS21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter scale configuration"] - #[inline] - pub fn fs22(&self) -> FS22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS22R { bits } + #[inline(always)] + pub fn fs22(&self) -> FS22_R { + FS22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter scale configuration"] - #[inline] - pub fn fs23(&self) -> FS23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS23R { bits } + #[inline(always)] + pub fn fs23(&self) -> FS23_R { + FS23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter scale configuration"] - #[inline] - pub fn fs24(&self) -> FS24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS24R { bits } + #[inline(always)] + pub fn fs24(&self) -> FS24_R { + FS24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter scale configuration"] - #[inline] - pub fn fs25(&self) -> FS25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS25R { bits } + #[inline(always)] + pub fn fs25(&self) -> FS25_R { + FS25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter scale configuration"] - #[inline] - pub fn fs26(&self) -> FS26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS26R { bits } + #[inline(always)] + pub fn fs26(&self) -> FS26_R { + FS26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter scale configuration"] - #[inline] - pub fn fs27(&self) -> FS27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FS27R { bits } + #[inline(always)] + pub fn fs27(&self) -> FS27_R { + FS27_R::new(((self.bits >> 27) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter scale configuration"] - #[inline] - pub fn fs0(&mut self) -> _FS0W { - _FS0W { w: self } + #[inline(always)] + pub fn fs0(&mut self) -> FS0_W { + FS0_W { w: self } } #[doc = "Bit 1 - Filter scale configuration"] - #[inline] - pub fn fs1(&mut self) -> _FS1W { - _FS1W { w: self } + #[inline(always)] + pub fn fs1(&mut self) -> FS1_W { + FS1_W { w: self } } #[doc = "Bit 2 - Filter scale configuration"] - #[inline] - pub fn fs2(&mut self) -> _FS2W { - _FS2W { w: self } + #[inline(always)] + pub fn fs2(&mut self) -> FS2_W { + FS2_W { w: self } } #[doc = "Bit 3 - Filter scale configuration"] - #[inline] - pub fn fs3(&mut self) -> _FS3W { - _FS3W { w: self } + #[inline(always)] + pub fn fs3(&mut self) -> FS3_W { + FS3_W { w: self } } #[doc = "Bit 4 - Filter scale configuration"] - #[inline] - pub fn fs4(&mut self) -> _FS4W { - _FS4W { w: self } + #[inline(always)] + pub fn fs4(&mut self) -> FS4_W { + FS4_W { w: self } } #[doc = "Bit 5 - Filter scale configuration"] - #[inline] - pub fn fs5(&mut self) -> _FS5W { - _FS5W { w: self } + #[inline(always)] + pub fn fs5(&mut self) -> FS5_W { + FS5_W { w: self } } #[doc = "Bit 6 - Filter scale configuration"] - #[inline] - pub fn fs6(&mut self) -> _FS6W { - _FS6W { w: self } + #[inline(always)] + pub fn fs6(&mut self) -> FS6_W { + FS6_W { w: self } } #[doc = "Bit 7 - Filter scale configuration"] - #[inline] - pub fn fs7(&mut self) -> _FS7W { - _FS7W { w: self } + #[inline(always)] + pub fn fs7(&mut self) -> FS7_W { + FS7_W { w: self } } #[doc = "Bit 8 - Filter scale configuration"] - #[inline] - pub fn fs8(&mut self) -> _FS8W { - _FS8W { w: self } + #[inline(always)] + pub fn fs8(&mut self) -> FS8_W { + FS8_W { w: self } } #[doc = "Bit 9 - Filter scale configuration"] - #[inline] - pub fn fs9(&mut self) -> _FS9W { - _FS9W { w: self } + #[inline(always)] + pub fn fs9(&mut self) -> FS9_W { + FS9_W { w: self } } #[doc = "Bit 10 - Filter scale configuration"] - #[inline] - pub fn fs10(&mut self) -> _FS10W { - _FS10W { w: self } + #[inline(always)] + pub fn fs10(&mut self) -> FS10_W { + FS10_W { w: self } } #[doc = "Bit 11 - Filter scale configuration"] - #[inline] - pub fn fs11(&mut self) -> _FS11W { - _FS11W { w: self } + #[inline(always)] + pub fn fs11(&mut self) -> FS11_W { + FS11_W { w: self } } #[doc = "Bit 12 - Filter scale configuration"] - #[inline] - pub fn fs12(&mut self) -> _FS12W { - _FS12W { w: self } + #[inline(always)] + pub fn fs12(&mut self) -> FS12_W { + FS12_W { w: self } } #[doc = "Bit 13 - Filter scale configuration"] - #[inline] - pub fn fs13(&mut self) -> _FS13W { - _FS13W { w: self } + #[inline(always)] + pub fn fs13(&mut self) -> FS13_W { + FS13_W { w: self } } #[doc = "Bit 14 - Filter scale configuration"] - #[inline] - pub fn fs14(&mut self) -> _FS14W { - _FS14W { w: self } + #[inline(always)] + pub fn fs14(&mut self) -> FS14_W { + FS14_W { w: self } } #[doc = "Bit 15 - Filter scale configuration"] - #[inline] - pub fn fs15(&mut self) -> _FS15W { - _FS15W { w: self } + #[inline(always)] + pub fn fs15(&mut self) -> FS15_W { + FS15_W { w: self } } #[doc = "Bit 16 - Filter scale configuration"] - #[inline] - pub fn fs16(&mut self) -> _FS16W { - _FS16W { w: self } + #[inline(always)] + pub fn fs16(&mut self) -> FS16_W { + FS16_W { w: self } } #[doc = "Bit 17 - Filter scale configuration"] - #[inline] - pub fn fs17(&mut self) -> _FS17W { - _FS17W { w: self } + #[inline(always)] + pub fn fs17(&mut self) -> FS17_W { + FS17_W { w: self } } #[doc = "Bit 18 - Filter scale configuration"] - #[inline] - pub fn fs18(&mut self) -> _FS18W { - _FS18W { w: self } + #[inline(always)] + pub fn fs18(&mut self) -> FS18_W { + FS18_W { w: self } } #[doc = "Bit 19 - Filter scale configuration"] - #[inline] - pub fn fs19(&mut self) -> _FS19W { - _FS19W { w: self } + #[inline(always)] + pub fn fs19(&mut self) -> FS19_W { + FS19_W { w: self } } #[doc = "Bit 20 - Filter scale configuration"] - #[inline] - pub fn fs20(&mut self) -> _FS20W { - _FS20W { w: self } + #[inline(always)] + pub fn fs20(&mut self) -> FS20_W { + FS20_W { w: self } } #[doc = "Bit 21 - Filter scale configuration"] - #[inline] - pub fn fs21(&mut self) -> _FS21W { - _FS21W { w: self } + #[inline(always)] + pub fn fs21(&mut self) -> FS21_W { + FS21_W { w: self } } #[doc = "Bit 22 - Filter scale configuration"] - #[inline] - pub fn fs22(&mut self) -> _FS22W { - _FS22W { w: self } + #[inline(always)] + pub fn fs22(&mut self) -> FS22_W { + FS22_W { w: self } } #[doc = "Bit 23 - Filter scale configuration"] - #[inline] - pub fn fs23(&mut self) -> _FS23W { - _FS23W { w: self } + #[inline(always)] + pub fn fs23(&mut self) -> FS23_W { + FS23_W { w: self } } #[doc = "Bit 24 - Filter scale configuration"] - #[inline] - pub fn fs24(&mut self) -> _FS24W { - _FS24W { w: self } + #[inline(always)] + pub fn fs24(&mut self) -> FS24_W { + FS24_W { w: self } } #[doc = "Bit 25 - Filter scale configuration"] - #[inline] - pub fn fs25(&mut self) -> _FS25W { - _FS25W { w: self } + #[inline(always)] + pub fn fs25(&mut self) -> FS25_W { + FS25_W { w: self } } #[doc = "Bit 26 - Filter scale configuration"] - #[inline] - pub fn fs26(&mut self) -> _FS26W { - _FS26W { w: self } + #[inline(always)] + pub fn fs26(&mut self) -> FS26_W { + FS26_W { w: self } } #[doc = "Bit 27 - Filter scale configuration"] - #[inline] - pub fn fs27(&mut self) -> _FS27W { - _FS27W { w: self } + #[inline(always)] + pub fn fs27(&mut self) -> FS27_W { + FS27_W { w: self } } } diff --git a/src/can0/fw.rs b/src/can0/fw.rs index 2c48f5cc915a38f03b860fc50859fc0b4cbebaca..c25e512138ea4da7475ffd9c7c017bf101b0dc5a 100644 --- a/src/can0/fw.rs +++ b/src/can0/fw.rs @@ -1,1716 +1,968 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::FW { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FW0R { - bits: bool, -} -impl FW0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW1R { - bits: bool, -} -impl FW1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW2R { - bits: bool, -} -impl FW2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW3R { - bits: bool, -} -impl FW3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW4R { - bits: bool, -} -impl FW4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW5R { - bits: bool, -} -impl FW5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW6R { - bits: bool, -} -impl FW6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW7R { - bits: bool, -} -impl FW7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW8R { - bits: bool, -} -impl FW8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW9R { - bits: bool, -} -impl FW9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW10R { - bits: bool, -} -impl FW10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW11R { - bits: bool, -} -impl FW11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW12R { - bits: bool, -} -impl FW12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW13R { - bits: bool, -} -impl FW13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW14R { - bits: bool, -} -impl FW14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW15R { - bits: bool, -} -impl FW15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW16R { - bits: bool, -} -impl FW16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW17R { - bits: bool, -} -impl FW17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW18R { - bits: bool, -} -impl FW18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW19R { - bits: bool, -} -impl FW19R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW20R { - bits: bool, -} -impl FW20R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW21R { - bits: bool, -} -impl FW21R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW22R { - bits: bool, -} -impl FW22R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW23R { - bits: bool, -} -impl FW23R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW24R { - bits: bool, -} -impl FW24R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW25R { - bits: bool, -} -impl FW25R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW26R { - bits: bool, -} -impl FW26R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FW27R { - bits: bool, -} -impl FW27R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FW0W<'a> { +#[doc = "Reader of register FW"] +pub type R = crate::R; +#[doc = "Writer for register FW"] +pub type W = crate::W; +#[doc = "Register FW `reset()`'s with value 0"] +impl crate::ResetValue for super::FW { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FW0`"] +pub type FW0_R = crate::R; +#[doc = "Write proxy for field `FW0`"] +pub struct FW0_W<'a> { w: &'a mut W, } -impl<'a> _FW0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FW1W<'a> { +#[doc = "Reader of field `FW1`"] +pub type FW1_R = crate::R; +#[doc = "Write proxy for field `FW1`"] +pub struct FW1_W<'a> { w: &'a mut W, } -impl<'a> _FW1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FW2W<'a> { +#[doc = "Reader of field `FW2`"] +pub type FW2_R = crate::R; +#[doc = "Write proxy for field `FW2`"] +pub struct FW2_W<'a> { w: &'a mut W, } -impl<'a> _FW2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FW3W<'a> { +#[doc = "Reader of field `FW3`"] +pub type FW3_R = crate::R; +#[doc = "Write proxy for field `FW3`"] +pub struct FW3_W<'a> { w: &'a mut W, } -impl<'a> _FW3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FW4W<'a> { +#[doc = "Reader of field `FW4`"] +pub type FW4_R = crate::R; +#[doc = "Write proxy for field `FW4`"] +pub struct FW4_W<'a> { w: &'a mut W, } -impl<'a> _FW4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FW5W<'a> { +#[doc = "Reader of field `FW5`"] +pub type FW5_R = crate::R; +#[doc = "Write proxy for field `FW5`"] +pub struct FW5_W<'a> { w: &'a mut W, } -impl<'a> _FW5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FW6W<'a> { +#[doc = "Reader of field `FW6`"] +pub type FW6_R = crate::R; +#[doc = "Write proxy for field `FW6`"] +pub struct FW6_W<'a> { w: &'a mut W, } -impl<'a> _FW6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FW7W<'a> { +#[doc = "Reader of field `FW7`"] +pub type FW7_R = crate::R; +#[doc = "Write proxy for field `FW7`"] +pub struct FW7_W<'a> { w: &'a mut W, } -impl<'a> _FW7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FW8W<'a> { +#[doc = "Reader of field `FW8`"] +pub type FW8_R = crate::R; +#[doc = "Write proxy for field `FW8`"] +pub struct FW8_W<'a> { w: &'a mut W, } -impl<'a> _FW8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FW9W<'a> { +#[doc = "Reader of field `FW9`"] +pub type FW9_R = crate::R; +#[doc = "Write proxy for field `FW9`"] +pub struct FW9_W<'a> { w: &'a mut W, } -impl<'a> _FW9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FW10W<'a> { +#[doc = "Reader of field `FW10`"] +pub type FW10_R = crate::R; +#[doc = "Write proxy for field `FW10`"] +pub struct FW10_W<'a> { w: &'a mut W, } -impl<'a> _FW10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FW11W<'a> { +#[doc = "Reader of field `FW11`"] +pub type FW11_R = crate::R; +#[doc = "Write proxy for field `FW11`"] +pub struct FW11_W<'a> { w: &'a mut W, } -impl<'a> _FW11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FW12W<'a> { +#[doc = "Reader of field `FW12`"] +pub type FW12_R = crate::R; +#[doc = "Write proxy for field `FW12`"] +pub struct FW12_W<'a> { w: &'a mut W, } -impl<'a> _FW12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FW13W<'a> { +#[doc = "Reader of field `FW13`"] +pub type FW13_R = crate::R; +#[doc = "Write proxy for field `FW13`"] +pub struct FW13_W<'a> { w: &'a mut W, } -impl<'a> _FW13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FW14W<'a> { +#[doc = "Reader of field `FW14`"] +pub type FW14_R = crate::R; +#[doc = "Write proxy for field `FW14`"] +pub struct FW14_W<'a> { w: &'a mut W, } -impl<'a> _FW14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FW15W<'a> { +#[doc = "Reader of field `FW15`"] +pub type FW15_R = crate::R; +#[doc = "Write proxy for field `FW15`"] +pub struct FW15_W<'a> { w: &'a mut W, } -impl<'a> _FW15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FW16W<'a> { +#[doc = "Reader of field `FW16`"] +pub type FW16_R = crate::R; +#[doc = "Write proxy for field `FW16`"] +pub struct FW16_W<'a> { w: &'a mut W, } -impl<'a> _FW16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FW17W<'a> { +#[doc = "Reader of field `FW17`"] +pub type FW17_R = crate::R; +#[doc = "Write proxy for field `FW17`"] +pub struct FW17_W<'a> { w: &'a mut W, } -impl<'a> _FW17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FW18W<'a> { +#[doc = "Reader of field `FW18`"] +pub type FW18_R = crate::R; +#[doc = "Write proxy for field `FW18`"] +pub struct FW18_W<'a> { w: &'a mut W, } -impl<'a> _FW18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _FW19W<'a> { +#[doc = "Reader of field `FW19`"] +pub type FW19_R = crate::R; +#[doc = "Write proxy for field `FW19`"] +pub struct FW19_W<'a> { w: &'a mut W, } -impl<'a> _FW19W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW19_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _FW20W<'a> { +#[doc = "Reader of field `FW20`"] +pub type FW20_R = crate::R; +#[doc = "Write proxy for field `FW20`"] +pub struct FW20_W<'a> { w: &'a mut W, } -impl<'a> _FW20W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW20_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FW21W<'a> { +#[doc = "Reader of field `FW21`"] +pub type FW21_R = crate::R; +#[doc = "Write proxy for field `FW21`"] +pub struct FW21_W<'a> { w: &'a mut W, } -impl<'a> _FW21W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW21_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _FW22W<'a> { +#[doc = "Reader of field `FW22`"] +pub type FW22_R = crate::R; +#[doc = "Write proxy for field `FW22`"] +pub struct FW22_W<'a> { w: &'a mut W, } -impl<'a> _FW22W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW22_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _FW23W<'a> { +#[doc = "Reader of field `FW23`"] +pub type FW23_R = crate::R; +#[doc = "Write proxy for field `FW23`"] +pub struct FW23_W<'a> { w: &'a mut W, } -impl<'a> _FW23W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW23_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _FW24W<'a> { +#[doc = "Reader of field `FW24`"] +pub type FW24_R = crate::R; +#[doc = "Write proxy for field `FW24`"] +pub struct FW24_W<'a> { w: &'a mut W, } -impl<'a> _FW24W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW24_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FW25W<'a> { +#[doc = "Reader of field `FW25`"] +pub type FW25_R = crate::R; +#[doc = "Write proxy for field `FW25`"] +pub struct FW25_W<'a> { w: &'a mut W, } -impl<'a> _FW25W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW25_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _FW26W<'a> { +#[doc = "Reader of field `FW26`"] +pub type FW26_R = crate::R; +#[doc = "Write proxy for field `FW26`"] +pub struct FW26_W<'a> { w: &'a mut W, } -impl<'a> _FW26W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW26_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _FW27W<'a> { +#[doc = "Reader of field `FW27`"] +pub type FW27_R = crate::R; +#[doc = "Write proxy for field `FW27`"] +pub struct FW27_W<'a> { w: &'a mut W, } -impl<'a> _FW27W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FW27_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Filter working"] - #[inline] - pub fn fw0(&self) -> FW0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW0R { bits } + #[inline(always)] + pub fn fw0(&self) -> FW0_R { + FW0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Filter working"] - #[inline] - pub fn fw1(&self) -> FW1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW1R { bits } + #[inline(always)] + pub fn fw1(&self) -> FW1_R { + FW1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Filter working"] - #[inline] - pub fn fw2(&self) -> FW2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW2R { bits } + #[inline(always)] + pub fn fw2(&self) -> FW2_R { + FW2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Filter working"] - #[inline] - pub fn fw3(&self) -> FW3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW3R { bits } + #[inline(always)] + pub fn fw3(&self) -> FW3_R { + FW3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Filter working"] - #[inline] - pub fn fw4(&self) -> FW4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW4R { bits } + #[inline(always)] + pub fn fw4(&self) -> FW4_R { + FW4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Filter working"] - #[inline] - pub fn fw5(&self) -> FW5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW5R { bits } + #[inline(always)] + pub fn fw5(&self) -> FW5_R { + FW5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Filter working"] - #[inline] - pub fn fw6(&self) -> FW6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW6R { bits } + #[inline(always)] + pub fn fw6(&self) -> FW6_R { + FW6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Filter working"] - #[inline] - pub fn fw7(&self) -> FW7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW7R { bits } + #[inline(always)] + pub fn fw7(&self) -> FW7_R { + FW7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Filter working"] - #[inline] - pub fn fw8(&self) -> FW8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW8R { bits } + #[inline(always)] + pub fn fw8(&self) -> FW8_R { + FW8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Filter working"] - #[inline] - pub fn fw9(&self) -> FW9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW9R { bits } + #[inline(always)] + pub fn fw9(&self) -> FW9_R { + FW9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Filter working"] - #[inline] - pub fn fw10(&self) -> FW10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW10R { bits } + #[inline(always)] + pub fn fw10(&self) -> FW10_R { + FW10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Filter working"] - #[inline] - pub fn fw11(&self) -> FW11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW11R { bits } + #[inline(always)] + pub fn fw11(&self) -> FW11_R { + FW11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Filter working"] - #[inline] - pub fn fw12(&self) -> FW12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW12R { bits } + #[inline(always)] + pub fn fw12(&self) -> FW12_R { + FW12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Filter working"] - #[inline] - pub fn fw13(&self) -> FW13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW13R { bits } + #[inline(always)] + pub fn fw13(&self) -> FW13_R { + FW13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Filter working"] - #[inline] - pub fn fw14(&self) -> FW14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW14R { bits } + #[inline(always)] + pub fn fw14(&self) -> FW14_R { + FW14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Filter working"] - #[inline] - pub fn fw15(&self) -> FW15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW15R { bits } + #[inline(always)] + pub fn fw15(&self) -> FW15_R { + FW15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Filter working"] - #[inline] - pub fn fw16(&self) -> FW16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW16R { bits } + #[inline(always)] + pub fn fw16(&self) -> FW16_R { + FW16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Filter working"] - #[inline] - pub fn fw17(&self) -> FW17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW17R { bits } + #[inline(always)] + pub fn fw17(&self) -> FW17_R { + FW17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Filter working"] - #[inline] - pub fn fw18(&self) -> FW18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW18R { bits } + #[inline(always)] + pub fn fw18(&self) -> FW18_R { + FW18_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Filter working"] - #[inline] - pub fn fw19(&self) -> FW19R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW19R { bits } + #[inline(always)] + pub fn fw19(&self) -> FW19_R { + FW19_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Filter working"] - #[inline] - pub fn fw20(&self) -> FW20R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW20R { bits } + #[inline(always)] + pub fn fw20(&self) -> FW20_R { + FW20_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Filter working"] - #[inline] - pub fn fw21(&self) -> FW21R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW21R { bits } + #[inline(always)] + pub fn fw21(&self) -> FW21_R { + FW21_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Filter working"] - #[inline] - pub fn fw22(&self) -> FW22R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW22R { bits } + #[inline(always)] + pub fn fw22(&self) -> FW22_R { + FW22_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Filter working"] - #[inline] - pub fn fw23(&self) -> FW23R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW23R { bits } + #[inline(always)] + pub fn fw23(&self) -> FW23_R { + FW23_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Filter working"] - #[inline] - pub fn fw24(&self) -> FW24R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW24R { bits } + #[inline(always)] + pub fn fw24(&self) -> FW24_R { + FW24_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Filter working"] - #[inline] - pub fn fw25(&self) -> FW25R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW25R { bits } + #[inline(always)] + pub fn fw25(&self) -> FW25_R { + FW25_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Filter working"] - #[inline] - pub fn fw26(&self) -> FW26R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW26R { bits } + #[inline(always)] + pub fn fw26(&self) -> FW26_R { + FW26_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Filter working"] - #[inline] - pub fn fw27(&self) -> FW27R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FW27R { bits } + #[inline(always)] + pub fn fw27(&self) -> FW27_R { + FW27_R::new(((self.bits >> 27) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Filter working"] - #[inline] - pub fn fw0(&mut self) -> _FW0W { - _FW0W { w: self } + #[inline(always)] + pub fn fw0(&mut self) -> FW0_W { + FW0_W { w: self } } #[doc = "Bit 1 - Filter working"] - #[inline] - pub fn fw1(&mut self) -> _FW1W { - _FW1W { w: self } + #[inline(always)] + pub fn fw1(&mut self) -> FW1_W { + FW1_W { w: self } } #[doc = "Bit 2 - Filter working"] - #[inline] - pub fn fw2(&mut self) -> _FW2W { - _FW2W { w: self } + #[inline(always)] + pub fn fw2(&mut self) -> FW2_W { + FW2_W { w: self } } #[doc = "Bit 3 - Filter working"] - #[inline] - pub fn fw3(&mut self) -> _FW3W { - _FW3W { w: self } + #[inline(always)] + pub fn fw3(&mut self) -> FW3_W { + FW3_W { w: self } } #[doc = "Bit 4 - Filter working"] - #[inline] - pub fn fw4(&mut self) -> _FW4W { - _FW4W { w: self } + #[inline(always)] + pub fn fw4(&mut self) -> FW4_W { + FW4_W { w: self } } #[doc = "Bit 5 - Filter working"] - #[inline] - pub fn fw5(&mut self) -> _FW5W { - _FW5W { w: self } + #[inline(always)] + pub fn fw5(&mut self) -> FW5_W { + FW5_W { w: self } } #[doc = "Bit 6 - Filter working"] - #[inline] - pub fn fw6(&mut self) -> _FW6W { - _FW6W { w: self } + #[inline(always)] + pub fn fw6(&mut self) -> FW6_W { + FW6_W { w: self } } #[doc = "Bit 7 - Filter working"] - #[inline] - pub fn fw7(&mut self) -> _FW7W { - _FW7W { w: self } + #[inline(always)] + pub fn fw7(&mut self) -> FW7_W { + FW7_W { w: self } } #[doc = "Bit 8 - Filter working"] - #[inline] - pub fn fw8(&mut self) -> _FW8W { - _FW8W { w: self } + #[inline(always)] + pub fn fw8(&mut self) -> FW8_W { + FW8_W { w: self } } #[doc = "Bit 9 - Filter working"] - #[inline] - pub fn fw9(&mut self) -> _FW9W { - _FW9W { w: self } + #[inline(always)] + pub fn fw9(&mut self) -> FW9_W { + FW9_W { w: self } } #[doc = "Bit 10 - Filter working"] - #[inline] - pub fn fw10(&mut self) -> _FW10W { - _FW10W { w: self } + #[inline(always)] + pub fn fw10(&mut self) -> FW10_W { + FW10_W { w: self } } #[doc = "Bit 11 - Filter working"] - #[inline] - pub fn fw11(&mut self) -> _FW11W { - _FW11W { w: self } + #[inline(always)] + pub fn fw11(&mut self) -> FW11_W { + FW11_W { w: self } } #[doc = "Bit 12 - Filter working"] - #[inline] - pub fn fw12(&mut self) -> _FW12W { - _FW12W { w: self } + #[inline(always)] + pub fn fw12(&mut self) -> FW12_W { + FW12_W { w: self } } #[doc = "Bit 13 - Filter working"] - #[inline] - pub fn fw13(&mut self) -> _FW13W { - _FW13W { w: self } + #[inline(always)] + pub fn fw13(&mut self) -> FW13_W { + FW13_W { w: self } } #[doc = "Bit 14 - Filter working"] - #[inline] - pub fn fw14(&mut self) -> _FW14W { - _FW14W { w: self } + #[inline(always)] + pub fn fw14(&mut self) -> FW14_W { + FW14_W { w: self } } #[doc = "Bit 15 - Filter working"] - #[inline] - pub fn fw15(&mut self) -> _FW15W { - _FW15W { w: self } + #[inline(always)] + pub fn fw15(&mut self) -> FW15_W { + FW15_W { w: self } } #[doc = "Bit 16 - Filter working"] - #[inline] - pub fn fw16(&mut self) -> _FW16W { - _FW16W { w: self } + #[inline(always)] + pub fn fw16(&mut self) -> FW16_W { + FW16_W { w: self } } #[doc = "Bit 17 - Filter working"] - #[inline] - pub fn fw17(&mut self) -> _FW17W { - _FW17W { w: self } + #[inline(always)] + pub fn fw17(&mut self) -> FW17_W { + FW17_W { w: self } } #[doc = "Bit 18 - Filter working"] - #[inline] - pub fn fw18(&mut self) -> _FW18W { - _FW18W { w: self } + #[inline(always)] + pub fn fw18(&mut self) -> FW18_W { + FW18_W { w: self } } #[doc = "Bit 19 - Filter working"] - #[inline] - pub fn fw19(&mut self) -> _FW19W { - _FW19W { w: self } + #[inline(always)] + pub fn fw19(&mut self) -> FW19_W { + FW19_W { w: self } } #[doc = "Bit 20 - Filter working"] - #[inline] - pub fn fw20(&mut self) -> _FW20W { - _FW20W { w: self } + #[inline(always)] + pub fn fw20(&mut self) -> FW20_W { + FW20_W { w: self } } #[doc = "Bit 21 - Filter working"] - #[inline] - pub fn fw21(&mut self) -> _FW21W { - _FW21W { w: self } + #[inline(always)] + pub fn fw21(&mut self) -> FW21_W { + FW21_W { w: self } } #[doc = "Bit 22 - Filter working"] - #[inline] - pub fn fw22(&mut self) -> _FW22W { - _FW22W { w: self } + #[inline(always)] + pub fn fw22(&mut self) -> FW22_W { + FW22_W { w: self } } #[doc = "Bit 23 - Filter working"] - #[inline] - pub fn fw23(&mut self) -> _FW23W { - _FW23W { w: self } + #[inline(always)] + pub fn fw23(&mut self) -> FW23_W { + FW23_W { w: self } } #[doc = "Bit 24 - Filter working"] - #[inline] - pub fn fw24(&mut self) -> _FW24W { - _FW24W { w: self } + #[inline(always)] + pub fn fw24(&mut self) -> FW24_W { + FW24_W { w: self } } #[doc = "Bit 25 - Filter working"] - #[inline] - pub fn fw25(&mut self) -> _FW25W { - _FW25W { w: self } + #[inline(always)] + pub fn fw25(&mut self) -> FW25_W { + FW25_W { w: self } } #[doc = "Bit 26 - Filter working"] - #[inline] - pub fn fw26(&mut self) -> _FW26W { - _FW26W { w: self } + #[inline(always)] + pub fn fw26(&mut self) -> FW26_W { + FW26_W { w: self } } #[doc = "Bit 27 - Filter working"] - #[inline] - pub fn fw27(&mut self) -> _FW27W { - _FW27W { w: self } + #[inline(always)] + pub fn fw27(&mut self) -> FW27_W { + FW27_W { w: self } } } diff --git a/src/can0/inten.rs b/src/can0/inten.rs index cc1de93c99f9f6c910132aa4d70526fc992b1cae..cbe5318fc003c57f2569ee02b4bc7b335d75899a 100644 --- a/src/can0/inten.rs +++ b/src/can0/inten.rs @@ -1,890 +1,492 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::INTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SLPWIER { - bits: bool, -} -impl SLPWIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WIER { - bits: bool, -} -impl WIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRNIER { - bits: bool, -} -impl ERRNIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BOIER { - bits: bool, -} -impl BOIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PERRIER { - bits: bool, -} -impl PERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WERRIER { - bits: bool, -} -impl WERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RFOIE1R { - bits: bool, -} -impl RFOIE1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RFFIE1R { - bits: bool, -} -impl RFFIE1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RFNEIE1R { - bits: bool, -} -impl RFNEIE1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RFOIE0R { - bits: bool, -} -impl RFOIE0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RFFIE0R { - bits: bool, -} -impl RFFIE0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RFNEIE0R { - bits: bool, -} -impl RFNEIE0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TMEIER { - bits: bool, -} -impl TMEIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _SLPWIEW<'a> { +#[doc = "Reader of register INTEN"] +pub type R = crate::R; +#[doc = "Writer for register INTEN"] +pub type W = crate::W; +#[doc = "Register INTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::INTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `SLPWIE`"] +pub type SLPWIE_R = crate::R; +#[doc = "Write proxy for field `SLPWIE`"] +pub struct SLPWIE_W<'a> { w: &'a mut W, } -impl<'a> _SLPWIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SLPWIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _WIEW<'a> { +#[doc = "Reader of field `WIE`"] +pub type WIE_R = crate::R; +#[doc = "Write proxy for field `WIE`"] +pub struct WIE_W<'a> { w: &'a mut W, } -impl<'a> _WIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _ERRNIEW<'a> { +#[doc = "Reader of field `ERRNIE`"] +pub type ERRNIE_R = crate::R; +#[doc = "Write proxy for field `ERRNIE`"] +pub struct ERRNIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRNIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRNIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _BOIEW<'a> { +#[doc = "Reader of field `BOIE`"] +pub type BOIE_R = crate::R; +#[doc = "Write proxy for field `BOIE`"] +pub struct BOIE_W<'a> { w: &'a mut W, } -impl<'a> _BOIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PERRIEW<'a> { +#[doc = "Reader of field `PERRIE`"] +pub type PERRIE_R = crate::R; +#[doc = "Write proxy for field `PERRIE`"] +pub struct PERRIE_W<'a> { w: &'a mut W, } -impl<'a> _PERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _WERRIEW<'a> { +#[doc = "Reader of field `WERRIE`"] +pub type WERRIE_R = crate::R; +#[doc = "Write proxy for field `WERRIE`"] +pub struct WERRIE_W<'a> { w: &'a mut W, } -impl<'a> _WERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _RFOIE1W<'a> { +#[doc = "Reader of field `RFOIE1`"] +pub type RFOIE1_R = crate::R; +#[doc = "Write proxy for field `RFOIE1`"] +pub struct RFOIE1_W<'a> { w: &'a mut W, } -impl<'a> _RFOIE1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RFOIE1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _RFFIE1W<'a> { +#[doc = "Reader of field `RFFIE1`"] +pub type RFFIE1_R = crate::R; +#[doc = "Write proxy for field `RFFIE1`"] +pub struct RFFIE1_W<'a> { w: &'a mut W, } -impl<'a> _RFFIE1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RFFIE1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _RFNEIE1W<'a> { +#[doc = "Reader of field `RFNEIE1`"] +pub type RFNEIE1_R = crate::R; +#[doc = "Write proxy for field `RFNEIE1`"] +pub struct RFNEIE1_W<'a> { w: &'a mut W, } -impl<'a> _RFNEIE1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RFNEIE1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _RFOIE0W<'a> { +#[doc = "Reader of field `RFOIE0`"] +pub type RFOIE0_R = crate::R; +#[doc = "Write proxy for field `RFOIE0`"] +pub struct RFOIE0_W<'a> { w: &'a mut W, } -impl<'a> _RFOIE0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RFOIE0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _RFFIE0W<'a> { +#[doc = "Reader of field `RFFIE0`"] +pub type RFFIE0_R = crate::R; +#[doc = "Write proxy for field `RFFIE0`"] +pub struct RFFIE0_W<'a> { w: &'a mut W, } -impl<'a> _RFFIE0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RFFIE0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _RFNEIE0W<'a> { +#[doc = "Reader of field `RFNEIE0`"] +pub type RFNEIE0_R = crate::R; +#[doc = "Write proxy for field `RFNEIE0`"] +pub struct RFNEIE0_W<'a> { w: &'a mut W, } -impl<'a> _RFNEIE0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RFNEIE0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _TMEIEW<'a> { +#[doc = "Reader of field `TMEIE`"] +pub type TMEIE_R = crate::R; +#[doc = "Write proxy for field `TMEIE`"] +pub struct TMEIE_W<'a> { w: &'a mut W, } -impl<'a> _TMEIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TMEIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 17 - Sleep working interrupt enable"] - #[inline] - pub fn slpwie(&self) -> SLPWIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SLPWIER { bits } + #[inline(always)] + pub fn slpwie(&self) -> SLPWIE_R { + SLPWIE_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 16 - Wakeup interrupt enable"] - #[inline] - pub fn wie(&self) -> WIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WIER { bits } + #[inline(always)] + pub fn wie(&self) -> WIE_R { + WIE_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 15 - Error interrupt enable"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 11 - Error number interrupt enable"] - #[inline] - pub fn errnie(&self) -> ERRNIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRNIER { bits } + #[inline(always)] + pub fn errnie(&self) -> ERRNIE_R { + ERRNIE_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Bus-off interrupt enable"] - #[inline] - pub fn boie(&self) -> BOIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BOIER { bits } + #[inline(always)] + pub fn boie(&self) -> BOIE_R { + BOIE_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Passive error interrupt enable"] - #[inline] - pub fn perrie(&self) -> PERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PERRIER { bits } + #[inline(always)] + pub fn perrie(&self) -> PERRIE_R { + PERRIE_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Warning error interrupt enable"] - #[inline] - pub fn werrie(&self) -> WERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WERRIER { bits } + #[inline(always)] + pub fn werrie(&self) -> WERRIE_R { + WERRIE_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 6 - Receive FIFO1 overfull interrupt enable"] - #[inline] - pub fn rfoie1(&self) -> RFOIE1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RFOIE1R { bits } + #[inline(always)] + pub fn rfoie1(&self) -> RFOIE1_R { + RFOIE1_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Receive FIFO1 full interrupt enable"] - #[inline] - pub fn rffie1(&self) -> RFFIE1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RFFIE1R { bits } + #[inline(always)] + pub fn rffie1(&self) -> RFFIE1_R { + RFFIE1_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Receive FIFO1 not empty interrupt enable"] - #[inline] - pub fn rfneie1(&self) -> RFNEIE1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RFNEIE1R { bits } + #[inline(always)] + pub fn rfneie1(&self) -> RFNEIE1_R { + RFNEIE1_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Receive FIFO0 overfull interrupt enable"] - #[inline] - pub fn rfoie0(&self) -> RFOIE0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RFOIE0R { bits } + #[inline(always)] + pub fn rfoie0(&self) -> RFOIE0_R { + RFOIE0_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Receive FIFO0 full interrupt enable"] - #[inline] - pub fn rffie0(&self) -> RFFIE0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RFFIE0R { bits } + #[inline(always)] + pub fn rffie0(&self) -> RFFIE0_R { + RFFIE0_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Receive FIFO0 not empty interrupt enable"] - #[inline] - pub fn rfneie0(&self) -> RFNEIE0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RFNEIE0R { bits } + #[inline(always)] + pub fn rfneie0(&self) -> RFNEIE0_R { + RFNEIE0_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Transmit mailbox empty interrupt enable"] - #[inline] - pub fn tmeie(&self) -> TMEIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TMEIER { bits } + #[inline(always)] + pub fn tmeie(&self) -> TMEIE_R { + TMEIE_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 17 - Sleep working interrupt enable"] - #[inline] - pub fn slpwie(&mut self) -> _SLPWIEW { - _SLPWIEW { w: self } + #[inline(always)] + pub fn slpwie(&mut self) -> SLPWIE_W { + SLPWIE_W { w: self } } #[doc = "Bit 16 - Wakeup interrupt enable"] - #[inline] - pub fn wie(&mut self) -> _WIEW { - _WIEW { w: self } + #[inline(always)] + pub fn wie(&mut self) -> WIE_W { + WIE_W { w: self } } #[doc = "Bit 15 - Error interrupt enable"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } #[doc = "Bit 11 - Error number interrupt enable"] - #[inline] - pub fn errnie(&mut self) -> _ERRNIEW { - _ERRNIEW { w: self } + #[inline(always)] + pub fn errnie(&mut self) -> ERRNIE_W { + ERRNIE_W { w: self } } #[doc = "Bit 10 - Bus-off interrupt enable"] - #[inline] - pub fn boie(&mut self) -> _BOIEW { - _BOIEW { w: self } + #[inline(always)] + pub fn boie(&mut self) -> BOIE_W { + BOIE_W { w: self } } #[doc = "Bit 9 - Passive error interrupt enable"] - #[inline] - pub fn perrie(&mut self) -> _PERRIEW { - _PERRIEW { w: self } + #[inline(always)] + pub fn perrie(&mut self) -> PERRIE_W { + PERRIE_W { w: self } } #[doc = "Bit 8 - Warning error interrupt enable"] - #[inline] - pub fn werrie(&mut self) -> _WERRIEW { - _WERRIEW { w: self } + #[inline(always)] + pub fn werrie(&mut self) -> WERRIE_W { + WERRIE_W { w: self } } #[doc = "Bit 6 - Receive FIFO1 overfull interrupt enable"] - #[inline] - pub fn rfoie1(&mut self) -> _RFOIE1W { - _RFOIE1W { w: self } + #[inline(always)] + pub fn rfoie1(&mut self) -> RFOIE1_W { + RFOIE1_W { w: self } } #[doc = "Bit 5 - Receive FIFO1 full interrupt enable"] - #[inline] - pub fn rffie1(&mut self) -> _RFFIE1W { - _RFFIE1W { w: self } + #[inline(always)] + pub fn rffie1(&mut self) -> RFFIE1_W { + RFFIE1_W { w: self } } #[doc = "Bit 4 - Receive FIFO1 not empty interrupt enable"] - #[inline] - pub fn rfneie1(&mut self) -> _RFNEIE1W { - _RFNEIE1W { w: self } + #[inline(always)] + pub fn rfneie1(&mut self) -> RFNEIE1_W { + RFNEIE1_W { w: self } } #[doc = "Bit 3 - Receive FIFO0 overfull interrupt enable"] - #[inline] - pub fn rfoie0(&mut self) -> _RFOIE0W { - _RFOIE0W { w: self } + #[inline(always)] + pub fn rfoie0(&mut self) -> RFOIE0_W { + RFOIE0_W { w: self } } #[doc = "Bit 2 - Receive FIFO0 full interrupt enable"] - #[inline] - pub fn rffie0(&mut self) -> _RFFIE0W { - _RFFIE0W { w: self } + #[inline(always)] + pub fn rffie0(&mut self) -> RFFIE0_W { + RFFIE0_W { w: self } } #[doc = "Bit 1 - Receive FIFO0 not empty interrupt enable"] - #[inline] - pub fn rfneie0(&mut self) -> _RFNEIE0W { - _RFNEIE0W { w: self } + #[inline(always)] + pub fn rfneie0(&mut self) -> RFNEIE0_W { + RFNEIE0_W { w: self } } #[doc = "Bit 0 - Transmit mailbox empty interrupt enable"] - #[inline] - pub fn tmeie(&mut self) -> _TMEIEW { - _TMEIEW { w: self } + #[inline(always)] + pub fn tmeie(&mut self) -> TMEIE_W { + TMEIE_W { w: self } } } diff --git a/src/can0/rfifo0.rs b/src/can0/rfifo0.rs index 3570e9bc212dc45d69a6400037e51771f311cf5b..620682623835e0d3d7e98beb1064a19e464cc5df 100644 --- a/src/can0/rfifo0.rs +++ b/src/can0/rfifo0.rs @@ -1,262 +1,125 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::RFIFO0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RFD0R { - bits: bool, -} -impl RFD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RFO0R { - bits: bool, -} -impl RFO0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RFF0R { - bits: bool, -} -impl RFF0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RFL0R { - bits: u8, -} -impl RFL0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _RFD0W<'a> { +#[doc = "Reader of register RFIFO0"] +pub type R = crate::R; +#[doc = "Writer for register RFIFO0"] +pub type W = crate::W; +#[doc = "Register RFIFO0 `reset()`'s with value 0"] +impl crate::ResetValue for super::RFIFO0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `RFD0`"] +pub type RFD0_R = crate::R; +#[doc = "Write proxy for field `RFD0`"] +pub struct RFD0_W<'a> { w: &'a mut W, } -impl<'a> _RFD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RFD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _RFO0W<'a> { +#[doc = "Reader of field `RFO0`"] +pub type RFO0_R = crate::R; +#[doc = "Write proxy for field `RFO0`"] +pub struct RFO0_W<'a> { w: &'a mut W, } -impl<'a> _RFO0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RFO0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _RFF0W<'a> { +#[doc = "Reader of field `RFF0`"] +pub type RFF0_R = crate::R; +#[doc = "Write proxy for field `RFF0`"] +pub struct RFF0_W<'a> { w: &'a mut W, } -impl<'a> _RFF0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RFF0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } +#[doc = "Reader of field `RFL0`"] +pub type RFL0_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 5 - Receive FIFO0 dequeue"] - #[inline] - pub fn rfd0(&self) -> RFD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RFD0R { bits } + #[inline(always)] + pub fn rfd0(&self) -> RFD0_R { + RFD0_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Receive FIFO0 overfull"] - #[inline] - pub fn rfo0(&self) -> RFO0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RFO0R { bits } + #[inline(always)] + pub fn rfo0(&self) -> RFO0_R { + RFO0_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Receive FIFO0 full"] - #[inline] - pub fn rff0(&self) -> RFF0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RFF0R { bits } + #[inline(always)] + pub fn rff0(&self) -> RFF0_R { + RFF0_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bits 0:1 - Receive FIFO0 length"] - #[inline] - pub fn rfl0(&self) -> RFL0R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RFL0R { bits } + #[inline(always)] + pub fn rfl0(&self) -> RFL0_R { + RFL0_R::new((self.bits & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 5 - Receive FIFO0 dequeue"] - #[inline] - pub fn rfd0(&mut self) -> _RFD0W { - _RFD0W { w: self } + #[inline(always)] + pub fn rfd0(&mut self) -> RFD0_W { + RFD0_W { w: self } } #[doc = "Bit 4 - Receive FIFO0 overfull"] - #[inline] - pub fn rfo0(&mut self) -> _RFO0W { - _RFO0W { w: self } + #[inline(always)] + pub fn rfo0(&mut self) -> RFO0_W { + RFO0_W { w: self } } #[doc = "Bit 3 - Receive FIFO0 full"] - #[inline] - pub fn rff0(&mut self) -> _RFF0W { - _RFF0W { w: self } + #[inline(always)] + pub fn rff0(&mut self) -> RFF0_W { + RFF0_W { w: self } } } diff --git a/src/can0/rfifo1.rs b/src/can0/rfifo1.rs index 630899c764d26be1fa8f167044c5fa9e635a13fc..9a784b6c4712357e016962d7a84b45c64bc1452a 100644 --- a/src/can0/rfifo1.rs +++ b/src/can0/rfifo1.rs @@ -1,262 +1,125 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::RFIFO1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RFD1R { - bits: bool, -} -impl RFD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RFO1R { - bits: bool, -} -impl RFO1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RFF1R { - bits: bool, -} -impl RFF1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RFL1R { - bits: u8, -} -impl RFL1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _RFD1W<'a> { +#[doc = "Reader of register RFIFO1"] +pub type R = crate::R; +#[doc = "Writer for register RFIFO1"] +pub type W = crate::W; +#[doc = "Register RFIFO1 `reset()`'s with value 0"] +impl crate::ResetValue for super::RFIFO1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `RFD1`"] +pub type RFD1_R = crate::R; +#[doc = "Write proxy for field `RFD1`"] +pub struct RFD1_W<'a> { w: &'a mut W, } -impl<'a> _RFD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RFD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _RFO1W<'a> { +#[doc = "Reader of field `RFO1`"] +pub type RFO1_R = crate::R; +#[doc = "Write proxy for field `RFO1`"] +pub struct RFO1_W<'a> { w: &'a mut W, } -impl<'a> _RFO1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RFO1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _RFF1W<'a> { +#[doc = "Reader of field `RFF1`"] +pub type RFF1_R = crate::R; +#[doc = "Write proxy for field `RFF1`"] +pub struct RFF1_W<'a> { w: &'a mut W, } -impl<'a> _RFF1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RFF1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } +#[doc = "Reader of field `RFL1`"] +pub type RFL1_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 5 - Receive FIFO1 dequeue"] - #[inline] - pub fn rfd1(&self) -> RFD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RFD1R { bits } + #[inline(always)] + pub fn rfd1(&self) -> RFD1_R { + RFD1_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Receive FIFO1 overfull"] - #[inline] - pub fn rfo1(&self) -> RFO1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RFO1R { bits } + #[inline(always)] + pub fn rfo1(&self) -> RFO1_R { + RFO1_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Receive FIFO1 full"] - #[inline] - pub fn rff1(&self) -> RFF1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RFF1R { bits } + #[inline(always)] + pub fn rff1(&self) -> RFF1_R { + RFF1_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bits 0:1 - Receive FIFO1 length"] - #[inline] - pub fn rfl1(&self) -> RFL1R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RFL1R { bits } + #[inline(always)] + pub fn rfl1(&self) -> RFL1_R { + RFL1_R::new((self.bits & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 5 - Receive FIFO1 dequeue"] - #[inline] - pub fn rfd1(&mut self) -> _RFD1W { - _RFD1W { w: self } + #[inline(always)] + pub fn rfd1(&mut self) -> RFD1_W { + RFD1_W { w: self } } #[doc = "Bit 4 - Receive FIFO1 overfull"] - #[inline] - pub fn rfo1(&mut self) -> _RFO1W { - _RFO1W { w: self } + #[inline(always)] + pub fn rfo1(&mut self) -> RFO1_W { + RFO1_W { w: self } } #[doc = "Bit 3 - Receive FIFO1 full"] - #[inline] - pub fn rff1(&mut self) -> _RFF1W { - _RFF1W { w: self } + #[inline(always)] + pub fn rff1(&mut self) -> RFF1_W { + RFF1_W { w: self } } } diff --git a/src/can0/rfifomdata00.rs b/src/can0/rfifomdata00.rs index 1b240f02de6e927aaa8d000d88046e64dfda572e..e540b8f1dcc6e654b8967df813917511eda0d8a7 100644 --- a/src/can0/rfifomdata00.rs +++ b/src/can0/rfifomdata00.rs @@ -1,104 +1,32 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::RFIFOMDATA00 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct DB3R { - bits: u8, -} -impl DB3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB2R { - bits: u8, -} -impl DB2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB1R { - bits: u8, -} -impl DB1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB0R { - bits: u8, -} -impl DB0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} +#[doc = "Reader of register RFIFOMDATA00"] +pub type R = crate::R; +#[doc = "Reader of field `DB3`"] +pub type DB3_R = crate::R; +#[doc = "Reader of field `DB2`"] +pub type DB2_R = crate::R; +#[doc = "Reader of field `DB1`"] +pub type DB1_R = crate::R; +#[doc = "Reader of field `DB0`"] +pub type DB0_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 24:31 - Data byte 3"] - #[inline] - pub fn db3(&self) -> DB3R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB3R { bits } + #[inline(always)] + pub fn db3(&self) -> DB3_R { + DB3_R::new(((self.bits >> 24) & 0xff) as u8) } #[doc = "Bits 16:23 - Data byte 2"] - #[inline] - pub fn db2(&self) -> DB2R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB2R { bits } + #[inline(always)] + pub fn db2(&self) -> DB2_R { + DB2_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bits 8:15 - Data byte 1"] - #[inline] - pub fn db1(&self) -> DB1R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB1R { bits } + #[inline(always)] + pub fn db1(&self) -> DB1_R { + DB1_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 0:7 - Data byte 0"] - #[inline] - pub fn db0(&self) -> DB0R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB0R { bits } + #[inline(always)] + pub fn db0(&self) -> DB0_R { + DB0_R::new((self.bits & 0xff) as u8) } } diff --git a/src/can0/rfifomdata01.rs b/src/can0/rfifomdata01.rs index 9b9092502b3189a2072b193d64aac13400cb6e78..9f8bf3be19acc7324bb743a41bb6a67885a0113c 100644 --- a/src/can0/rfifomdata01.rs +++ b/src/can0/rfifomdata01.rs @@ -1,104 +1,32 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::RFIFOMDATA01 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct DB3R { - bits: u8, -} -impl DB3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB2R { - bits: u8, -} -impl DB2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB1R { - bits: u8, -} -impl DB1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB0R { - bits: u8, -} -impl DB0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} +#[doc = "Reader of register RFIFOMDATA01"] +pub type R = crate::R; +#[doc = "Reader of field `DB3`"] +pub type DB3_R = crate::R; +#[doc = "Reader of field `DB2`"] +pub type DB2_R = crate::R; +#[doc = "Reader of field `DB1`"] +pub type DB1_R = crate::R; +#[doc = "Reader of field `DB0`"] +pub type DB0_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 24:31 - Data byte 3"] - #[inline] - pub fn db3(&self) -> DB3R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB3R { bits } + #[inline(always)] + pub fn db3(&self) -> DB3_R { + DB3_R::new(((self.bits >> 24) & 0xff) as u8) } #[doc = "Bits 16:23 - Data byte 2"] - #[inline] - pub fn db2(&self) -> DB2R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB2R { bits } + #[inline(always)] + pub fn db2(&self) -> DB2_R { + DB2_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bits 8:15 - Data byte 1"] - #[inline] - pub fn db1(&self) -> DB1R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB1R { bits } + #[inline(always)] + pub fn db1(&self) -> DB1_R { + DB1_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 0:7 - Data byte 0"] - #[inline] - pub fn db0(&self) -> DB0R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB0R { bits } + #[inline(always)] + pub fn db0(&self) -> DB0_R { + DB0_R::new((self.bits & 0xff) as u8) } } diff --git a/src/can0/rfifomdata10.rs b/src/can0/rfifomdata10.rs index 26765ba3abadd4a68b40d3eaa85479072df9e48a..f7aba81cf42b9cfedd1c4c5c60bf03a741b6644e 100644 --- a/src/can0/rfifomdata10.rs +++ b/src/can0/rfifomdata10.rs @@ -1,104 +1,32 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::RFIFOMDATA10 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct DB7R { - bits: u8, -} -impl DB7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB6R { - bits: u8, -} -impl DB6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB5R { - bits: u8, -} -impl DB5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB4R { - bits: u8, -} -impl DB4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} +#[doc = "Reader of register RFIFOMDATA10"] +pub type R = crate::R; +#[doc = "Reader of field `DB7`"] +pub type DB7_R = crate::R; +#[doc = "Reader of field `DB6`"] +pub type DB6_R = crate::R; +#[doc = "Reader of field `DB5`"] +pub type DB5_R = crate::R; +#[doc = "Reader of field `DB4`"] +pub type DB4_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 24:31 - Data byte 7"] - #[inline] - pub fn db7(&self) -> DB7R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB7R { bits } + #[inline(always)] + pub fn db7(&self) -> DB7_R { + DB7_R::new(((self.bits >> 24) & 0xff) as u8) } #[doc = "Bits 16:23 - Data byte 6"] - #[inline] - pub fn db6(&self) -> DB6R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB6R { bits } + #[inline(always)] + pub fn db6(&self) -> DB6_R { + DB6_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bits 8:15 - Data byte 5"] - #[inline] - pub fn db5(&self) -> DB5R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB5R { bits } + #[inline(always)] + pub fn db5(&self) -> DB5_R { + DB5_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 0:7 - Data byte 4"] - #[inline] - pub fn db4(&self) -> DB4R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB4R { bits } + #[inline(always)] + pub fn db4(&self) -> DB4_R { + DB4_R::new((self.bits & 0xff) as u8) } } diff --git a/src/can0/rfifomdata11.rs b/src/can0/rfifomdata11.rs index 2789fe0d7c06e061e9dfdbeb0c1979bcf84343b3..eae30f66f5fd21c5b6e21a5d27d0da9db0d005d1 100644 --- a/src/can0/rfifomdata11.rs +++ b/src/can0/rfifomdata11.rs @@ -1,104 +1,32 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::RFIFOMDATA11 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct DB7R { - bits: u8, -} -impl DB7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB6R { - bits: u8, -} -impl DB6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB5R { - bits: u8, -} -impl DB5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB4R { - bits: u8, -} -impl DB4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} +#[doc = "Reader of register RFIFOMDATA11"] +pub type R = crate::R; +#[doc = "Reader of field `DB7`"] +pub type DB7_R = crate::R; +#[doc = "Reader of field `DB6`"] +pub type DB6_R = crate::R; +#[doc = "Reader of field `DB5`"] +pub type DB5_R = crate::R; +#[doc = "Reader of field `DB4`"] +pub type DB4_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 24:31 - Data byte 7"] - #[inline] - pub fn db7(&self) -> DB7R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB7R { bits } + #[inline(always)] + pub fn db7(&self) -> DB7_R { + DB7_R::new(((self.bits >> 24) & 0xff) as u8) } #[doc = "Bits 16:23 - Data byte 6"] - #[inline] - pub fn db6(&self) -> DB6R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB6R { bits } + #[inline(always)] + pub fn db6(&self) -> DB6_R { + DB6_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bits 8:15 - Data byte 5"] - #[inline] - pub fn db5(&self) -> DB5R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB5R { bits } + #[inline(always)] + pub fn db5(&self) -> DB5_R { + DB5_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 0:7 - Data byte 4"] - #[inline] - pub fn db4(&self) -> DB4R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB4R { bits } + #[inline(always)] + pub fn db4(&self) -> DB4_R { + DB4_R::new((self.bits & 0xff) as u8) } } diff --git a/src/can0/rfifomi0.rs b/src/can0/rfifomi0.rs index 8480f6595a45c265a4d1006831a8429ee02f8cb1..c0ff16f05cd0767a8847c0d9be70daff617c463d 100644 --- a/src/can0/rfifomi0.rs +++ b/src/can0/rfifomi0.rs @@ -1,124 +1,32 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::RFIFOMI0 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct SFID_EFIDR { - bits: u16, -} -impl SFID_EFIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EFIDR { - bits: u32, -} -impl EFIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct FFR { - bits: bool, -} -impl FFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTR { - bits: bool, -} -impl FTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} +#[doc = "Reader of register RFIFOMI0"] +pub type R = crate::R; +#[doc = "Reader of field `SFID_EFID`"] +pub type SFID_EFID_R = crate::R; +#[doc = "Reader of field `EFID`"] +pub type EFID_R = crate::R; +#[doc = "Reader of field `FF`"] +pub type FF_R = crate::R; +#[doc = "Reader of field `FT`"] +pub type FT_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 21:31 - The frame identifier"] - #[inline] - pub fn sfid_efid(&self) -> SFID_EFIDR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - SFID_EFIDR { bits } + #[inline(always)] + pub fn sfid_efid(&self) -> SFID_EFID_R { + SFID_EFID_R::new(((self.bits >> 21) & 0x07ff) as u16) } #[doc = "Bits 3:20 - The frame identifier"] - #[inline] - pub fn efid(&self) -> EFIDR { - let bits = { - const MASK: u32 = 0x0003_ffff; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - EFIDR { bits } + #[inline(always)] + pub fn efid(&self) -> EFID_R { + EFID_R::new(((self.bits >> 3) & 0x0003_ffff) as u32) } #[doc = "Bit 2 - Frame format"] - #[inline] - pub fn ff(&self) -> FFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FFR { bits } + #[inline(always)] + pub fn ff(&self) -> FF_R { + FF_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Frame type"] - #[inline] - pub fn ft(&self) -> FTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTR { bits } + #[inline(always)] + pub fn ft(&self) -> FT_R { + FT_R::new(((self.bits >> 1) & 0x01) != 0) } } diff --git a/src/can0/rfifomi1.rs b/src/can0/rfifomi1.rs index 7406c475f73b952a5dcc033e7fce715c9ce5f312..dc5512cca610027816dde33d26426954f13a8961 100644 --- a/src/can0/rfifomi1.rs +++ b/src/can0/rfifomi1.rs @@ -1,124 +1,32 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::RFIFOMI1 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct SFID_EFIDR { - bits: u16, -} -impl SFID_EFIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EFIDR { - bits: u32, -} -impl EFIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct FFR { - bits: bool, -} -impl FFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTR { - bits: bool, -} -impl FTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} +#[doc = "Reader of register RFIFOMI1"] +pub type R = crate::R; +#[doc = "Reader of field `SFID_EFID`"] +pub type SFID_EFID_R = crate::R; +#[doc = "Reader of field `EFID`"] +pub type EFID_R = crate::R; +#[doc = "Reader of field `FF`"] +pub type FF_R = crate::R; +#[doc = "Reader of field `FT`"] +pub type FT_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 21:31 - The frame identifier"] - #[inline] - pub fn sfid_efid(&self) -> SFID_EFIDR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - SFID_EFIDR { bits } + #[inline(always)] + pub fn sfid_efid(&self) -> SFID_EFID_R { + SFID_EFID_R::new(((self.bits >> 21) & 0x07ff) as u16) } #[doc = "Bits 3:20 - The frame identifier"] - #[inline] - pub fn efid(&self) -> EFIDR { - let bits = { - const MASK: u32 = 0x0003_ffff; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - EFIDR { bits } + #[inline(always)] + pub fn efid(&self) -> EFID_R { + EFID_R::new(((self.bits >> 3) & 0x0003_ffff) as u32) } #[doc = "Bit 2 - Frame format"] - #[inline] - pub fn ff(&self) -> FFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FFR { bits } + #[inline(always)] + pub fn ff(&self) -> FF_R { + FF_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Frame type"] - #[inline] - pub fn ft(&self) -> FTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTR { bits } + #[inline(always)] + pub fn ft(&self) -> FT_R { + FT_R::new(((self.bits >> 1) & 0x01) != 0) } } diff --git a/src/can0/rfifomp0.rs b/src/can0/rfifomp0.rs index 5d0268b3fd13071210382699e70873b86387d128..6075b174bc5894e424ac5d7ab5c2d91ecb35eb33 100644 --- a/src/can0/rfifomp0.rs +++ b/src/can0/rfifomp0.rs @@ -1,83 +1,25 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::RFIFOMP0 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct TSR { - bits: u16, -} -impl TSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct FIR { - bits: u8, -} -impl FIR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DLENCR { - bits: u8, -} -impl DLENCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} +#[doc = "Reader of register RFIFOMP0"] +pub type R = crate::R; +#[doc = "Reader of field `TS`"] +pub type TS_R = crate::R; +#[doc = "Reader of field `FI`"] +pub type FI_R = crate::R; +#[doc = "Reader of field `DLENC`"] +pub type DLENC_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 16:31 - Time stamp"] - #[inline] - pub fn ts(&self) -> TSR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - TSR { bits } + #[inline(always)] + pub fn ts(&self) -> TS_R { + TS_R::new(((self.bits >> 16) & 0xffff) as u16) } #[doc = "Bits 8:15 - Filtering index"] - #[inline] - pub fn fi(&self) -> FIR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - FIR { bits } + #[inline(always)] + pub fn fi(&self) -> FI_R { + FI_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 0:3 - Data length code"] - #[inline] - pub fn dlenc(&self) -> DLENCR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DLENCR { bits } + #[inline(always)] + pub fn dlenc(&self) -> DLENC_R { + DLENC_R::new((self.bits & 0x0f) as u8) } } diff --git a/src/can0/rfifomp1.rs b/src/can0/rfifomp1.rs index 3ff2f3771cf25ba92564d9df9a7bb4f80f9e6a41..c2b2c0c1328e592074fa8cdc64213860374cb2d8 100644 --- a/src/can0/rfifomp1.rs +++ b/src/can0/rfifomp1.rs @@ -1,83 +1,25 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::RFIFOMP1 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct TSR { - bits: u16, -} -impl TSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct FIR { - bits: u8, -} -impl FIR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DLENCR { - bits: u8, -} -impl DLENCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} +#[doc = "Reader of register RFIFOMP1"] +pub type R = crate::R; +#[doc = "Reader of field `TS`"] +pub type TS_R = crate::R; +#[doc = "Reader of field `FI`"] +pub type FI_R = crate::R; +#[doc = "Reader of field `DLENC`"] +pub type DLENC_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 16:31 - Time stamp"] - #[inline] - pub fn ts(&self) -> TSR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - TSR { bits } + #[inline(always)] + pub fn ts(&self) -> TS_R { + TS_R::new(((self.bits >> 16) & 0xffff) as u16) } #[doc = "Bits 8:15 - Filtering index"] - #[inline] - pub fn fi(&self) -> FIR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - FIR { bits } + #[inline(always)] + pub fn fi(&self) -> FI_R { + FI_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 0:3 - Data length code"] - #[inline] - pub fn dlenc(&self) -> DLENCR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DLENCR { bits } + #[inline(always)] + pub fn dlenc(&self) -> DLENC_R { + DLENC_R::new((self.bits & 0x0f) as u8) } } diff --git a/src/can0/stat.rs b/src/can0/stat.rs index 9a52ca5f8c8e548fbc681d8d487c868b11995da5..ad96eb01d430297c017f114b7d01d3d8467a53bc 100644 --- a/src/can0/stat.rs +++ b/src/can0/stat.rs @@ -1,427 +1,160 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::STAT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RXLR { - bits: bool, -} -impl RXLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LASTRXR { - bits: bool, -} -impl LASTRXR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RSR { - bits: bool, -} -impl RSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TSR { - bits: bool, -} -impl TSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SLPIFR { - bits: bool, -} -impl SLPIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WUIFR { - bits: bool, -} -impl WUIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIFR { - bits: bool, -} -impl ERRIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SLPWSR { - bits: bool, -} -impl SLPWSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IWSR { - bits: bool, -} -impl IWSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _SLPIFW<'a> { +#[doc = "Reader of register STAT"] +pub type R = crate::R; +#[doc = "Writer for register STAT"] +pub type W = crate::W; +#[doc = "Register STAT `reset()`'s with value 0x0c02"] +impl crate::ResetValue for super::STAT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0c02 + } +} +#[doc = "Reader of field `RXL`"] +pub type RXL_R = crate::R; +#[doc = "Reader of field `LASTRX`"] +pub type LASTRX_R = crate::R; +#[doc = "Reader of field `RS`"] +pub type RS_R = crate::R; +#[doc = "Reader of field `TS`"] +pub type TS_R = crate::R; +#[doc = "Reader of field `SLPIF`"] +pub type SLPIF_R = crate::R; +#[doc = "Write proxy for field `SLPIF`"] +pub struct SLPIF_W<'a> { w: &'a mut W, } -impl<'a> _SLPIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SLPIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _WUIFW<'a> { +#[doc = "Reader of field `WUIF`"] +pub type WUIF_R = crate::R; +#[doc = "Write proxy for field `WUIF`"] +pub struct WUIF_W<'a> { w: &'a mut W, } -impl<'a> _WUIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WUIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIFW<'a> { +#[doc = "Reader of field `ERRIF`"] +pub type ERRIF_R = crate::R; +#[doc = "Write proxy for field `ERRIF`"] +pub struct ERRIF_W<'a> { w: &'a mut W, } -impl<'a> _ERRIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } +#[doc = "Reader of field `SLPWS`"] +pub type SLPWS_R = crate::R; +#[doc = "Reader of field `IWS`"] +pub type IWS_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 11 - RX level"] - #[inline] - pub fn rxl(&self) -> RXLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RXLR { bits } + #[inline(always)] + pub fn rxl(&self) -> RXL_R { + RXL_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Last sample value of RX pin"] - #[inline] - pub fn lastrx(&self) -> LASTRXR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LASTRXR { bits } + #[inline(always)] + pub fn lastrx(&self) -> LASTRX_R { + LASTRX_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Receiving state"] - #[inline] - pub fn rs(&self) -> RSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RSR { bits } + #[inline(always)] + pub fn rs(&self) -> RS_R { + RS_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Transmitting state"] - #[inline] - pub fn ts(&self) -> TSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TSR { bits } + #[inline(always)] + pub fn ts(&self) -> TS_R { + TS_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 4 - Status change interrupt flag of sleep working mode entering"] - #[inline] - pub fn slpif(&self) -> SLPIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SLPIFR { bits } + #[inline(always)] + pub fn slpif(&self) -> SLPIF_R { + SLPIF_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Status change interrupt flag of wakeup from sleep working mode"] - #[inline] - pub fn wuif(&self) -> WUIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WUIFR { bits } + #[inline(always)] + pub fn wuif(&self) -> WUIF_R { + WUIF_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Error interrupt flag"] - #[inline] - pub fn errif(&self) -> ERRIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIFR { bits } + #[inline(always)] + pub fn errif(&self) -> ERRIF_R { + ERRIF_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Sleep working state"] - #[inline] - pub fn slpws(&self) -> SLPWSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SLPWSR { bits } + #[inline(always)] + pub fn slpws(&self) -> SLPWS_R { + SLPWS_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Initial working state"] - #[inline] - pub fn iws(&self) -> IWSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IWSR { bits } + #[inline(always)] + pub fn iws(&self) -> IWS_R { + IWS_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0c02 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 4 - Status change interrupt flag of sleep working mode entering"] - #[inline] - pub fn slpif(&mut self) -> _SLPIFW { - _SLPIFW { w: self } + #[inline(always)] + pub fn slpif(&mut self) -> SLPIF_W { + SLPIF_W { w: self } } #[doc = "Bit 3 - Status change interrupt flag of wakeup from sleep working mode"] - #[inline] - pub fn wuif(&mut self) -> _WUIFW { - _WUIFW { w: self } + #[inline(always)] + pub fn wuif(&mut self) -> WUIF_W { + WUIF_W { w: self } } #[doc = "Bit 2 - Error interrupt flag"] - #[inline] - pub fn errif(&mut self) -> _ERRIFW { - _ERRIFW { w: self } + #[inline(always)] + pub fn errif(&mut self) -> ERRIF_W { + ERRIF_W { w: self } } } diff --git a/src/can0/tmdata00.rs b/src/can0/tmdata00.rs index 1bb09a265ce32dfe569183a5682b546141ac5c26..945958d81f71e7ce28e42641290b32a79b6ffcc3 100644 --- a/src/can0/tmdata00.rs +++ b/src/can0/tmdata00.rs @@ -1,228 +1,112 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::TMDATA00 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DB3R { - bits: u8, -} -impl DB3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB2R { - bits: u8, -} -impl DB2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB1R { - bits: u8, -} -impl DB1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB0R { - bits: u8, -} -impl DB0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DB3W<'a> { +#[doc = "Reader of register TMDATA00"] +pub type R = crate::R; +#[doc = "Writer for register TMDATA00"] +pub type W = crate::W; +#[doc = "Register TMDATA00 `reset()`'s with value 0"] +impl crate::ResetValue for super::TMDATA00 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DB3`"] +pub type DB3_R = crate::R; +#[doc = "Write proxy for field `DB3`"] +pub struct DB3_W<'a> { w: &'a mut W, } -impl<'a> _DB3W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB3_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 24)) | (((value as u32) & 0xff) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _DB2W<'a> { +#[doc = "Reader of field `DB2`"] +pub type DB2_R = crate::R; +#[doc = "Write proxy for field `DB2`"] +pub struct DB2_W<'a> { w: &'a mut W, } -impl<'a> _DB2W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB2_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 16)) | (((value as u32) & 0xff) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _DB1W<'a> { +#[doc = "Reader of field `DB1`"] +pub type DB1_R = crate::R; +#[doc = "Write proxy for field `DB1`"] +pub struct DB1_W<'a> { w: &'a mut W, } -impl<'a> _DB1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _DB0W<'a> { +#[doc = "Reader of field `DB0`"] +pub type DB0_R = crate::R; +#[doc = "Write proxy for field `DB0`"] +pub struct DB0_W<'a> { w: &'a mut W, } -impl<'a> _DB0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 24:31 - Data byte 3"] - #[inline] - pub fn db3(&self) -> DB3R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB3R { bits } + #[inline(always)] + pub fn db3(&self) -> DB3_R { + DB3_R::new(((self.bits >> 24) & 0xff) as u8) } #[doc = "Bits 16:23 - Data byte 2"] - #[inline] - pub fn db2(&self) -> DB2R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB2R { bits } + #[inline(always)] + pub fn db2(&self) -> DB2_R { + DB2_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bits 8:15 - Data byte 1"] - #[inline] - pub fn db1(&self) -> DB1R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB1R { bits } + #[inline(always)] + pub fn db1(&self) -> DB1_R { + DB1_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 0:7 - Data byte 0"] - #[inline] - pub fn db0(&self) -> DB0R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB0R { bits } + #[inline(always)] + pub fn db0(&self) -> DB0_R { + DB0_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 24:31 - Data byte 3"] - #[inline] - pub fn db3(&mut self) -> _DB3W { - _DB3W { w: self } + #[inline(always)] + pub fn db3(&mut self) -> DB3_W { + DB3_W { w: self } } #[doc = "Bits 16:23 - Data byte 2"] - #[inline] - pub fn db2(&mut self) -> _DB2W { - _DB2W { w: self } + #[inline(always)] + pub fn db2(&mut self) -> DB2_W { + DB2_W { w: self } } #[doc = "Bits 8:15 - Data byte 1"] - #[inline] - pub fn db1(&mut self) -> _DB1W { - _DB1W { w: self } + #[inline(always)] + pub fn db1(&mut self) -> DB1_W { + DB1_W { w: self } } #[doc = "Bits 0:7 - Data byte 0"] - #[inline] - pub fn db0(&mut self) -> _DB0W { - _DB0W { w: self } + #[inline(always)] + pub fn db0(&mut self) -> DB0_W { + DB0_W { w: self } } } diff --git a/src/can0/tmdata01.rs b/src/can0/tmdata01.rs index 582f2f3e0407f1b4613741445e204657f6046ab4..aa8720998b9c61a194e6b1b97fe0d5470a89c926 100644 --- a/src/can0/tmdata01.rs +++ b/src/can0/tmdata01.rs @@ -1,228 +1,112 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::TMDATA01 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DB3R { - bits: u8, -} -impl DB3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB2R { - bits: u8, -} -impl DB2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB1R { - bits: u8, -} -impl DB1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB0R { - bits: u8, -} -impl DB0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DB3W<'a> { +#[doc = "Reader of register TMDATA01"] +pub type R = crate::R; +#[doc = "Writer for register TMDATA01"] +pub type W = crate::W; +#[doc = "Register TMDATA01 `reset()`'s with value 0"] +impl crate::ResetValue for super::TMDATA01 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DB3`"] +pub type DB3_R = crate::R; +#[doc = "Write proxy for field `DB3`"] +pub struct DB3_W<'a> { w: &'a mut W, } -impl<'a> _DB3W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB3_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 24)) | (((value as u32) & 0xff) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _DB2W<'a> { +#[doc = "Reader of field `DB2`"] +pub type DB2_R = crate::R; +#[doc = "Write proxy for field `DB2`"] +pub struct DB2_W<'a> { w: &'a mut W, } -impl<'a> _DB2W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB2_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 16)) | (((value as u32) & 0xff) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _DB1W<'a> { +#[doc = "Reader of field `DB1`"] +pub type DB1_R = crate::R; +#[doc = "Write proxy for field `DB1`"] +pub struct DB1_W<'a> { w: &'a mut W, } -impl<'a> _DB1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _DB0W<'a> { +#[doc = "Reader of field `DB0`"] +pub type DB0_R = crate::R; +#[doc = "Write proxy for field `DB0`"] +pub struct DB0_W<'a> { w: &'a mut W, } -impl<'a> _DB0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 24:31 - Data byte 3"] - #[inline] - pub fn db3(&self) -> DB3R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB3R { bits } + #[inline(always)] + pub fn db3(&self) -> DB3_R { + DB3_R::new(((self.bits >> 24) & 0xff) as u8) } #[doc = "Bits 16:23 - Data byte 2"] - #[inline] - pub fn db2(&self) -> DB2R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB2R { bits } + #[inline(always)] + pub fn db2(&self) -> DB2_R { + DB2_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bits 8:15 - Data byte 1"] - #[inline] - pub fn db1(&self) -> DB1R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB1R { bits } + #[inline(always)] + pub fn db1(&self) -> DB1_R { + DB1_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 0:7 - Data byte 0"] - #[inline] - pub fn db0(&self) -> DB0R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB0R { bits } + #[inline(always)] + pub fn db0(&self) -> DB0_R { + DB0_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 24:31 - Data byte 3"] - #[inline] - pub fn db3(&mut self) -> _DB3W { - _DB3W { w: self } + #[inline(always)] + pub fn db3(&mut self) -> DB3_W { + DB3_W { w: self } } #[doc = "Bits 16:23 - Data byte 2"] - #[inline] - pub fn db2(&mut self) -> _DB2W { - _DB2W { w: self } + #[inline(always)] + pub fn db2(&mut self) -> DB2_W { + DB2_W { w: self } } #[doc = "Bits 8:15 - Data byte 1"] - #[inline] - pub fn db1(&mut self) -> _DB1W { - _DB1W { w: self } + #[inline(always)] + pub fn db1(&mut self) -> DB1_W { + DB1_W { w: self } } #[doc = "Bits 0:7 - Data byte 0"] - #[inline] - pub fn db0(&mut self) -> _DB0W { - _DB0W { w: self } + #[inline(always)] + pub fn db0(&mut self) -> DB0_W { + DB0_W { w: self } } } diff --git a/src/can0/tmdata02.rs b/src/can0/tmdata02.rs index 4b5db22bf43a65d09398edf0d3b81a3369be81d3..c5f61e07e6b15bf36efefdc835a493607afcee57 100644 --- a/src/can0/tmdata02.rs +++ b/src/can0/tmdata02.rs @@ -1,228 +1,112 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::TMDATA02 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DB3R { - bits: u8, -} -impl DB3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB2R { - bits: u8, -} -impl DB2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB1R { - bits: u8, -} -impl DB1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB0R { - bits: u8, -} -impl DB0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DB3W<'a> { +#[doc = "Reader of register TMDATA02"] +pub type R = crate::R; +#[doc = "Writer for register TMDATA02"] +pub type W = crate::W; +#[doc = "Register TMDATA02 `reset()`'s with value 0"] +impl crate::ResetValue for super::TMDATA02 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DB3`"] +pub type DB3_R = crate::R; +#[doc = "Write proxy for field `DB3`"] +pub struct DB3_W<'a> { w: &'a mut W, } -impl<'a> _DB3W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB3_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 24)) | (((value as u32) & 0xff) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _DB2W<'a> { +#[doc = "Reader of field `DB2`"] +pub type DB2_R = crate::R; +#[doc = "Write proxy for field `DB2`"] +pub struct DB2_W<'a> { w: &'a mut W, } -impl<'a> _DB2W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB2_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 16)) | (((value as u32) & 0xff) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _DB1W<'a> { +#[doc = "Reader of field `DB1`"] +pub type DB1_R = crate::R; +#[doc = "Write proxy for field `DB1`"] +pub struct DB1_W<'a> { w: &'a mut W, } -impl<'a> _DB1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _DB0W<'a> { +#[doc = "Reader of field `DB0`"] +pub type DB0_R = crate::R; +#[doc = "Write proxy for field `DB0`"] +pub struct DB0_W<'a> { w: &'a mut W, } -impl<'a> _DB0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 24:31 - Data byte 3"] - #[inline] - pub fn db3(&self) -> DB3R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB3R { bits } + #[inline(always)] + pub fn db3(&self) -> DB3_R { + DB3_R::new(((self.bits >> 24) & 0xff) as u8) } #[doc = "Bits 16:23 - Data byte 2"] - #[inline] - pub fn db2(&self) -> DB2R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB2R { bits } + #[inline(always)] + pub fn db2(&self) -> DB2_R { + DB2_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bits 8:15 - Data byte 1"] - #[inline] - pub fn db1(&self) -> DB1R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB1R { bits } + #[inline(always)] + pub fn db1(&self) -> DB1_R { + DB1_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 0:7 - Data byte 0"] - #[inline] - pub fn db0(&self) -> DB0R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB0R { bits } + #[inline(always)] + pub fn db0(&self) -> DB0_R { + DB0_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 24:31 - Data byte 3"] - #[inline] - pub fn db3(&mut self) -> _DB3W { - _DB3W { w: self } + #[inline(always)] + pub fn db3(&mut self) -> DB3_W { + DB3_W { w: self } } #[doc = "Bits 16:23 - Data byte 2"] - #[inline] - pub fn db2(&mut self) -> _DB2W { - _DB2W { w: self } + #[inline(always)] + pub fn db2(&mut self) -> DB2_W { + DB2_W { w: self } } #[doc = "Bits 8:15 - Data byte 1"] - #[inline] - pub fn db1(&mut self) -> _DB1W { - _DB1W { w: self } + #[inline(always)] + pub fn db1(&mut self) -> DB1_W { + DB1_W { w: self } } #[doc = "Bits 0:7 - Data byte 0"] - #[inline] - pub fn db0(&mut self) -> _DB0W { - _DB0W { w: self } + #[inline(always)] + pub fn db0(&mut self) -> DB0_W { + DB0_W { w: self } } } diff --git a/src/can0/tmdata10.rs b/src/can0/tmdata10.rs index a46e1736766477a1df07bd837357ebf2cc75b741..8a5b8b5f6d0cea7990ad3094c5434bed13f2aff2 100644 --- a/src/can0/tmdata10.rs +++ b/src/can0/tmdata10.rs @@ -1,228 +1,112 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::TMDATA10 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DB7R { - bits: u8, -} -impl DB7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB6R { - bits: u8, -} -impl DB6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB5R { - bits: u8, -} -impl DB5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB4R { - bits: u8, -} -impl DB4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DB7W<'a> { +#[doc = "Reader of register TMDATA10"] +pub type R = crate::R; +#[doc = "Writer for register TMDATA10"] +pub type W = crate::W; +#[doc = "Register TMDATA10 `reset()`'s with value 0"] +impl crate::ResetValue for super::TMDATA10 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DB7`"] +pub type DB7_R = crate::R; +#[doc = "Write proxy for field `DB7`"] +pub struct DB7_W<'a> { w: &'a mut W, } -impl<'a> _DB7W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB7_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 24)) | (((value as u32) & 0xff) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _DB6W<'a> { +#[doc = "Reader of field `DB6`"] +pub type DB6_R = crate::R; +#[doc = "Write proxy for field `DB6`"] +pub struct DB6_W<'a> { w: &'a mut W, } -impl<'a> _DB6W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB6_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 16)) | (((value as u32) & 0xff) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _DB5W<'a> { +#[doc = "Reader of field `DB5`"] +pub type DB5_R = crate::R; +#[doc = "Write proxy for field `DB5`"] +pub struct DB5_W<'a> { w: &'a mut W, } -impl<'a> _DB5W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB5_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _DB4W<'a> { +#[doc = "Reader of field `DB4`"] +pub type DB4_R = crate::R; +#[doc = "Write proxy for field `DB4`"] +pub struct DB4_W<'a> { w: &'a mut W, } -impl<'a> _DB4W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB4_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 24:31 - Data byte 7"] - #[inline] - pub fn db7(&self) -> DB7R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB7R { bits } + #[inline(always)] + pub fn db7(&self) -> DB7_R { + DB7_R::new(((self.bits >> 24) & 0xff) as u8) } #[doc = "Bits 16:23 - Data byte 6"] - #[inline] - pub fn db6(&self) -> DB6R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB6R { bits } + #[inline(always)] + pub fn db6(&self) -> DB6_R { + DB6_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bits 8:15 - Data byte 5"] - #[inline] - pub fn db5(&self) -> DB5R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB5R { bits } + #[inline(always)] + pub fn db5(&self) -> DB5_R { + DB5_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 0:7 - Data byte 4"] - #[inline] - pub fn db4(&self) -> DB4R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB4R { bits } + #[inline(always)] + pub fn db4(&self) -> DB4_R { + DB4_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 24:31 - Data byte 7"] - #[inline] - pub fn db7(&mut self) -> _DB7W { - _DB7W { w: self } + #[inline(always)] + pub fn db7(&mut self) -> DB7_W { + DB7_W { w: self } } #[doc = "Bits 16:23 - Data byte 6"] - #[inline] - pub fn db6(&mut self) -> _DB6W { - _DB6W { w: self } + #[inline(always)] + pub fn db6(&mut self) -> DB6_W { + DB6_W { w: self } } #[doc = "Bits 8:15 - Data byte 5"] - #[inline] - pub fn db5(&mut self) -> _DB5W { - _DB5W { w: self } + #[inline(always)] + pub fn db5(&mut self) -> DB5_W { + DB5_W { w: self } } #[doc = "Bits 0:7 - Data byte 4"] - #[inline] - pub fn db4(&mut self) -> _DB4W { - _DB4W { w: self } + #[inline(always)] + pub fn db4(&mut self) -> DB4_W { + DB4_W { w: self } } } diff --git a/src/can0/tmdata11.rs b/src/can0/tmdata11.rs index 7c179d3b9f8e590bec9d9dc3be7c8b2bce4ffdcf..e772fbe2b79b5b49316d5597ad34b6b6cfb396e0 100644 --- a/src/can0/tmdata11.rs +++ b/src/can0/tmdata11.rs @@ -1,228 +1,112 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::TMDATA11 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DB7R { - bits: u8, -} -impl DB7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB6R { - bits: u8, -} -impl DB6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB5R { - bits: u8, -} -impl DB5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB4R { - bits: u8, -} -impl DB4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DB7W<'a> { +#[doc = "Reader of register TMDATA11"] +pub type R = crate::R; +#[doc = "Writer for register TMDATA11"] +pub type W = crate::W; +#[doc = "Register TMDATA11 `reset()`'s with value 0"] +impl crate::ResetValue for super::TMDATA11 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DB7`"] +pub type DB7_R = crate::R; +#[doc = "Write proxy for field `DB7`"] +pub struct DB7_W<'a> { w: &'a mut W, } -impl<'a> _DB7W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB7_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 24)) | (((value as u32) & 0xff) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _DB6W<'a> { +#[doc = "Reader of field `DB6`"] +pub type DB6_R = crate::R; +#[doc = "Write proxy for field `DB6`"] +pub struct DB6_W<'a> { w: &'a mut W, } -impl<'a> _DB6W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB6_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 16)) | (((value as u32) & 0xff) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _DB5W<'a> { +#[doc = "Reader of field `DB5`"] +pub type DB5_R = crate::R; +#[doc = "Write proxy for field `DB5`"] +pub struct DB5_W<'a> { w: &'a mut W, } -impl<'a> _DB5W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB5_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _DB4W<'a> { +#[doc = "Reader of field `DB4`"] +pub type DB4_R = crate::R; +#[doc = "Write proxy for field `DB4`"] +pub struct DB4_W<'a> { w: &'a mut W, } -impl<'a> _DB4W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB4_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 24:31 - Data byte 7"] - #[inline] - pub fn db7(&self) -> DB7R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB7R { bits } + #[inline(always)] + pub fn db7(&self) -> DB7_R { + DB7_R::new(((self.bits >> 24) & 0xff) as u8) } #[doc = "Bits 16:23 - Data byte 6"] - #[inline] - pub fn db6(&self) -> DB6R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB6R { bits } + #[inline(always)] + pub fn db6(&self) -> DB6_R { + DB6_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bits 8:15 - Data byte 5"] - #[inline] - pub fn db5(&self) -> DB5R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB5R { bits } + #[inline(always)] + pub fn db5(&self) -> DB5_R { + DB5_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 0:7 - Data byte 4"] - #[inline] - pub fn db4(&self) -> DB4R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB4R { bits } + #[inline(always)] + pub fn db4(&self) -> DB4_R { + DB4_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 24:31 - Data byte 7"] - #[inline] - pub fn db7(&mut self) -> _DB7W { - _DB7W { w: self } + #[inline(always)] + pub fn db7(&mut self) -> DB7_W { + DB7_W { w: self } } #[doc = "Bits 16:23 - Data byte 6"] - #[inline] - pub fn db6(&mut self) -> _DB6W { - _DB6W { w: self } + #[inline(always)] + pub fn db6(&mut self) -> DB6_W { + DB6_W { w: self } } #[doc = "Bits 8:15 - Data byte 5"] - #[inline] - pub fn db5(&mut self) -> _DB5W { - _DB5W { w: self } + #[inline(always)] + pub fn db5(&mut self) -> DB5_W { + DB5_W { w: self } } #[doc = "Bits 0:7 - Data byte 4"] - #[inline] - pub fn db4(&mut self) -> _DB4W { - _DB4W { w: self } + #[inline(always)] + pub fn db4(&mut self) -> DB4_W { + DB4_W { w: self } } } diff --git a/src/can0/tmdata12.rs b/src/can0/tmdata12.rs index c984841cea42de1baf6ed9c53d8f1cbdc0399fea..3135cd4acb13c54759328aa273bd04863ae151e5 100644 --- a/src/can0/tmdata12.rs +++ b/src/can0/tmdata12.rs @@ -1,228 +1,112 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::TMDATA12 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DB7R { - bits: u8, -} -impl DB7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB6R { - bits: u8, -} -impl DB6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB5R { - bits: u8, -} -impl DB5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DB4R { - bits: u8, -} -impl DB4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DB7W<'a> { +#[doc = "Reader of register TMDATA12"] +pub type R = crate::R; +#[doc = "Writer for register TMDATA12"] +pub type W = crate::W; +#[doc = "Register TMDATA12 `reset()`'s with value 0"] +impl crate::ResetValue for super::TMDATA12 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DB7`"] +pub type DB7_R = crate::R; +#[doc = "Write proxy for field `DB7`"] +pub struct DB7_W<'a> { w: &'a mut W, } -impl<'a> _DB7W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB7_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 24)) | (((value as u32) & 0xff) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _DB6W<'a> { +#[doc = "Reader of field `DB6`"] +pub type DB6_R = crate::R; +#[doc = "Write proxy for field `DB6`"] +pub struct DB6_W<'a> { w: &'a mut W, } -impl<'a> _DB6W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB6_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 16)) | (((value as u32) & 0xff) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _DB5W<'a> { +#[doc = "Reader of field `DB5`"] +pub type DB5_R = crate::R; +#[doc = "Write proxy for field `DB5`"] +pub struct DB5_W<'a> { w: &'a mut W, } -impl<'a> _DB5W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB5_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _DB4W<'a> { +#[doc = "Reader of field `DB4`"] +pub type DB4_R = crate::R; +#[doc = "Write proxy for field `DB4`"] +pub struct DB4_W<'a> { w: &'a mut W, } -impl<'a> _DB4W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DB4_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 24:31 - Data byte 7"] - #[inline] - pub fn db7(&self) -> DB7R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB7R { bits } + #[inline(always)] + pub fn db7(&self) -> DB7_R { + DB7_R::new(((self.bits >> 24) & 0xff) as u8) } #[doc = "Bits 16:23 - Data byte 6"] - #[inline] - pub fn db6(&self) -> DB6R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB6R { bits } + #[inline(always)] + pub fn db6(&self) -> DB6_R { + DB6_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bits 8:15 - Data byte 5"] - #[inline] - pub fn db5(&self) -> DB5R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB5R { bits } + #[inline(always)] + pub fn db5(&self) -> DB5_R { + DB5_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 0:7 - Data byte 4"] - #[inline] - pub fn db4(&self) -> DB4R { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DB4R { bits } + #[inline(always)] + pub fn db4(&self) -> DB4_R { + DB4_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 24:31 - Data byte 7"] - #[inline] - pub fn db7(&mut self) -> _DB7W { - _DB7W { w: self } + #[inline(always)] + pub fn db7(&mut self) -> DB7_W { + DB7_W { w: self } } #[doc = "Bits 16:23 - Data byte 6"] - #[inline] - pub fn db6(&mut self) -> _DB6W { - _DB6W { w: self } + #[inline(always)] + pub fn db6(&mut self) -> DB6_W { + DB6_W { w: self } } #[doc = "Bits 8:15 - Data byte 5"] - #[inline] - pub fn db5(&mut self) -> _DB5W { - _DB5W { w: self } + #[inline(always)] + pub fn db5(&mut self) -> DB5_W { + DB5_W { w: self } } #[doc = "Bits 0:7 - Data byte 4"] - #[inline] - pub fn db4(&mut self) -> _DB4W { - _DB4W { w: self } + #[inline(always)] + pub fn db4(&mut self) -> DB4_W { + DB4_W { w: self } } } diff --git a/src/can0/tmi0.rs b/src/can0/tmi0.rs index 967f93d8ca297cc93dd177cff88a542e2e525cba..bd10efe225284e3648dc2502cde4ba6c7f613469 100644 --- a/src/can0/tmi0.rs +++ b/src/can0/tmi0.rs @@ -1,323 +1,166 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::TMI0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SFID_EFIDR { - bits: u16, -} -impl SFID_EFIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EFIDR { - bits: u32, -} -impl EFIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct FFR { - bits: bool, -} -impl FFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTR { - bits: bool, -} -impl FTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TENR { - bits: bool, -} -impl TENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _SFID_EFIDW<'a> { +#[doc = "Reader of register TMI0"] +pub type R = crate::R; +#[doc = "Writer for register TMI0"] +pub type W = crate::W; +#[doc = "Register TMI0 `reset()`'s with value 0"] +impl crate::ResetValue for super::TMI0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `SFID_EFID`"] +pub type SFID_EFID_R = crate::R; +#[doc = "Write proxy for field `SFID_EFID`"] +pub struct SFID_EFID_W<'a> { w: &'a mut W, } -impl<'a> _SFID_EFIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SFID_EFID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07ff << 21)) | (((value as u32) & 0x07ff) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _EFIDW<'a> { +#[doc = "Reader of field `EFID`"] +pub type EFID_R = crate::R; +#[doc = "Write proxy for field `EFID`"] +pub struct EFID_W<'a> { w: &'a mut W, } -impl<'a> _EFIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EFID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0003_ffff; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0003_ffff << 3)) | (((value as u32) & 0x0003_ffff) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FFW<'a> { +#[doc = "Reader of field `FF`"] +pub type FF_R = crate::R; +#[doc = "Write proxy for field `FF`"] +pub struct FF_W<'a> { w: &'a mut W, } -impl<'a> _FFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FTW<'a> { +#[doc = "Reader of field `FT`"] +pub type FT_R = crate::R; +#[doc = "Write proxy for field `FT`"] +pub struct FT_W<'a> { w: &'a mut W, } -impl<'a> _FTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _TENW<'a> { +#[doc = "Reader of field `TEN`"] +pub type TEN_R = crate::R; +#[doc = "Write proxy for field `TEN`"] +pub struct TEN_W<'a> { w: &'a mut W, } -impl<'a> _TENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 21:31 - The frame identifier"] - #[inline] - pub fn sfid_efid(&self) -> SFID_EFIDR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - SFID_EFIDR { bits } + #[inline(always)] + pub fn sfid_efid(&self) -> SFID_EFID_R { + SFID_EFID_R::new(((self.bits >> 21) & 0x07ff) as u16) } #[doc = "Bits 3:20 - The frame identifier"] - #[inline] - pub fn efid(&self) -> EFIDR { - let bits = { - const MASK: u32 = 0x0003_ffff; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - EFIDR { bits } + #[inline(always)] + pub fn efid(&self) -> EFID_R { + EFID_R::new(((self.bits >> 3) & 0x0003_ffff) as u32) } #[doc = "Bit 2 - Frame format"] - #[inline] - pub fn ff(&self) -> FFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FFR { bits } + #[inline(always)] + pub fn ff(&self) -> FF_R { + FF_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Frame type"] - #[inline] - pub fn ft(&self) -> FTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTR { bits } + #[inline(always)] + pub fn ft(&self) -> FT_R { + FT_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Transmit enable"] - #[inline] - pub fn ten(&self) -> TENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TENR { bits } + #[inline(always)] + pub fn ten(&self) -> TEN_R { + TEN_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 21:31 - The frame identifier"] - #[inline] - pub fn sfid_efid(&mut self) -> _SFID_EFIDW { - _SFID_EFIDW { w: self } + #[inline(always)] + pub fn sfid_efid(&mut self) -> SFID_EFID_W { + SFID_EFID_W { w: self } } #[doc = "Bits 3:20 - The frame identifier"] - #[inline] - pub fn efid(&mut self) -> _EFIDW { - _EFIDW { w: self } + #[inline(always)] + pub fn efid(&mut self) -> EFID_W { + EFID_W { w: self } } #[doc = "Bit 2 - Frame format"] - #[inline] - pub fn ff(&mut self) -> _FFW { - _FFW { w: self } + #[inline(always)] + pub fn ff(&mut self) -> FF_W { + FF_W { w: self } } #[doc = "Bit 1 - Frame type"] - #[inline] - pub fn ft(&mut self) -> _FTW { - _FTW { w: self } + #[inline(always)] + pub fn ft(&mut self) -> FT_W { + FT_W { w: self } } #[doc = "Bit 0 - Transmit enable"] - #[inline] - pub fn ten(&mut self) -> _TENW { - _TENW { w: self } + #[inline(always)] + pub fn ten(&mut self) -> TEN_W { + TEN_W { w: self } } } diff --git a/src/can0/tmi1.rs b/src/can0/tmi1.rs index da754477555e315b437fc60a3c82aaa1fa5721b2..8a7ac4a89a4fdc8bf045a96c8faae5a6a694cdcb 100644 --- a/src/can0/tmi1.rs +++ b/src/can0/tmi1.rs @@ -1,323 +1,166 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::TMI1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SFID_EFIDR { - bits: u16, -} -impl SFID_EFIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EFIDR { - bits: u32, -} -impl EFIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct FFR { - bits: bool, -} -impl FFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTR { - bits: bool, -} -impl FTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TENR { - bits: bool, -} -impl TENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _SFID_EFIDW<'a> { +#[doc = "Reader of register TMI1"] +pub type R = crate::R; +#[doc = "Writer for register TMI1"] +pub type W = crate::W; +#[doc = "Register TMI1 `reset()`'s with value 0"] +impl crate::ResetValue for super::TMI1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `SFID_EFID`"] +pub type SFID_EFID_R = crate::R; +#[doc = "Write proxy for field `SFID_EFID`"] +pub struct SFID_EFID_W<'a> { w: &'a mut W, } -impl<'a> _SFID_EFIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SFID_EFID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07ff << 21)) | (((value as u32) & 0x07ff) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _EFIDW<'a> { +#[doc = "Reader of field `EFID`"] +pub type EFID_R = crate::R; +#[doc = "Write proxy for field `EFID`"] +pub struct EFID_W<'a> { w: &'a mut W, } -impl<'a> _EFIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EFID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0003_ffff; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0003_ffff << 3)) | (((value as u32) & 0x0003_ffff) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FFW<'a> { +#[doc = "Reader of field `FF`"] +pub type FF_R = crate::R; +#[doc = "Write proxy for field `FF`"] +pub struct FF_W<'a> { w: &'a mut W, } -impl<'a> _FFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FTW<'a> { +#[doc = "Reader of field `FT`"] +pub type FT_R = crate::R; +#[doc = "Write proxy for field `FT`"] +pub struct FT_W<'a> { w: &'a mut W, } -impl<'a> _FTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _TENW<'a> { +#[doc = "Reader of field `TEN`"] +pub type TEN_R = crate::R; +#[doc = "Write proxy for field `TEN`"] +pub struct TEN_W<'a> { w: &'a mut W, } -impl<'a> _TENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 21:31 - The frame identifier"] - #[inline] - pub fn sfid_efid(&self) -> SFID_EFIDR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - SFID_EFIDR { bits } + #[inline(always)] + pub fn sfid_efid(&self) -> SFID_EFID_R { + SFID_EFID_R::new(((self.bits >> 21) & 0x07ff) as u16) } #[doc = "Bits 3:20 - The frame identifier"] - #[inline] - pub fn efid(&self) -> EFIDR { - let bits = { - const MASK: u32 = 0x0003_ffff; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - EFIDR { bits } + #[inline(always)] + pub fn efid(&self) -> EFID_R { + EFID_R::new(((self.bits >> 3) & 0x0003_ffff) as u32) } #[doc = "Bit 2 - Frame format"] - #[inline] - pub fn ff(&self) -> FFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FFR { bits } + #[inline(always)] + pub fn ff(&self) -> FF_R { + FF_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Frame type"] - #[inline] - pub fn ft(&self) -> FTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTR { bits } + #[inline(always)] + pub fn ft(&self) -> FT_R { + FT_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Transmit enable"] - #[inline] - pub fn ten(&self) -> TENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TENR { bits } + #[inline(always)] + pub fn ten(&self) -> TEN_R { + TEN_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 21:31 - The frame identifier"] - #[inline] - pub fn sfid_efid(&mut self) -> _SFID_EFIDW { - _SFID_EFIDW { w: self } + #[inline(always)] + pub fn sfid_efid(&mut self) -> SFID_EFID_W { + SFID_EFID_W { w: self } } #[doc = "Bits 3:20 - The frame identifier"] - #[inline] - pub fn efid(&mut self) -> _EFIDW { - _EFIDW { w: self } + #[inline(always)] + pub fn efid(&mut self) -> EFID_W { + EFID_W { w: self } } #[doc = "Bit 2 - Frame format"] - #[inline] - pub fn ff(&mut self) -> _FFW { - _FFW { w: self } + #[inline(always)] + pub fn ff(&mut self) -> FF_W { + FF_W { w: self } } #[doc = "Bit 1 - Frame type"] - #[inline] - pub fn ft(&mut self) -> _FTW { - _FTW { w: self } + #[inline(always)] + pub fn ft(&mut self) -> FT_W { + FT_W { w: self } } #[doc = "Bit 0 - Transmit enable"] - #[inline] - pub fn ten(&mut self) -> _TENW { - _TENW { w: self } + #[inline(always)] + pub fn ten(&mut self) -> TEN_W { + TEN_W { w: self } } } diff --git a/src/can0/tmi2.rs b/src/can0/tmi2.rs index 95b7ace7ad768940687135b6785f6f16ed3d9a33..e9dd4b5834ad63b4da3a1aa3bdde09786aefa087 100644 --- a/src/can0/tmi2.rs +++ b/src/can0/tmi2.rs @@ -1,323 +1,166 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::TMI2 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SFID_EFIDR { - bits: u16, -} -impl SFID_EFIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EFIDR { - bits: u32, -} -impl EFIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct FFR { - bits: bool, -} -impl FFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTR { - bits: bool, -} -impl FTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TENR { - bits: bool, -} -impl TENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _SFID_EFIDW<'a> { +#[doc = "Reader of register TMI2"] +pub type R = crate::R; +#[doc = "Writer for register TMI2"] +pub type W = crate::W; +#[doc = "Register TMI2 `reset()`'s with value 0"] +impl crate::ResetValue for super::TMI2 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `SFID_EFID`"] +pub type SFID_EFID_R = crate::R; +#[doc = "Write proxy for field `SFID_EFID`"] +pub struct SFID_EFID_W<'a> { w: &'a mut W, } -impl<'a> _SFID_EFIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SFID_EFID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07ff << 21)) | (((value as u32) & 0x07ff) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _EFIDW<'a> { +#[doc = "Reader of field `EFID`"] +pub type EFID_R = crate::R; +#[doc = "Write proxy for field `EFID`"] +pub struct EFID_W<'a> { w: &'a mut W, } -impl<'a> _EFIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EFID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0003_ffff; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0003_ffff << 3)) | (((value as u32) & 0x0003_ffff) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FFW<'a> { +#[doc = "Reader of field `FF`"] +pub type FF_R = crate::R; +#[doc = "Write proxy for field `FF`"] +pub struct FF_W<'a> { w: &'a mut W, } -impl<'a> _FFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FTW<'a> { +#[doc = "Reader of field `FT`"] +pub type FT_R = crate::R; +#[doc = "Write proxy for field `FT`"] +pub struct FT_W<'a> { w: &'a mut W, } -impl<'a> _FTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _TENW<'a> { +#[doc = "Reader of field `TEN`"] +pub type TEN_R = crate::R; +#[doc = "Write proxy for field `TEN`"] +pub struct TEN_W<'a> { w: &'a mut W, } -impl<'a> _TENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 21:31 - The frame identifier"] - #[inline] - pub fn sfid_efid(&self) -> SFID_EFIDR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - SFID_EFIDR { bits } + #[inline(always)] + pub fn sfid_efid(&self) -> SFID_EFID_R { + SFID_EFID_R::new(((self.bits >> 21) & 0x07ff) as u16) } #[doc = "Bits 3:20 - The frame identifier"] - #[inline] - pub fn efid(&self) -> EFIDR { - let bits = { - const MASK: u32 = 0x0003_ffff; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - EFIDR { bits } + #[inline(always)] + pub fn efid(&self) -> EFID_R { + EFID_R::new(((self.bits >> 3) & 0x0003_ffff) as u32) } #[doc = "Bit 2 - Frame format"] - #[inline] - pub fn ff(&self) -> FFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FFR { bits } + #[inline(always)] + pub fn ff(&self) -> FF_R { + FF_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Frame type"] - #[inline] - pub fn ft(&self) -> FTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTR { bits } + #[inline(always)] + pub fn ft(&self) -> FT_R { + FT_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Transmit enable"] - #[inline] - pub fn ten(&self) -> TENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TENR { bits } + #[inline(always)] + pub fn ten(&self) -> TEN_R { + TEN_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 21:31 - The frame identifier"] - #[inline] - pub fn sfid_efid(&mut self) -> _SFID_EFIDW { - _SFID_EFIDW { w: self } + #[inline(always)] + pub fn sfid_efid(&mut self) -> SFID_EFID_W { + SFID_EFID_W { w: self } } #[doc = "Bits 3:20 - The frame identifier"] - #[inline] - pub fn efid(&mut self) -> _EFIDW { - _EFIDW { w: self } + #[inline(always)] + pub fn efid(&mut self) -> EFID_W { + EFID_W { w: self } } #[doc = "Bit 2 - Frame format"] - #[inline] - pub fn ff(&mut self) -> _FFW { - _FFW { w: self } + #[inline(always)] + pub fn ff(&mut self) -> FF_W { + FF_W { w: self } } #[doc = "Bit 1 - Frame type"] - #[inline] - pub fn ft(&mut self) -> _FTW { - _FTW { w: self } + #[inline(always)] + pub fn ft(&mut self) -> FT_W { + FT_W { w: self } } #[doc = "Bit 0 - Transmit enable"] - #[inline] - pub fn ten(&mut self) -> _TENW { - _TENW { w: self } + #[inline(always)] + pub fn ten(&mut self) -> TEN_W { + TEN_W { w: self } } } diff --git a/src/can0/tmp0.rs b/src/can0/tmp0.rs index 214aa289502c5d7d3ef7ef1ad77060703ab3cec8..ad733a1690ea42b55dadb262533f7dcad34c7b5a 100644 --- a/src/can0/tmp0.rs +++ b/src/can0/tmp0.rs @@ -1,205 +1,98 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::TMP0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TSR { - bits: u16, -} -impl TSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct TSENR { - bits: bool, -} -impl TSENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DLENCR { - bits: u8, -} -impl DLENCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _TSW<'a> { +#[doc = "Reader of register TMP0"] +pub type R = crate::R; +#[doc = "Writer for register TMP0"] +pub type W = crate::W; +#[doc = "Register TMP0 `reset()`'s with value 0"] +impl crate::ResetValue for super::TMP0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TS`"] +pub type TS_R = crate::R; +#[doc = "Write proxy for field `TS`"] +pub struct TS_W<'a> { w: &'a mut W, } -impl<'a> _TSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xffff << 16)) | (((value as u32) & 0xffff) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _TSENW<'a> { +#[doc = "Reader of field `TSEN`"] +pub type TSEN_R = crate::R; +#[doc = "Write proxy for field `TSEN`"] +pub struct TSEN_W<'a> { w: &'a mut W, } -impl<'a> _TSENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TSEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _DLENCW<'a> { +#[doc = "Reader of field `DLENC`"] +pub type DLENC_R = crate::R; +#[doc = "Write proxy for field `DLENC`"] +pub struct DLENC_W<'a> { w: &'a mut W, } -impl<'a> _DLENCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DLENC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 16:31 - Time stamp"] - #[inline] - pub fn ts(&self) -> TSR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - TSR { bits } + #[inline(always)] + pub fn ts(&self) -> TS_R { + TS_R::new(((self.bits >> 16) & 0xffff) as u16) } #[doc = "Bit 8 - Time stamp enable"] - #[inline] - pub fn tsen(&self) -> TSENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TSENR { bits } + #[inline(always)] + pub fn tsen(&self) -> TSEN_R { + TSEN_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bits 0:3 - Data length code"] - #[inline] - pub fn dlenc(&self) -> DLENCR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DLENCR { bits } + #[inline(always)] + pub fn dlenc(&self) -> DLENC_R { + DLENC_R::new((self.bits & 0x0f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 16:31 - Time stamp"] - #[inline] - pub fn ts(&mut self) -> _TSW { - _TSW { w: self } + #[inline(always)] + pub fn ts(&mut self) -> TS_W { + TS_W { w: self } } #[doc = "Bit 8 - Time stamp enable"] - #[inline] - pub fn tsen(&mut self) -> _TSENW { - _TSENW { w: self } + #[inline(always)] + pub fn tsen(&mut self) -> TSEN_W { + TSEN_W { w: self } } #[doc = "Bits 0:3 - Data length code"] - #[inline] - pub fn dlenc(&mut self) -> _DLENCW { - _DLENCW { w: self } + #[inline(always)] + pub fn dlenc(&mut self) -> DLENC_W { + DLENC_W { w: self } } } diff --git a/src/can0/tmp1.rs b/src/can0/tmp1.rs index 6c8758589d4f9b8ff52248b12c9c7b77e36c6c85..e126c9bce3918863e8b5026c0d8ff0e6fe7d9f65 100644 --- a/src/can0/tmp1.rs +++ b/src/can0/tmp1.rs @@ -1,205 +1,98 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::TMP1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TSR { - bits: u16, -} -impl TSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct TSENR { - bits: bool, -} -impl TSENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DLENCR { - bits: u8, -} -impl DLENCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _TSW<'a> { +#[doc = "Reader of register TMP1"] +pub type R = crate::R; +#[doc = "Writer for register TMP1"] +pub type W = crate::W; +#[doc = "Register TMP1 `reset()`'s with value 0"] +impl crate::ResetValue for super::TMP1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TS`"] +pub type TS_R = crate::R; +#[doc = "Write proxy for field `TS`"] +pub struct TS_W<'a> { w: &'a mut W, } -impl<'a> _TSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xffff << 16)) | (((value as u32) & 0xffff) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _TSENW<'a> { +#[doc = "Reader of field `TSEN`"] +pub type TSEN_R = crate::R; +#[doc = "Write proxy for field `TSEN`"] +pub struct TSEN_W<'a> { w: &'a mut W, } -impl<'a> _TSENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TSEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _DLENCW<'a> { +#[doc = "Reader of field `DLENC`"] +pub type DLENC_R = crate::R; +#[doc = "Write proxy for field `DLENC`"] +pub struct DLENC_W<'a> { w: &'a mut W, } -impl<'a> _DLENCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DLENC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 16:31 - Time stamp"] - #[inline] - pub fn ts(&self) -> TSR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - TSR { bits } + #[inline(always)] + pub fn ts(&self) -> TS_R { + TS_R::new(((self.bits >> 16) & 0xffff) as u16) } #[doc = "Bit 8 - Time stamp enable"] - #[inline] - pub fn tsen(&self) -> TSENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TSENR { bits } + #[inline(always)] + pub fn tsen(&self) -> TSEN_R { + TSEN_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bits 0:3 - Data length code"] - #[inline] - pub fn dlenc(&self) -> DLENCR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DLENCR { bits } + #[inline(always)] + pub fn dlenc(&self) -> DLENC_R { + DLENC_R::new((self.bits & 0x0f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 16:31 - Time stamp"] - #[inline] - pub fn ts(&mut self) -> _TSW { - _TSW { w: self } + #[inline(always)] + pub fn ts(&mut self) -> TS_W { + TS_W { w: self } } #[doc = "Bit 8 - Time stamp enable"] - #[inline] - pub fn tsen(&mut self) -> _TSENW { - _TSENW { w: self } + #[inline(always)] + pub fn tsen(&mut self) -> TSEN_W { + TSEN_W { w: self } } #[doc = "Bits 0:3 - Data length code"] - #[inline] - pub fn dlenc(&mut self) -> _DLENCW { - _DLENCW { w: self } + #[inline(always)] + pub fn dlenc(&mut self) -> DLENC_W { + DLENC_W { w: self } } } diff --git a/src/can0/tmp2.rs b/src/can0/tmp2.rs index 72324acf8e462d0abd96ceceb591d1d2cfcd2bc0..d7960fa23324a0cfd14dbaeca14377b7d413faee 100644 --- a/src/can0/tmp2.rs +++ b/src/can0/tmp2.rs @@ -1,205 +1,98 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::TMP2 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TSR { - bits: u16, -} -impl TSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct TSENR { - bits: bool, -} -impl TSENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DLENCR { - bits: u8, -} -impl DLENCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _TSW<'a> { +#[doc = "Reader of register TMP2"] +pub type R = crate::R; +#[doc = "Writer for register TMP2"] +pub type W = crate::W; +#[doc = "Register TMP2 `reset()`'s with value 0"] +impl crate::ResetValue for super::TMP2 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TS`"] +pub type TS_R = crate::R; +#[doc = "Write proxy for field `TS`"] +pub struct TS_W<'a> { w: &'a mut W, } -impl<'a> _TSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xffff << 16)) | (((value as u32) & 0xffff) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _TSENW<'a> { +#[doc = "Reader of field `TSEN`"] +pub type TSEN_R = crate::R; +#[doc = "Write proxy for field `TSEN`"] +pub struct TSEN_W<'a> { w: &'a mut W, } -impl<'a> _TSENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TSEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _DLENCW<'a> { +#[doc = "Reader of field `DLENC`"] +pub type DLENC_R = crate::R; +#[doc = "Write proxy for field `DLENC`"] +pub struct DLENC_W<'a> { w: &'a mut W, } -impl<'a> _DLENCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DLENC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 16:31 - Time stamp"] - #[inline] - pub fn ts(&self) -> TSR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - TSR { bits } + #[inline(always)] + pub fn ts(&self) -> TS_R { + TS_R::new(((self.bits >> 16) & 0xffff) as u16) } #[doc = "Bit 8 - Time stamp enable"] - #[inline] - pub fn tsen(&self) -> TSENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TSENR { bits } + #[inline(always)] + pub fn tsen(&self) -> TSEN_R { + TSEN_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bits 0:3 - Data length code"] - #[inline] - pub fn dlenc(&self) -> DLENCR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DLENCR { bits } + #[inline(always)] + pub fn dlenc(&self) -> DLENC_R { + DLENC_R::new((self.bits & 0x0f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 16:31 - Time stamp"] - #[inline] - pub fn ts(&mut self) -> _TSW { - _TSW { w: self } + #[inline(always)] + pub fn ts(&mut self) -> TS_W { + TS_W { w: self } } #[doc = "Bit 8 - Time stamp enable"] - #[inline] - pub fn tsen(&mut self) -> _TSENW { - _TSENW { w: self } + #[inline(always)] + pub fn tsen(&mut self) -> TSEN_W { + TSEN_W { w: self } } #[doc = "Bits 0:3 - Data length code"] - #[inline] - pub fn dlenc(&mut self) -> _DLENCW { - _DLENCW { w: self } + #[inline(always)] + pub fn dlenc(&mut self) -> DLENC_W { + DLENC_W { w: self } } } diff --git a/src/can0/tstat.rs b/src/can0/tstat.rs index 4f297497975a1eb9fa06c62b56795946dd815ffe..19cc286dfc6ccbc09fdcedc25339728151ec9eb8 100644 --- a/src/can0/tstat.rs +++ b/src/can0/tstat.rs @@ -1,1156 +1,575 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::TSTAT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TMLS2R { - bits: bool, -} -impl TMLS2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TMLS1R { - bits: bool, -} -impl TMLS1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TMLS0R { - bits: bool, -} -impl TMLS0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TME2R { - bits: bool, -} -impl TME2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TME1R { - bits: bool, -} -impl TME1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TME0R { - bits: bool, -} -impl TME0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NUMR { - bits: u8, -} -impl NUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MST2R { - bits: bool, -} -impl MST2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MTE2R { - bits: bool, -} -impl MTE2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MAL2R { - bits: bool, -} -impl MAL2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MTFNERR2R { - bits: bool, -} -impl MTFNERR2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MTF2R { - bits: bool, -} -impl MTF2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MST1R { - bits: bool, -} -impl MST1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MTE1R { - bits: bool, -} -impl MTE1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MAL1R { - bits: bool, -} -impl MAL1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MTFNERR1R { - bits: bool, -} -impl MTFNERR1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MTF1R { - bits: bool, -} -impl MTF1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MST0R { - bits: bool, -} -impl MST0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MTE0R { - bits: bool, -} -impl MTE0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MAL0R { - bits: bool, -} -impl MAL0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MTFNERR0R { - bits: bool, -} -impl MTFNERR0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MTF0R { - bits: bool, -} -impl MTF0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _MST2W<'a> { +#[doc = "Reader of register TSTAT"] +pub type R = crate::R; +#[doc = "Writer for register TSTAT"] +pub type W = crate::W; +#[doc = "Register TSTAT `reset()`'s with value 0x1c00_0000"] +impl crate::ResetValue for super::TSTAT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x1c00_0000 + } +} +#[doc = "Reader of field `TMLS2`"] +pub type TMLS2_R = crate::R; +#[doc = "Reader of field `TMLS1`"] +pub type TMLS1_R = crate::R; +#[doc = "Reader of field `TMLS0`"] +pub type TMLS0_R = crate::R; +#[doc = "Reader of field `TME2`"] +pub type TME2_R = crate::R; +#[doc = "Reader of field `TME1`"] +pub type TME1_R = crate::R; +#[doc = "Reader of field `TME0`"] +pub type TME0_R = crate::R; +#[doc = "Reader of field `NUM`"] +pub type NUM_R = crate::R; +#[doc = "Reader of field `MST2`"] +pub type MST2_R = crate::R; +#[doc = "Write proxy for field `MST2`"] +pub struct MST2_W<'a> { w: &'a mut W, } -impl<'a> _MST2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MST2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _MTE2W<'a> { +#[doc = "Reader of field `MTE2`"] +pub type MTE2_R = crate::R; +#[doc = "Write proxy for field `MTE2`"] +pub struct MTE2_W<'a> { w: &'a mut W, } -impl<'a> _MTE2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MTE2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _MAL2W<'a> { +#[doc = "Reader of field `MAL2`"] +pub type MAL2_R = crate::R; +#[doc = "Write proxy for field `MAL2`"] +pub struct MAL2_W<'a> { w: &'a mut W, } -impl<'a> _MAL2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MAL2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _MTFNERR2W<'a> { +#[doc = "Reader of field `MTFNERR2`"] +pub type MTFNERR2_R = crate::R; +#[doc = "Write proxy for field `MTFNERR2`"] +pub struct MTFNERR2_W<'a> { w: &'a mut W, } -impl<'a> _MTFNERR2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MTFNERR2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _MTF2W<'a> { +#[doc = "Reader of field `MTF2`"] +pub type MTF2_R = crate::R; +#[doc = "Write proxy for field `MTF2`"] +pub struct MTF2_W<'a> { w: &'a mut W, } -impl<'a> _MTF2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MTF2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _MST1W<'a> { +#[doc = "Reader of field `MST1`"] +pub type MST1_R = crate::R; +#[doc = "Write proxy for field `MST1`"] +pub struct MST1_W<'a> { w: &'a mut W, } -impl<'a> _MST1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MST1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _MTE1W<'a> { +#[doc = "Reader of field `MTE1`"] +pub type MTE1_R = crate::R; +#[doc = "Write proxy for field `MTE1`"] +pub struct MTE1_W<'a> { w: &'a mut W, } -impl<'a> _MTE1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MTE1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _MAL1W<'a> { +#[doc = "Reader of field `MAL1`"] +pub type MAL1_R = crate::R; +#[doc = "Write proxy for field `MAL1`"] +pub struct MAL1_W<'a> { w: &'a mut W, } -impl<'a> _MAL1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MAL1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _MTFNERR1W<'a> { +#[doc = "Reader of field `MTFNERR1`"] +pub type MTFNERR1_R = crate::R; +#[doc = "Write proxy for field `MTFNERR1`"] +pub struct MTFNERR1_W<'a> { w: &'a mut W, } -impl<'a> _MTFNERR1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MTFNERR1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _MTF1W<'a> { +#[doc = "Reader of field `MTF1`"] +pub type MTF1_R = crate::R; +#[doc = "Write proxy for field `MTF1`"] +pub struct MTF1_W<'a> { w: &'a mut W, } -impl<'a> _MTF1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MTF1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _MST0W<'a> { +#[doc = "Reader of field `MST0`"] +pub type MST0_R = crate::R; +#[doc = "Write proxy for field `MST0`"] +pub struct MST0_W<'a> { w: &'a mut W, } -impl<'a> _MST0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MST0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _MTE0W<'a> { +#[doc = "Reader of field `MTE0`"] +pub type MTE0_R = crate::R; +#[doc = "Write proxy for field `MTE0`"] +pub struct MTE0_W<'a> { w: &'a mut W, } -impl<'a> _MTE0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MTE0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _MAL0W<'a> { +#[doc = "Reader of field `MAL0`"] +pub type MAL0_R = crate::R; +#[doc = "Write proxy for field `MAL0`"] +pub struct MAL0_W<'a> { w: &'a mut W, } -impl<'a> _MAL0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MAL0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _MTFNERR0W<'a> { +#[doc = "Reader of field `MTFNERR0`"] +pub type MTFNERR0_R = crate::R; +#[doc = "Write proxy for field `MTFNERR0`"] +pub struct MTFNERR0_W<'a> { w: &'a mut W, } -impl<'a> _MTFNERR0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MTFNERR0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _MTF0W<'a> { +#[doc = "Reader of field `MTF0`"] +pub type MTF0_R = crate::R; +#[doc = "Write proxy for field `MTF0`"] +pub struct MTF0_W<'a> { w: &'a mut W, } -impl<'a> _MTF0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MTF0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 31 - Transmit mailbox 2 last sending in transmit FIFO"] - #[inline] - pub fn tmls2(&self) -> TMLS2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TMLS2R { bits } + #[inline(always)] + pub fn tmls2(&self) -> TMLS2_R { + TMLS2_R::new(((self.bits >> 31) & 0x01) != 0) } #[doc = "Bit 30 - Transmit mailbox 1 last sending in transmit FIFO"] - #[inline] - pub fn tmls1(&self) -> TMLS1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TMLS1R { bits } + #[inline(always)] + pub fn tmls1(&self) -> TMLS1_R { + TMLS1_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 29 - Transmit mailbox 0 last sending in transmit FIFO"] - #[inline] - pub fn tmls0(&self) -> TMLS0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TMLS0R { bits } + #[inline(always)] + pub fn tmls0(&self) -> TMLS0_R { + TMLS0_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 28 - Transmit mailbox 2 empty"] - #[inline] - pub fn tme2(&self) -> TME2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TME2R { bits } + #[inline(always)] + pub fn tme2(&self) -> TME2_R { + TME2_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 27 - Transmit mailbox 1 empty"] - #[inline] - pub fn tme1(&self) -> TME1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TME1R { bits } + #[inline(always)] + pub fn tme1(&self) -> TME1_R { + TME1_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 26 - Transmit mailbox 0 empty"] - #[inline] - pub fn tme0(&self) -> TME0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TME0R { bits } + #[inline(always)] + pub fn tme0(&self) -> TME0_R { + TME0_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bits 24:25 - number of the transmit FIFO mailbox in which the frame will be transmitted if at least one mailbox is empty"] - #[inline] - pub fn num(&self) -> NUMR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - NUMR { bits } + #[inline(always)] + pub fn num(&self) -> NUM_R { + NUM_R::new(((self.bits >> 24) & 0x03) as u8) } #[doc = "Bit 23 - Mailbox 2 stop transmitting"] - #[inline] - pub fn mst2(&self) -> MST2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MST2R { bits } + #[inline(always)] + pub fn mst2(&self) -> MST2_R { + MST2_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 19 - Mailbox 2 transmit error"] - #[inline] - pub fn mte2(&self) -> MTE2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MTE2R { bits } + #[inline(always)] + pub fn mte2(&self) -> MTE2_R { + MTE2_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 18 - Mailbox 2 arbitration lost"] - #[inline] - pub fn mal2(&self) -> MAL2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MAL2R { bits } + #[inline(always)] + pub fn mal2(&self) -> MAL2_R { + MAL2_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 17 - Mailbox 2 transmit finished and no error"] - #[inline] - pub fn mtfnerr2(&self) -> MTFNERR2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MTFNERR2R { bits } + #[inline(always)] + pub fn mtfnerr2(&self) -> MTFNERR2_R { + MTFNERR2_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 16 - Mailbox 2 transmit finished"] - #[inline] - pub fn mtf2(&self) -> MTF2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MTF2R { bits } + #[inline(always)] + pub fn mtf2(&self) -> MTF2_R { + MTF2_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 15 - Mailbox 1 stop transmitting"] - #[inline] - pub fn mst1(&self) -> MST1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MST1R { bits } + #[inline(always)] + pub fn mst1(&self) -> MST1_R { + MST1_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 11 - Mailbox 1 transmit error"] - #[inline] - pub fn mte1(&self) -> MTE1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MTE1R { bits } + #[inline(always)] + pub fn mte1(&self) -> MTE1_R { + MTE1_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Mailbox 1 arbitration lost"] - #[inline] - pub fn mal1(&self) -> MAL1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MAL1R { bits } + #[inline(always)] + pub fn mal1(&self) -> MAL1_R { + MAL1_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Mailbox 1 transmit finished and no error"] - #[inline] - pub fn mtfnerr1(&self) -> MTFNERR1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MTFNERR1R { bits } + #[inline(always)] + pub fn mtfnerr1(&self) -> MTFNERR1_R { + MTFNERR1_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Mailbox 1 transmit finished"] - #[inline] - pub fn mtf1(&self) -> MTF1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MTF1R { bits } + #[inline(always)] + pub fn mtf1(&self) -> MTF1_R { + MTF1_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - Mailbox 0 stop transmitting"] - #[inline] - pub fn mst0(&self) -> MST0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MST0R { bits } + #[inline(always)] + pub fn mst0(&self) -> MST0_R { + MST0_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 3 - Mailbox 0 transmit error"] - #[inline] - pub fn mte0(&self) -> MTE0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MTE0R { bits } + #[inline(always)] + pub fn mte0(&self) -> MTE0_R { + MTE0_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Mailbox 0 arbitration lost"] - #[inline] - pub fn mal0(&self) -> MAL0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MAL0R { bits } + #[inline(always)] + pub fn mal0(&self) -> MAL0_R { + MAL0_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Mailbox 0 transmit finished and no error"] - #[inline] - pub fn mtfnerr0(&self) -> MTFNERR0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MTFNERR0R { bits } + #[inline(always)] + pub fn mtfnerr0(&self) -> MTFNERR0_R { + MTFNERR0_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Mailbox 0 transmit finished"] - #[inline] - pub fn mtf0(&self) -> MTF0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MTF0R { bits } + #[inline(always)] + pub fn mtf0(&self) -> MTF0_R { + MTF0_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x1c00_0000 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 23 - Mailbox 2 stop transmitting"] - #[inline] - pub fn mst2(&mut self) -> _MST2W { - _MST2W { w: self } + #[inline(always)] + pub fn mst2(&mut self) -> MST2_W { + MST2_W { w: self } } #[doc = "Bit 19 - Mailbox 2 transmit error"] - #[inline] - pub fn mte2(&mut self) -> _MTE2W { - _MTE2W { w: self } + #[inline(always)] + pub fn mte2(&mut self) -> MTE2_W { + MTE2_W { w: self } } #[doc = "Bit 18 - Mailbox 2 arbitration lost"] - #[inline] - pub fn mal2(&mut self) -> _MAL2W { - _MAL2W { w: self } + #[inline(always)] + pub fn mal2(&mut self) -> MAL2_W { + MAL2_W { w: self } } #[doc = "Bit 17 - Mailbox 2 transmit finished and no error"] - #[inline] - pub fn mtfnerr2(&mut self) -> _MTFNERR2W { - _MTFNERR2W { w: self } + #[inline(always)] + pub fn mtfnerr2(&mut self) -> MTFNERR2_W { + MTFNERR2_W { w: self } } #[doc = "Bit 16 - Mailbox 2 transmit finished"] - #[inline] - pub fn mtf2(&mut self) -> _MTF2W { - _MTF2W { w: self } + #[inline(always)] + pub fn mtf2(&mut self) -> MTF2_W { + MTF2_W { w: self } } #[doc = "Bit 15 - Mailbox 1 stop transmitting"] - #[inline] - pub fn mst1(&mut self) -> _MST1W { - _MST1W { w: self } + #[inline(always)] + pub fn mst1(&mut self) -> MST1_W { + MST1_W { w: self } } #[doc = "Bit 11 - Mailbox 1 transmit error"] - #[inline] - pub fn mte1(&mut self) -> _MTE1W { - _MTE1W { w: self } + #[inline(always)] + pub fn mte1(&mut self) -> MTE1_W { + MTE1_W { w: self } } #[doc = "Bit 10 - Mailbox 1 arbitration lost"] - #[inline] - pub fn mal1(&mut self) -> _MAL1W { - _MAL1W { w: self } + #[inline(always)] + pub fn mal1(&mut self) -> MAL1_W { + MAL1_W { w: self } } #[doc = "Bit 9 - Mailbox 1 transmit finished and no error"] - #[inline] - pub fn mtfnerr1(&mut self) -> _MTFNERR1W { - _MTFNERR1W { w: self } + #[inline(always)] + pub fn mtfnerr1(&mut self) -> MTFNERR1_W { + MTFNERR1_W { w: self } } #[doc = "Bit 8 - Mailbox 1 transmit finished"] - #[inline] - pub fn mtf1(&mut self) -> _MTF1W { - _MTF1W { w: self } + #[inline(always)] + pub fn mtf1(&mut self) -> MTF1_W { + MTF1_W { w: self } } #[doc = "Bit 7 - Mailbox 0 stop transmitting"] - #[inline] - pub fn mst0(&mut self) -> _MST0W { - _MST0W { w: self } + #[inline(always)] + pub fn mst0(&mut self) -> MST0_W { + MST0_W { w: self } } #[doc = "Bit 3 - Mailbox 0 transmit error"] - #[inline] - pub fn mte0(&mut self) -> _MTE0W { - _MTE0W { w: self } + #[inline(always)] + pub fn mte0(&mut self) -> MTE0_W { + MTE0_W { w: self } } #[doc = "Bit 2 - Mailbox 0 arbitration lost"] - #[inline] - pub fn mal0(&mut self) -> _MAL0W { - _MAL0W { w: self } + #[inline(always)] + pub fn mal0(&mut self) -> MAL0_W { + MAL0_W { w: self } } #[doc = "Bit 1 - Mailbox 0 transmit finished and no error"] - #[inline] - pub fn mtfnerr0(&mut self) -> _MTFNERR0W { - _MTFNERR0W { w: self } + #[inline(always)] + pub fn mtfnerr0(&mut self) -> MTFNERR0_W { + MTFNERR0_W { w: self } } #[doc = "Bit 0 - Mailbox 0 transmit finished"] - #[inline] - pub fn mtf0(&mut self) -> _MTF0W { - _MTF0W { w: self } + #[inline(always)] + pub fn mtf0(&mut self) -> MTF0_W { + MTF0_W { w: self } } } diff --git a/src/crc.rs b/src/crc.rs index 7fabef909c23360cca2454a3d9bd01911df5f390..c5626732d8ca74e7383d0dee290f8a4b6ee9cf6b 100644 --- a/src/crc.rs +++ b/src/crc.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Data register"] @@ -8,21 +8,36 @@ pub struct RegisterBlock { #[doc = "0x08 - Control register"] pub ctl: CTL, } -#[doc = "Data register"] -pub struct DATA { - register: ::vcell::VolatileCell, -} +#[doc = "Data register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data](data) module"] +pub type DATA = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA; +#[doc = "`read()` method returns [data::R](data::R) reader structure"] +impl crate::Readable for DATA {} +#[doc = "`write(|w| ..)` method takes [data::W](data::W) writer structure"] +impl crate::Writable for DATA {} #[doc = "Data register"] pub mod data; -#[doc = "Free data register"] -pub struct FDATA { - register: ::vcell::VolatileCell, -} +#[doc = "Free data register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [fdata](fdata) module"] +pub type FDATA = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _FDATA; +#[doc = "`read()` method returns [fdata::R](fdata::R) reader structure"] +impl crate::Readable for FDATA {} +#[doc = "`write(|w| ..)` method takes [fdata::W](fdata::W) writer structure"] +impl crate::Writable for FDATA {} #[doc = "Free data register"] pub mod fdata; -#[doc = "Control register"] -pub struct CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl](ctl) module"] +pub type CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL; +#[doc = "`read()` method returns [ctl::R](ctl::R) reader structure"] +impl crate::Readable for CTL {} +#[doc = "`write(|w| ..)` method takes [ctl::W](ctl::W) writer structure"] +impl crate::Writable for CTL {} #[doc = "Control register"] pub mod ctl; diff --git a/src/crc/ctl.rs b/src/crc/ctl.rs index 8e9ea813f8cfa9d6d2863f49d59aa321d4de046a..cba46826ab3c40639b12c32758938131d492447e 100644 --- a/src/crc/ctl.rs +++ b/src/crc/ctl.rs @@ -1,123 +1,50 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RSTR { - bits: bool, -} -impl RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _RSTW<'a> { +#[doc = "Reader of register CTL"] +pub type R = crate::R; +#[doc = "Writer for register CTL"] +pub type W = crate::W; +#[doc = "Register CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `RST`"] +pub type RST_R = crate::R; +#[doc = "Write proxy for field `RST`"] +pub struct RST_W<'a> { w: &'a mut W, } -impl<'a> _RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - reset bit"] - #[inline] - pub fn rst(&self) -> RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RSTR { bits } + #[inline(always)] + pub fn rst(&self) -> RST_R { + RST_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - reset bit"] - #[inline] - pub fn rst(&mut self) -> _RSTW { - _RSTW { w: self } + #[inline(always)] + pub fn rst(&mut self) -> RST_W { + RST_W { w: self } } } diff --git a/src/crc/data.rs b/src/crc/data.rs index 857a7080a0d4102533a0ba7ddc7ed603cc16d866..6d476aa7895a81519d33a1dbb46ddfd1c586f64f 100644 --- a/src/crc/data.rs +++ b/src/crc/data.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DATA { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u32, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA"] +pub type R = crate::R; +#[doc = "Writer for register DATA"] +pub type W = crate::W; +#[doc = "Register DATA `reset()`'s with value 0xffff_ffff"] +impl crate::ResetValue for super::DATA { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0xffff_ffff + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - CRC calculation result bits"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0xffff_ffff } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - CRC calculation result bits"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/crc/fdata.rs b/src/crc/fdata.rs index cfbff08405a63062a0a5e5cff102021bda33dc67..1edc83423bfc0401300c6f2d8d83b9b83d75fa67 100644 --- a/src/crc/fdata.rs +++ b/src/crc/fdata.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::FDATA { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FDATAR { - bits: u8, -} -impl FDATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _FDATAW<'a> { +#[doc = "Reader of register FDATA"] +pub type R = crate::R; +#[doc = "Writer for register FDATA"] +pub type W = crate::W; +#[doc = "Register FDATA `reset()`'s with value 0"] +impl crate::ResetValue for super::FDATA { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FDATA`"] +pub type FDATA_R = crate::R; +#[doc = "Write proxy for field `FDATA`"] +pub struct FDATA_W<'a> { w: &'a mut W, } -impl<'a> _FDATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> FDATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:7 - Free Data Register bits"] - #[inline] - pub fn fdata(&self) -> FDATAR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - FDATAR { bits } + #[inline(always)] + pub fn fdata(&self) -> FDATA_R { + FDATA_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:7 - Free Data Register bits"] - #[inline] - pub fn fdata(&mut self) -> _FDATAW { - _FDATAW { w: self } + #[inline(always)] + pub fn fdata(&mut self) -> FDATA_W { + FDATA_W { w: self } } } diff --git a/src/dac.rs b/src/dac.rs index 12cc3715cfebb6dcfa247ae410ba48e977167ddb..6cfd20acbb922a03c1d7d324732f20cc6655bab6 100644 --- a/src/dac.rs +++ b/src/dac.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - control register"] @@ -28,81 +28,140 @@ pub struct RegisterBlock { #[doc = "0x30 - DAC1 data output register"] pub dac1_do: DAC1_DO, } -#[doc = "control register"] -pub struct CTL { - register: ::vcell::VolatileCell, -} +#[doc = "control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl](ctl) module"] +pub type CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL; +#[doc = "`read()` method returns [ctl::R](ctl::R) reader structure"] +impl crate::Readable for CTL {} +#[doc = "`write(|w| ..)` method takes [ctl::W](ctl::W) writer structure"] +impl crate::Writable for CTL {} #[doc = "control register"] pub mod ctl; -#[doc = "software trigger register"] -pub struct SWT { - register: ::vcell::VolatileCell, -} +#[doc = "software trigger register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [swt](swt) module"] +pub type SWT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _SWT; +#[doc = "`write(|w| ..)` method takes [swt::W](swt::W) writer structure"] +impl crate::Writable for SWT {} #[doc = "software trigger register"] pub mod swt; -#[doc = "DAC0 12-bit right-aligned data holding register"] -pub struct DAC0_R12DH { - register: ::vcell::VolatileCell, -} +#[doc = "DAC0 12-bit right-aligned data holding register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dac0_r12dh](dac0_r12dh) module"] +pub type DAC0_R12DH = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DAC0_R12DH; +#[doc = "`read()` method returns [dac0_r12dh::R](dac0_r12dh::R) reader structure"] +impl crate::Readable for DAC0_R12DH {} +#[doc = "`write(|w| ..)` method takes [dac0_r12dh::W](dac0_r12dh::W) writer structure"] +impl crate::Writable for DAC0_R12DH {} #[doc = "DAC0 12-bit right-aligned data holding register"] pub mod dac0_r12dh; -#[doc = "DAC0 12-bit left-aligned data holding register"] -pub struct DAC0_L12DH { - register: ::vcell::VolatileCell, -} +#[doc = "DAC0 12-bit left-aligned data holding register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dac0_l12dh](dac0_l12dh) module"] +pub type DAC0_L12DH = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DAC0_L12DH; +#[doc = "`read()` method returns [dac0_l12dh::R](dac0_l12dh::R) reader structure"] +impl crate::Readable for DAC0_L12DH {} +#[doc = "`write(|w| ..)` method takes [dac0_l12dh::W](dac0_l12dh::W) writer structure"] +impl crate::Writable for DAC0_L12DH {} #[doc = "DAC0 12-bit left-aligned data holding register"] pub mod dac0_l12dh; -#[doc = "DAC0 8-bit right aligned data holding register"] -pub struct DAC0_R8DH { - register: ::vcell::VolatileCell, -} +#[doc = "DAC0 8-bit right aligned data holding register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dac0_r8dh](dac0_r8dh) module"] +pub type DAC0_R8DH = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DAC0_R8DH; +#[doc = "`read()` method returns [dac0_r8dh::R](dac0_r8dh::R) reader structure"] +impl crate::Readable for DAC0_R8DH {} +#[doc = "`write(|w| ..)` method takes [dac0_r8dh::W](dac0_r8dh::W) writer structure"] +impl crate::Writable for DAC0_R8DH {} #[doc = "DAC0 8-bit right aligned data holding register"] pub mod dac0_r8dh; -#[doc = "DAC1 12-bit right-aligned data holding register"] -pub struct DAC1_R12DH { - register: ::vcell::VolatileCell, -} +#[doc = "DAC1 12-bit right-aligned data holding register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dac1_r12dh](dac1_r12dh) module"] +pub type DAC1_R12DH = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DAC1_R12DH; +#[doc = "`read()` method returns [dac1_r12dh::R](dac1_r12dh::R) reader structure"] +impl crate::Readable for DAC1_R12DH {} +#[doc = "`write(|w| ..)` method takes [dac1_r12dh::W](dac1_r12dh::W) writer structure"] +impl crate::Writable for DAC1_R12DH {} #[doc = "DAC1 12-bit right-aligned data holding register"] pub mod dac1_r12dh; -#[doc = "DAC1 12-bit left aligned data holding register"] -pub struct DAC1_L12DH { - register: ::vcell::VolatileCell, -} +#[doc = "DAC1 12-bit left aligned data holding register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dac1_l12dh](dac1_l12dh) module"] +pub type DAC1_L12DH = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DAC1_L12DH; +#[doc = "`read()` method returns [dac1_l12dh::R](dac1_l12dh::R) reader structure"] +impl crate::Readable for DAC1_L12DH {} +#[doc = "`write(|w| ..)` method takes [dac1_l12dh::W](dac1_l12dh::W) writer structure"] +impl crate::Writable for DAC1_L12DH {} #[doc = "DAC1 12-bit left aligned data holding register"] pub mod dac1_l12dh; -#[doc = "DAC1 8-bit right aligned data holding register"] -pub struct DAC1_R8DH { - register: ::vcell::VolatileCell, -} +#[doc = "DAC1 8-bit right aligned data holding register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dac1_r8dh](dac1_r8dh) module"] +pub type DAC1_R8DH = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DAC1_R8DH; +#[doc = "`read()` method returns [dac1_r8dh::R](dac1_r8dh::R) reader structure"] +impl crate::Readable for DAC1_R8DH {} +#[doc = "`write(|w| ..)` method takes [dac1_r8dh::W](dac1_r8dh::W) writer structure"] +impl crate::Writable for DAC1_R8DH {} #[doc = "DAC1 8-bit right aligned data holding register"] pub mod dac1_r8dh; -#[doc = "DAC concurrent mode 12-bit right-aligned data holding register"] -pub struct DACC_R12DH { - register: ::vcell::VolatileCell, -} +#[doc = "DAC concurrent mode 12-bit right-aligned data holding register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dacc_r12dh](dacc_r12dh) module"] +pub type DACC_R12DH = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DACC_R12DH; +#[doc = "`read()` method returns [dacc_r12dh::R](dacc_r12dh::R) reader structure"] +impl crate::Readable for DACC_R12DH {} +#[doc = "`write(|w| ..)` method takes [dacc_r12dh::W](dacc_r12dh::W) writer structure"] +impl crate::Writable for DACC_R12DH {} #[doc = "DAC concurrent mode 12-bit right-aligned data holding register"] pub mod dacc_r12dh; -#[doc = "DAC concurrent mode 12-bit left aligned data holding register"] -pub struct DACC_L12DH { - register: ::vcell::VolatileCell, -} +#[doc = "DAC concurrent mode 12-bit left aligned data holding register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dacc_l12dh](dacc_l12dh) module"] +pub type DACC_L12DH = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DACC_L12DH; +#[doc = "`read()` method returns [dacc_l12dh::R](dacc_l12dh::R) reader structure"] +impl crate::Readable for DACC_L12DH {} +#[doc = "`write(|w| ..)` method takes [dacc_l12dh::W](dacc_l12dh::W) writer structure"] +impl crate::Writable for DACC_L12DH {} #[doc = "DAC concurrent mode 12-bit left aligned data holding register"] pub mod dacc_l12dh; -#[doc = "DAC concurrent mode 8-bit right aligned data holding register"] -pub struct DACC_R8DH { - register: ::vcell::VolatileCell, -} +#[doc = "DAC concurrent mode 8-bit right aligned data holding register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dacc_r8dh](dacc_r8dh) module"] +pub type DACC_R8DH = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DACC_R8DH; +#[doc = "`read()` method returns [dacc_r8dh::R](dacc_r8dh::R) reader structure"] +impl crate::Readable for DACC_R8DH {} +#[doc = "`write(|w| ..)` method takes [dacc_r8dh::W](dacc_r8dh::W) writer structure"] +impl crate::Writable for DACC_R8DH {} #[doc = "DAC concurrent mode 8-bit right aligned data holding register"] pub mod dacc_r8dh; -#[doc = "DAC0 data output register"] -pub struct DAC0_DO { - register: ::vcell::VolatileCell, -} +#[doc = "DAC0 data output register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dac0_do](dac0_do) module"] +pub type DAC0_DO = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DAC0_DO; +#[doc = "`read()` method returns [dac0_do::R](dac0_do::R) reader structure"] +impl crate::Readable for DAC0_DO {} #[doc = "DAC0 data output register"] pub mod dac0_do; -#[doc = "DAC1 data output register"] -pub struct DAC1_DO { - register: ::vcell::VolatileCell, -} +#[doc = "DAC1 data output register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dac1_do](dac1_do) module"] +pub type DAC1_DO = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DAC1_DO; +#[doc = "`read()` method returns [dac1_do::R](dac1_do::R) reader structure"] +impl crate::Readable for DAC1_DO {} #[doc = "DAC1 data output register"] pub mod dac1_do; diff --git a/src/dac/ctl.rs b/src/dac/ctl.rs index 9aa36072a072de548c4305dad58aec42730cdf82..60a79ce9a11d4cbc8eaacff097ef55a5cb8fa7b5 100644 --- a/src/dac/ctl.rs +++ b/src/dac/ctl.rs @@ -1,782 +1,432 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DEN0R { - bits: bool, -} -impl DEN0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DBOFF0R { - bits: bool, -} -impl DBOFF0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTEN0R { - bits: bool, -} -impl DTEN0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTSEL0R { - bits: u8, -} -impl DTSEL0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DWM0R { - bits: u8, -} -impl DWM0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DWBW0R { - bits: u8, -} -impl DWBW0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DDMAEN0R { - bits: bool, -} -impl DDMAEN0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DEN1R { - bits: bool, -} -impl DEN1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DBOFF1R { - bits: bool, -} -impl DBOFF1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTEN1R { - bits: bool, -} -impl DTEN1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTSEL1R { - bits: u8, -} -impl DTSEL1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DWM1R { - bits: u8, -} -impl DWM1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DWBW1R { - bits: u8, -} -impl DWBW1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DDMAEN1R { - bits: bool, -} -impl DDMAEN1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _DEN0W<'a> { +#[doc = "Reader of register CTL"] +pub type R = crate::R; +#[doc = "Writer for register CTL"] +pub type W = crate::W; +#[doc = "Register CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DEN0`"] +pub type DEN0_R = crate::R; +#[doc = "Write proxy for field `DEN0`"] +pub struct DEN0_W<'a> { w: &'a mut W, } -impl<'a> _DEN0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DEN0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _DBOFF0W<'a> { +#[doc = "Reader of field `DBOFF0`"] +pub type DBOFF0_R = crate::R; +#[doc = "Write proxy for field `DBOFF0`"] +pub struct DBOFF0_W<'a> { w: &'a mut W, } -impl<'a> _DBOFF0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DBOFF0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _DTEN0W<'a> { +#[doc = "Reader of field `DTEN0`"] +pub type DTEN0_R = crate::R; +#[doc = "Write proxy for field `DTEN0`"] +pub struct DTEN0_W<'a> { w: &'a mut W, } -impl<'a> _DTEN0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTEN0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _DTSEL0W<'a> { +#[doc = "Reader of field `DTSEL0`"] +pub type DTSEL0_R = crate::R; +#[doc = "Write proxy for field `DTSEL0`"] +pub struct DTSEL0_W<'a> { w: &'a mut W, } -impl<'a> _DTSEL0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DTSEL0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 3)) | (((value as u32) & 0x07) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _DWM0W<'a> { +#[doc = "Reader of field `DWM0`"] +pub type DWM0_R = crate::R; +#[doc = "Write proxy for field `DWM0`"] +pub struct DWM0_W<'a> { w: &'a mut W, } -impl<'a> _DWM0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DWM0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 6)) | (((value as u32) & 0x03) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _DWBW0W<'a> { +#[doc = "Reader of field `DWBW0`"] +pub type DWBW0_R = crate::R; +#[doc = "Write proxy for field `DWBW0`"] +pub struct DWBW0_W<'a> { w: &'a mut W, } -impl<'a> _DWBW0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DWBW0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 8)) | (((value as u32) & 0x0f) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _DDMAEN0W<'a> { +#[doc = "Reader of field `DDMAEN0`"] +pub type DDMAEN0_R = crate::R; +#[doc = "Write proxy for field `DDMAEN0`"] +pub struct DDMAEN0_W<'a> { w: &'a mut W, } -impl<'a> _DDMAEN0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DDMAEN0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _DEN1W<'a> { +#[doc = "Reader of field `DEN1`"] +pub type DEN1_R = crate::R; +#[doc = "Write proxy for field `DEN1`"] +pub struct DEN1_W<'a> { w: &'a mut W, } -impl<'a> _DEN1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DEN1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _DBOFF1W<'a> { +#[doc = "Reader of field `DBOFF1`"] +pub type DBOFF1_R = crate::R; +#[doc = "Write proxy for field `DBOFF1`"] +pub struct DBOFF1_W<'a> { w: &'a mut W, } -impl<'a> _DBOFF1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DBOFF1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _DTEN1W<'a> { +#[doc = "Reader of field `DTEN1`"] +pub type DTEN1_R = crate::R; +#[doc = "Write proxy for field `DTEN1`"] +pub struct DTEN1_W<'a> { w: &'a mut W, } -impl<'a> _DTEN1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTEN1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _DTSEL1W<'a> { +#[doc = "Reader of field `DTSEL1`"] +pub type DTSEL1_R = crate::R; +#[doc = "Write proxy for field `DTSEL1`"] +pub struct DTSEL1_W<'a> { w: &'a mut W, } -impl<'a> _DTSEL1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DTSEL1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 19)) | (((value as u32) & 0x07) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _DWM1W<'a> { +#[doc = "Reader of field `DWM1`"] +pub type DWM1_R = crate::R; +#[doc = "Write proxy for field `DWM1`"] +pub struct DWM1_W<'a> { w: &'a mut W, } -impl<'a> _DWM1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DWM1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 22)) | (((value as u32) & 0x03) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _DWBW1W<'a> { +#[doc = "Reader of field `DWBW1`"] +pub type DWBW1_R = crate::R; +#[doc = "Write proxy for field `DWBW1`"] +pub struct DWBW1_W<'a> { w: &'a mut W, } -impl<'a> _DWBW1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DWBW1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 24)) | (((value as u32) & 0x0f) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _DDMAEN1W<'a> { +#[doc = "Reader of field `DDMAEN1`"] +pub type DDMAEN1_R = crate::R; +#[doc = "Write proxy for field `DDMAEN1`"] +pub struct DDMAEN1_W<'a> { w: &'a mut W, } -impl<'a> _DDMAEN1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DDMAEN1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - DAC0 enable"] - #[inline] - pub fn den0(&self) -> DEN0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DEN0R { bits } + #[inline(always)] + pub fn den0(&self) -> DEN0_R { + DEN0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - DAC0 output buffer turn off"] - #[inline] - pub fn dboff0(&self) -> DBOFF0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DBOFF0R { bits } + #[inline(always)] + pub fn dboff0(&self) -> DBOFF0_R { + DBOFF0_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - DAC0 trigger enable"] - #[inline] - pub fn dten0(&self) -> DTEN0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTEN0R { bits } + #[inline(always)] + pub fn dten0(&self) -> DTEN0_R { + DTEN0_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bits 3:5 - DAC0 trigger selection"] - #[inline] - pub fn dtsel0(&self) -> DTSEL0R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DTSEL0R { bits } + #[inline(always)] + pub fn dtsel0(&self) -> DTSEL0_R { + DTSEL0_R::new(((self.bits >> 3) & 0x07) as u8) } #[doc = "Bits 6:7 - DAC0 noise wave mode"] - #[inline] - pub fn dwm0(&self) -> DWM0R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DWM0R { bits } + #[inline(always)] + pub fn dwm0(&self) -> DWM0_R { + DWM0_R::new(((self.bits >> 6) & 0x03) as u8) } #[doc = "Bits 8:11 - DAC0 noise wave bit width"] - #[inline] - pub fn dwbw0(&self) -> DWBW0R { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DWBW0R { bits } + #[inline(always)] + pub fn dwbw0(&self) -> DWBW0_R { + DWBW0_R::new(((self.bits >> 8) & 0x0f) as u8) } #[doc = "Bit 12 - DAC0 DMA enable"] - #[inline] - pub fn ddmaen0(&self) -> DDMAEN0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DDMAEN0R { bits } + #[inline(always)] + pub fn ddmaen0(&self) -> DDMAEN0_R { + DDMAEN0_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 16 - DAC1 enable"] - #[inline] - pub fn den1(&self) -> DEN1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DEN1R { bits } + #[inline(always)] + pub fn den1(&self) -> DEN1_R { + DEN1_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - DAC1 output buffer turn off"] - #[inline] - pub fn dboff1(&self) -> DBOFF1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DBOFF1R { bits } + #[inline(always)] + pub fn dboff1(&self) -> DBOFF1_R { + DBOFF1_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - DAC1 trigger enable"] - #[inline] - pub fn dten1(&self) -> DTEN1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTEN1R { bits } + #[inline(always)] + pub fn dten1(&self) -> DTEN1_R { + DTEN1_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bits 19:21 - DAC1 trigger selection"] - #[inline] - pub fn dtsel1(&self) -> DTSEL1R { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DTSEL1R { bits } + #[inline(always)] + pub fn dtsel1(&self) -> DTSEL1_R { + DTSEL1_R::new(((self.bits >> 19) & 0x07) as u8) } #[doc = "Bits 22:23 - DAC1 noise wave mode"] - #[inline] - pub fn dwm1(&self) -> DWM1R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DWM1R { bits } + #[inline(always)] + pub fn dwm1(&self) -> DWM1_R { + DWM1_R::new(((self.bits >> 22) & 0x03) as u8) } #[doc = "Bits 24:27 - DAC1 noise wave bit width"] - #[inline] - pub fn dwbw1(&self) -> DWBW1R { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DWBW1R { bits } + #[inline(always)] + pub fn dwbw1(&self) -> DWBW1_R { + DWBW1_R::new(((self.bits >> 24) & 0x0f) as u8) } #[doc = "Bit 28 - DAC1 DMA enable"] - #[inline] - pub fn ddmaen1(&self) -> DDMAEN1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DDMAEN1R { bits } + #[inline(always)] + pub fn ddmaen1(&self) -> DDMAEN1_R { + DDMAEN1_R::new(((self.bits >> 28) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - DAC0 enable"] - #[inline] - pub fn den0(&mut self) -> _DEN0W { - _DEN0W { w: self } + #[inline(always)] + pub fn den0(&mut self) -> DEN0_W { + DEN0_W { w: self } } #[doc = "Bit 1 - DAC0 output buffer turn off"] - #[inline] - pub fn dboff0(&mut self) -> _DBOFF0W { - _DBOFF0W { w: self } + #[inline(always)] + pub fn dboff0(&mut self) -> DBOFF0_W { + DBOFF0_W { w: self } } #[doc = "Bit 2 - DAC0 trigger enable"] - #[inline] - pub fn dten0(&mut self) -> _DTEN0W { - _DTEN0W { w: self } + #[inline(always)] + pub fn dten0(&mut self) -> DTEN0_W { + DTEN0_W { w: self } } #[doc = "Bits 3:5 - DAC0 trigger selection"] - #[inline] - pub fn dtsel0(&mut self) -> _DTSEL0W { - _DTSEL0W { w: self } + #[inline(always)] + pub fn dtsel0(&mut self) -> DTSEL0_W { + DTSEL0_W { w: self } } #[doc = "Bits 6:7 - DAC0 noise wave mode"] - #[inline] - pub fn dwm0(&mut self) -> _DWM0W { - _DWM0W { w: self } + #[inline(always)] + pub fn dwm0(&mut self) -> DWM0_W { + DWM0_W { w: self } } #[doc = "Bits 8:11 - DAC0 noise wave bit width"] - #[inline] - pub fn dwbw0(&mut self) -> _DWBW0W { - _DWBW0W { w: self } + #[inline(always)] + pub fn dwbw0(&mut self) -> DWBW0_W { + DWBW0_W { w: self } } #[doc = "Bit 12 - DAC0 DMA enable"] - #[inline] - pub fn ddmaen0(&mut self) -> _DDMAEN0W { - _DDMAEN0W { w: self } + #[inline(always)] + pub fn ddmaen0(&mut self) -> DDMAEN0_W { + DDMAEN0_W { w: self } } #[doc = "Bit 16 - DAC1 enable"] - #[inline] - pub fn den1(&mut self) -> _DEN1W { - _DEN1W { w: self } + #[inline(always)] + pub fn den1(&mut self) -> DEN1_W { + DEN1_W { w: self } } #[doc = "Bit 17 - DAC1 output buffer turn off"] - #[inline] - pub fn dboff1(&mut self) -> _DBOFF1W { - _DBOFF1W { w: self } + #[inline(always)] + pub fn dboff1(&mut self) -> DBOFF1_W { + DBOFF1_W { w: self } } #[doc = "Bit 18 - DAC1 trigger enable"] - #[inline] - pub fn dten1(&mut self) -> _DTEN1W { - _DTEN1W { w: self } + #[inline(always)] + pub fn dten1(&mut self) -> DTEN1_W { + DTEN1_W { w: self } } #[doc = "Bits 19:21 - DAC1 trigger selection"] - #[inline] - pub fn dtsel1(&mut self) -> _DTSEL1W { - _DTSEL1W { w: self } + #[inline(always)] + pub fn dtsel1(&mut self) -> DTSEL1_W { + DTSEL1_W { w: self } } #[doc = "Bits 22:23 - DAC1 noise wave mode"] - #[inline] - pub fn dwm1(&mut self) -> _DWM1W { - _DWM1W { w: self } + #[inline(always)] + pub fn dwm1(&mut self) -> DWM1_W { + DWM1_W { w: self } } #[doc = "Bits 24:27 - DAC1 noise wave bit width"] - #[inline] - pub fn dwbw1(&mut self) -> _DWBW1W { - _DWBW1W { w: self } + #[inline(always)] + pub fn dwbw1(&mut self) -> DWBW1_W { + DWBW1_W { w: self } } #[doc = "Bit 28 - DAC1 DMA enable"] - #[inline] - pub fn ddmaen1(&mut self) -> _DDMAEN1W { - _DDMAEN1W { w: self } + #[inline(always)] + pub fn ddmaen1(&mut self) -> DDMAEN1_W { + DDMAEN1_W { w: self } } } diff --git a/src/dac/dac0_do.rs b/src/dac/dac0_do.rs index 9e67a7780cf7c6235754b9ab90fdbea17d191286..f91a4379b95bd845cb4e17240b4546a97685b764 100644 --- a/src/dac/dac0_do.rs +++ b/src/dac/dac0_do.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::DAC0_DO { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct DAC0_DOR { - bits: u16, -} -impl DAC0_DOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register DAC0_DO"] +pub type R = crate::R; +#[doc = "Reader of field `DAC0_DO`"] +pub type DAC0_DO_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - DAC0 data output"] - #[inline] - pub fn dac0_do(&self) -> DAC0_DOR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DAC0_DOR { bits } + #[inline(always)] + pub fn dac0_do(&self) -> DAC0_DO_R { + DAC0_DO_R::new((self.bits & 0x0fff) as u16) } } diff --git a/src/dac/dac0_l12dh.rs b/src/dac/dac0_l12dh.rs index e14f3f8c7fe2f6ce4e6e9f3273a6671546179b6a..7375b64fda2c91e59243669e82a35d0ae3217aca 100644 --- a/src/dac/dac0_l12dh.rs +++ b/src/dac/dac0_l12dh.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DAC0_L12DH { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DAC0_DHR { - bits: u16, -} -impl DAC0_DHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DAC0_DHW<'a> { +#[doc = "Reader of register DAC0_L12DH"] +pub type R = crate::R; +#[doc = "Writer for register DAC0_L12DH"] +pub type W = crate::W; +#[doc = "Register DAC0_L12DH `reset()`'s with value 0"] +impl crate::ResetValue for super::DAC0_L12DH { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DAC0_DH`"] +pub type DAC0_DH_R = crate::R; +#[doc = "Write proxy for field `DAC0_DH`"] +pub struct DAC0_DH_W<'a> { w: &'a mut W, } -impl<'a> _DAC0_DHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAC0_DH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0fff << 4)) | (((value as u32) & 0x0fff) << 4); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 4:15 - DAC0 12-bit left-aligned data"] - #[inline] - pub fn dac0_dh(&self) -> DAC0_DHR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DAC0_DHR { bits } + #[inline(always)] + pub fn dac0_dh(&self) -> DAC0_DH_R { + DAC0_DH_R::new(((self.bits >> 4) & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 4:15 - DAC0 12-bit left-aligned data"] - #[inline] - pub fn dac0_dh(&mut self) -> _DAC0_DHW { - _DAC0_DHW { w: self } + #[inline(always)] + pub fn dac0_dh(&mut self) -> DAC0_DH_W { + DAC0_DH_W { w: self } } } diff --git a/src/dac/dac0_r12dh.rs b/src/dac/dac0_r12dh.rs index 815b94064c3bf5bbbcfaa944fd91bb2000cd5221..3f415ad10993a05a74169774a3579e63fefdb2fd 100644 --- a/src/dac/dac0_r12dh.rs +++ b/src/dac/dac0_r12dh.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DAC0_R12DH { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DAC0_DHR { - bits: u16, -} -impl DAC0_DHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DAC0_DHW<'a> { +#[doc = "Reader of register DAC0_R12DH"] +pub type R = crate::R; +#[doc = "Writer for register DAC0_R12DH"] +pub type W = crate::W; +#[doc = "Register DAC0_R12DH `reset()`'s with value 0"] +impl crate::ResetValue for super::DAC0_R12DH { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DAC0_DH`"] +pub type DAC0_DH_R = crate::R; +#[doc = "Write proxy for field `DAC0_DH`"] +pub struct DAC0_DH_W<'a> { w: &'a mut W, } -impl<'a> _DAC0_DHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAC0_DH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - DAC0 12-bit right-aligned data"] - #[inline] - pub fn dac0_dh(&self) -> DAC0_DHR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DAC0_DHR { bits } + #[inline(always)] + pub fn dac0_dh(&self) -> DAC0_DH_R { + DAC0_DH_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - DAC0 12-bit right-aligned data"] - #[inline] - pub fn dac0_dh(&mut self) -> _DAC0_DHW { - _DAC0_DHW { w: self } + #[inline(always)] + pub fn dac0_dh(&mut self) -> DAC0_DH_W { + DAC0_DH_W { w: self } } } diff --git a/src/dac/dac0_r8dh.rs b/src/dac/dac0_r8dh.rs index 9ffaea543921fcfcb7fbd285cb6319845f633cdb..08c17dacb1e9599cb11518c9ce89a908cd6cce79 100644 --- a/src/dac/dac0_r8dh.rs +++ b/src/dac/dac0_r8dh.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DAC0_R8DH { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DAC0_DHR { - bits: u8, -} -impl DAC0_DHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DAC0_DHW<'a> { +#[doc = "Reader of register DAC0_R8DH"] +pub type R = crate::R; +#[doc = "Writer for register DAC0_R8DH"] +pub type W = crate::W; +#[doc = "Register DAC0_R8DH `reset()`'s with value 0"] +impl crate::ResetValue for super::DAC0_R8DH { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DAC0_DH`"] +pub type DAC0_DH_R = crate::R; +#[doc = "Write proxy for field `DAC0_DH`"] +pub struct DAC0_DH_W<'a> { w: &'a mut W, } -impl<'a> _DAC0_DHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAC0_DH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:7 - DAC0 8-bit right-aligned data"] - #[inline] - pub fn dac0_dh(&self) -> DAC0_DHR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DAC0_DHR { bits } + #[inline(always)] + pub fn dac0_dh(&self) -> DAC0_DH_R { + DAC0_DH_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:7 - DAC0 8-bit right-aligned data"] - #[inline] - pub fn dac0_dh(&mut self) -> _DAC0_DHW { - _DAC0_DHW { w: self } + #[inline(always)] + pub fn dac0_dh(&mut self) -> DAC0_DH_W { + DAC0_DH_W { w: self } } } diff --git a/src/dac/dac1_do.rs b/src/dac/dac1_do.rs index 5e2ca62d2f7bc362e4a1839ca6f45bd6970e38a9..5c6aef9108e36e1947f5a18e2e3ce93adff249fb 100644 --- a/src/dac/dac1_do.rs +++ b/src/dac/dac1_do.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::DAC1_DO { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct DAC1_DOR { - bits: u16, -} -impl DAC1_DOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register DAC1_DO"] +pub type R = crate::R; +#[doc = "Reader of field `DAC1_DO`"] +pub type DAC1_DO_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - DAC1 data output"] - #[inline] - pub fn dac1_do(&self) -> DAC1_DOR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DAC1_DOR { bits } + #[inline(always)] + pub fn dac1_do(&self) -> DAC1_DO_R { + DAC1_DO_R::new((self.bits & 0x0fff) as u16) } } diff --git a/src/dac/dac1_l12dh.rs b/src/dac/dac1_l12dh.rs index b3b6c8a08e1065e445f9f8a088d4e3343ec8657e..8a0ceacdec336103f251339fa520670a1a008cdb 100644 --- a/src/dac/dac1_l12dh.rs +++ b/src/dac/dac1_l12dh.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DAC1_L12DH { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DAC1_DHR { - bits: u16, -} -impl DAC1_DHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DAC1_DHW<'a> { +#[doc = "Reader of register DAC1_L12DH"] +pub type R = crate::R; +#[doc = "Writer for register DAC1_L12DH"] +pub type W = crate::W; +#[doc = "Register DAC1_L12DH `reset()`'s with value 0"] +impl crate::ResetValue for super::DAC1_L12DH { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DAC1_DH`"] +pub type DAC1_DH_R = crate::R; +#[doc = "Write proxy for field `DAC1_DH`"] +pub struct DAC1_DH_W<'a> { w: &'a mut W, } -impl<'a> _DAC1_DHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAC1_DH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0fff << 4)) | (((value as u32) & 0x0fff) << 4); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 4:15 - DAC1 12-bit left-aligned data"] - #[inline] - pub fn dac1_dh(&self) -> DAC1_DHR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DAC1_DHR { bits } + #[inline(always)] + pub fn dac1_dh(&self) -> DAC1_DH_R { + DAC1_DH_R::new(((self.bits >> 4) & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 4:15 - DAC1 12-bit left-aligned data"] - #[inline] - pub fn dac1_dh(&mut self) -> _DAC1_DHW { - _DAC1_DHW { w: self } + #[inline(always)] + pub fn dac1_dh(&mut self) -> DAC1_DH_W { + DAC1_DH_W { w: self } } } diff --git a/src/dac/dac1_r12dh.rs b/src/dac/dac1_r12dh.rs index 4a069450b5af2cd82110babcc70806ba4039192c..09abd760e339f0047f3ac917cd32b284b0577d42 100644 --- a/src/dac/dac1_r12dh.rs +++ b/src/dac/dac1_r12dh.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DAC1_R12DH { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DAC1_DHR { - bits: u16, -} -impl DAC1_DHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DAC1_DHW<'a> { +#[doc = "Reader of register DAC1_R12DH"] +pub type R = crate::R; +#[doc = "Writer for register DAC1_R12DH"] +pub type W = crate::W; +#[doc = "Register DAC1_R12DH `reset()`'s with value 0"] +impl crate::ResetValue for super::DAC1_R12DH { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DAC1_DH`"] +pub type DAC1_DH_R = crate::R; +#[doc = "Write proxy for field `DAC1_DH`"] +pub struct DAC1_DH_W<'a> { w: &'a mut W, } -impl<'a> _DAC1_DHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAC1_DH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - DAC1 12-bit right-aligned data"] - #[inline] - pub fn dac1_dh(&self) -> DAC1_DHR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DAC1_DHR { bits } + #[inline(always)] + pub fn dac1_dh(&self) -> DAC1_DH_R { + DAC1_DH_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - DAC1 12-bit right-aligned data"] - #[inline] - pub fn dac1_dh(&mut self) -> _DAC1_DHW { - _DAC1_DHW { w: self } + #[inline(always)] + pub fn dac1_dh(&mut self) -> DAC1_DH_W { + DAC1_DH_W { w: self } } } diff --git a/src/dac/dac1_r8dh.rs b/src/dac/dac1_r8dh.rs index fddb8ff8883cd4d3fd4ffb286cb54562d3cda868..9896c940b608bdf2107bfbf811d26eac09573705 100644 --- a/src/dac/dac1_r8dh.rs +++ b/src/dac/dac1_r8dh.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DAC1_R8DH { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DAC1_DHR { - bits: u8, -} -impl DAC1_DHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DAC1_DHW<'a> { +#[doc = "Reader of register DAC1_R8DH"] +pub type R = crate::R; +#[doc = "Writer for register DAC1_R8DH"] +pub type W = crate::W; +#[doc = "Register DAC1_R8DH `reset()`'s with value 0"] +impl crate::ResetValue for super::DAC1_R8DH { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DAC1_DH`"] +pub type DAC1_DH_R = crate::R; +#[doc = "Write proxy for field `DAC1_DH`"] +pub struct DAC1_DH_W<'a> { w: &'a mut W, } -impl<'a> _DAC1_DHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAC1_DH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:7 - DAC1 8-bit right-aligned data"] - #[inline] - pub fn dac1_dh(&self) -> DAC1_DHR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DAC1_DHR { bits } + #[inline(always)] + pub fn dac1_dh(&self) -> DAC1_DH_R { + DAC1_DH_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:7 - DAC1 8-bit right-aligned data"] - #[inline] - pub fn dac1_dh(&mut self) -> _DAC1_DHW { - _DAC1_DHW { w: self } + #[inline(always)] + pub fn dac1_dh(&mut self) -> DAC1_DH_W { + DAC1_DH_W { w: self } } } diff --git a/src/dac/dacc_l12dh.rs b/src/dac/dacc_l12dh.rs index 12b6b33db39c4fb9f0defc9f2da9f541d5e0b20f..924d734e5eb5eeac051aa0f79dcedf1c31eab495 100644 --- a/src/dac/dacc_l12dh.rs +++ b/src/dac/dacc_l12dh.rs @@ -1,146 +1,64 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DACC_L12DH { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DAC0_DHR { - bits: u16, -} -impl DAC0_DHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DAC1_DHR { - bits: u16, -} -impl DAC1_DHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits +#[doc = "Reader of register DACC_L12DH"] +pub type R = crate::R; +#[doc = "Writer for register DACC_L12DH"] +pub type W = crate::W; +#[doc = "Register DACC_L12DH `reset()`'s with value 0"] +impl crate::ResetValue for super::DACC_L12DH { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _DAC0_DHW<'a> { +#[doc = "Reader of field `DAC0_DH`"] +pub type DAC0_DH_R = crate::R; +#[doc = "Write proxy for field `DAC0_DH`"] +pub struct DAC0_DH_W<'a> { w: &'a mut W, } -impl<'a> _DAC0_DHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAC0_DH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0fff << 4)) | (((value as u32) & 0x0fff) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _DAC1_DHW<'a> { +#[doc = "Reader of field `DAC1_DH`"] +pub type DAC1_DH_R = crate::R; +#[doc = "Write proxy for field `DAC1_DH`"] +pub struct DAC1_DH_W<'a> { w: &'a mut W, } -impl<'a> _DAC1_DHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAC1_DH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0fff << 20)) | (((value as u32) & 0x0fff) << 20); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 4:15 - DAC0 12-bit left-aligned data"] - #[inline] - pub fn dac0_dh(&self) -> DAC0_DHR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DAC0_DHR { bits } + #[inline(always)] + pub fn dac0_dh(&self) -> DAC0_DH_R { + DAC0_DH_R::new(((self.bits >> 4) & 0x0fff) as u16) } #[doc = "Bits 20:31 - DAC1 12-bit left-aligned data"] - #[inline] - pub fn dac1_dh(&self) -> DAC1_DHR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DAC1_DHR { bits } + #[inline(always)] + pub fn dac1_dh(&self) -> DAC1_DH_R { + DAC1_DH_R::new(((self.bits >> 20) & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 4:15 - DAC0 12-bit left-aligned data"] - #[inline] - pub fn dac0_dh(&mut self) -> _DAC0_DHW { - _DAC0_DHW { w: self } + #[inline(always)] + pub fn dac0_dh(&mut self) -> DAC0_DH_W { + DAC0_DH_W { w: self } } #[doc = "Bits 20:31 - DAC1 12-bit left-aligned data"] - #[inline] - pub fn dac1_dh(&mut self) -> _DAC1_DHW { - _DAC1_DHW { w: self } + #[inline(always)] + pub fn dac1_dh(&mut self) -> DAC1_DH_W { + DAC1_DH_W { w: self } } } diff --git a/src/dac/dacc_r12dh.rs b/src/dac/dacc_r12dh.rs index f35c687caceb28ff6a6b42d850eacd550c0fca08..e0a17bbd8f7352e2b8fa9a223c380a9f1359b0cb 100644 --- a/src/dac/dacc_r12dh.rs +++ b/src/dac/dacc_r12dh.rs @@ -1,146 +1,64 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DACC_R12DH { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DAC0_DHR { - bits: u16, -} -impl DAC0_DHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DAC1_DHR { - bits: u16, -} -impl DAC1_DHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits +#[doc = "Reader of register DACC_R12DH"] +pub type R = crate::R; +#[doc = "Writer for register DACC_R12DH"] +pub type W = crate::W; +#[doc = "Register DACC_R12DH `reset()`'s with value 0"] +impl crate::ResetValue for super::DACC_R12DH { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _DAC0_DHW<'a> { +#[doc = "Reader of field `DAC0_DH`"] +pub type DAC0_DH_R = crate::R; +#[doc = "Write proxy for field `DAC0_DH`"] +pub struct DAC0_DH_W<'a> { w: &'a mut W, } -impl<'a> _DAC0_DHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAC0_DH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } -#[doc = r" Proxy"] -pub struct _DAC1_DHW<'a> { +#[doc = "Reader of field `DAC1_DH`"] +pub type DAC1_DH_R = crate::R; +#[doc = "Write proxy for field `DAC1_DH`"] +pub struct DAC1_DH_W<'a> { w: &'a mut W, } -impl<'a> _DAC1_DHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAC1_DH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0fff << 16)) | (((value as u32) & 0x0fff) << 16); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - DAC0 12-bit right-aligned data"] - #[inline] - pub fn dac0_dh(&self) -> DAC0_DHR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DAC0_DHR { bits } + #[inline(always)] + pub fn dac0_dh(&self) -> DAC0_DH_R { + DAC0_DH_R::new((self.bits & 0x0fff) as u16) } #[doc = "Bits 16:27 - DAC1 12-bit right-aligned data"] - #[inline] - pub fn dac1_dh(&self) -> DAC1_DHR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DAC1_DHR { bits } + #[inline(always)] + pub fn dac1_dh(&self) -> DAC1_DH_R { + DAC1_DH_R::new(((self.bits >> 16) & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - DAC0 12-bit right-aligned data"] - #[inline] - pub fn dac0_dh(&mut self) -> _DAC0_DHW { - _DAC0_DHW { w: self } + #[inline(always)] + pub fn dac0_dh(&mut self) -> DAC0_DH_W { + DAC0_DH_W { w: self } } #[doc = "Bits 16:27 - DAC1 12-bit right-aligned data"] - #[inline] - pub fn dac1_dh(&mut self) -> _DAC1_DHW { - _DAC1_DHW { w: self } + #[inline(always)] + pub fn dac1_dh(&mut self) -> DAC1_DH_W { + DAC1_DH_W { w: self } } } diff --git a/src/dac/dacc_r8dh.rs b/src/dac/dacc_r8dh.rs index e27f8fcd80cb668f4d044ad4bf9f2440b628e0e9..b7d7383f6100f2b4f1f4d6844053ea7b971f480c 100644 --- a/src/dac/dacc_r8dh.rs +++ b/src/dac/dacc_r8dh.rs @@ -1,146 +1,64 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DACC_R8DH { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DAC0_DHR { - bits: u8, -} -impl DAC0_DHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DAC1_DHR { - bits: u8, -} -impl DAC1_DHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits +#[doc = "Reader of register DACC_R8DH"] +pub type R = crate::R; +#[doc = "Writer for register DACC_R8DH"] +pub type W = crate::W; +#[doc = "Register DACC_R8DH `reset()`'s with value 0"] +impl crate::ResetValue for super::DACC_R8DH { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _DAC0_DHW<'a> { +#[doc = "Reader of field `DAC0_DH`"] +pub type DAC0_DH_R = crate::R; +#[doc = "Write proxy for field `DAC0_DH`"] +pub struct DAC0_DH_W<'a> { w: &'a mut W, } -impl<'a> _DAC0_DHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAC0_DH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff); self.w } } -#[doc = r" Proxy"] -pub struct _DAC1_DHW<'a> { +#[doc = "Reader of field `DAC1_DH`"] +pub type DAC1_DH_R = crate::R; +#[doc = "Write proxy for field `DAC1_DH`"] +pub struct DAC1_DH_W<'a> { w: &'a mut W, } -impl<'a> _DAC1_DHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAC1_DH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:7 - DAC0 8-bit right-aligned data"] - #[inline] - pub fn dac0_dh(&self) -> DAC0_DHR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DAC0_DHR { bits } + #[inline(always)] + pub fn dac0_dh(&self) -> DAC0_DH_R { + DAC0_DH_R::new((self.bits & 0xff) as u8) } #[doc = "Bits 8:15 - DAC1 8-bit right-aligned data"] - #[inline] - pub fn dac1_dh(&self) -> DAC1_DHR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DAC1_DHR { bits } + #[inline(always)] + pub fn dac1_dh(&self) -> DAC1_DH_R { + DAC1_DH_R::new(((self.bits >> 8) & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:7 - DAC0 8-bit right-aligned data"] - #[inline] - pub fn dac0_dh(&mut self) -> _DAC0_DHW { - _DAC0_DHW { w: self } + #[inline(always)] + pub fn dac0_dh(&mut self) -> DAC0_DH_W { + DAC0_DH_W { w: self } } #[doc = "Bits 8:15 - DAC1 8-bit right-aligned data"] - #[inline] - pub fn dac1_dh(&mut self) -> _DAC1_DHW { - _DAC1_DHW { w: self } + #[inline(always)] + pub fn dac1_dh(&mut self) -> DAC1_DH_W { + DAC1_DH_W { w: self } } } diff --git a/src/dac/swt.rs b/src/dac/swt.rs index 51efd9257aa32f00baf0d0e1fe47283dec83e4bf..901ba5cdad34e87b5c2f5e3886a62df68898279b 100644 --- a/src/dac/swt.rs +++ b/src/dac/swt.rs @@ -1,85 +1,66 @@ -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::SWT { - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); +#[doc = "Writer for register SWT"] +pub type W = crate::W; +#[doc = "Register SWT `reset()`'s with value 0"] +impl crate::ResetValue for super::SWT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _SWTR0W<'a> { +#[doc = "Write proxy for field `SWTR0`"] +pub struct SWTR0_W<'a> { w: &'a mut W, } -impl<'a> _SWTR0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWTR0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _SWTR1W<'a> { +#[doc = "Write proxy for field `SWTR1`"] +pub struct SWTR1_W<'a> { w: &'a mut W, } -impl<'a> _SWTR1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWTR1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - DAC0 software trigger"] - #[inline] - pub fn swtr0(&mut self) -> _SWTR0W { - _SWTR0W { w: self } + #[inline(always)] + pub fn swtr0(&mut self) -> SWTR0_W { + SWTR0_W { w: self } } #[doc = "Bit 1 - DAC1 software trigger"] - #[inline] - pub fn swtr1(&mut self) -> _SWTR1W { - _SWTR1W { w: self } + #[inline(always)] + pub fn swtr1(&mut self) -> SWTR1_W { + SWTR1_W { w: self } } } diff --git a/src/dbg.rs b/src/dbg.rs index 5cee12455fee07e9d034968203f49b50d3375b03..ddb250341cdf17e63a5a454d6095295e09a26cb1 100644 --- a/src/dbg.rs +++ b/src/dbg.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - ID code register"] @@ -6,15 +6,23 @@ pub struct RegisterBlock { #[doc = "0x04 - Control register 0"] pub ctl: CTL, } -#[doc = "ID code register"] -pub struct ID { - register: ::vcell::VolatileCell, -} +#[doc = "ID code register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [id](id) module"] +pub type ID = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _ID; +#[doc = "`read()` method returns [id::R](id::R) reader structure"] +impl crate::Readable for ID {} #[doc = "ID code register"] pub mod id; -#[doc = "Control register 0"] -pub struct CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Control register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl](ctl) module"] +pub type CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL; +#[doc = "`read()` method returns [ctl::R](ctl::R) reader structure"] +impl crate::Readable for CTL {} +#[doc = "`write(|w| ..)` method takes [ctl::W](ctl::W) writer structure"] +impl crate::Writable for CTL {} #[doc = "Control register 0"] pub mod ctl; diff --git a/src/dbg/ctl.rs b/src/dbg/ctl.rs index e75c8601206c987968da01c2ea97b7307a9d67e5..214b2dd6c030a78a754cdd28cb5c9b2f294a10b5 100644 --- a/src/dbg/ctl.rs +++ b/src/dbg/ctl.rs @@ -1,1008 +1,560 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SLP_HOLDR { - bits: bool, -} -impl SLP_HOLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DSLP_HOLDR { - bits: bool, -} -impl DSLP_HOLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STB_HOLDR { - bits: bool, -} -impl STB_HOLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FWDGT_HOLDR { - bits: bool, -} -impl FWDGT_HOLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WWDGT_HOLDR { - bits: bool, -} -impl WWDGT_HOLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER0_HOLDR { - bits: bool, -} -impl TIMER0_HOLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER1_HOLDR { - bits: bool, -} -impl TIMER1_HOLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER2_HOLDR { - bits: bool, -} -impl TIMER2_HOLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER3_HOLDR { - bits: bool, -} -impl TIMER3_HOLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CAN0_HOLDR { - bits: bool, -} -impl CAN0_HOLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct I2C0_HOLDR { - bits: bool, -} -impl I2C0_HOLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct I2C1_HOLDR { - bits: bool, -} -impl I2C1_HOLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER4_HOLDR { - bits: bool, -} -impl TIMER4_HOLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER5_HOLDR { - bits: bool, -} -impl TIMER5_HOLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER6_HOLDR { - bits: bool, -} -impl TIMER6_HOLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CAN1_HOLDR { - bits: bool, -} -impl CAN1_HOLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _SLP_HOLDW<'a> { +#[doc = "Reader of register CTL"] +pub type R = crate::R; +#[doc = "Writer for register CTL"] +pub type W = crate::W; +#[doc = "Register CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `SLP_HOLD`"] +pub type SLP_HOLD_R = crate::R; +#[doc = "Write proxy for field `SLP_HOLD`"] +pub struct SLP_HOLD_W<'a> { w: &'a mut W, } -impl<'a> _SLP_HOLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SLP_HOLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _DSLP_HOLDW<'a> { +#[doc = "Reader of field `DSLP_HOLD`"] +pub type DSLP_HOLD_R = crate::R; +#[doc = "Write proxy for field `DSLP_HOLD`"] +pub struct DSLP_HOLD_W<'a> { w: &'a mut W, } -impl<'a> _DSLP_HOLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DSLP_HOLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STB_HOLDW<'a> { +#[doc = "Reader of field `STB_HOLD`"] +pub type STB_HOLD_R = crate::R; +#[doc = "Write proxy for field `STB_HOLD`"] +pub struct STB_HOLD_W<'a> { w: &'a mut W, } -impl<'a> _STB_HOLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STB_HOLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FWDGT_HOLDW<'a> { +#[doc = "Reader of field `FWDGT_HOLD`"] +pub type FWDGT_HOLD_R = crate::R; +#[doc = "Write proxy for field `FWDGT_HOLD`"] +pub struct FWDGT_HOLD_W<'a> { w: &'a mut W, } -impl<'a> _FWDGT_HOLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FWDGT_HOLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _WWDGT_HOLDW<'a> { +#[doc = "Reader of field `WWDGT_HOLD`"] +pub type WWDGT_HOLD_R = crate::R; +#[doc = "Write proxy for field `WWDGT_HOLD`"] +pub struct WWDGT_HOLD_W<'a> { w: &'a mut W, } -impl<'a> _WWDGT_HOLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WWDGT_HOLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER0_HOLDW<'a> { +#[doc = "Reader of field `TIMER0_HOLD`"] +pub type TIMER0_HOLD_R = crate::R; +#[doc = "Write proxy for field `TIMER0_HOLD`"] +pub struct TIMER0_HOLD_W<'a> { w: &'a mut W, } -impl<'a> _TIMER0_HOLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER0_HOLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER1_HOLDW<'a> { +#[doc = "Reader of field `TIMER1_HOLD`"] +pub type TIMER1_HOLD_R = crate::R; +#[doc = "Write proxy for field `TIMER1_HOLD`"] +pub struct TIMER1_HOLD_W<'a> { w: &'a mut W, } -impl<'a> _TIMER1_HOLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER1_HOLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER2_HOLDW<'a> { +#[doc = "Reader of field `TIMER2_HOLD`"] +pub type TIMER2_HOLD_R = crate::R; +#[doc = "Write proxy for field `TIMER2_HOLD`"] +pub struct TIMER2_HOLD_W<'a> { w: &'a mut W, } -impl<'a> _TIMER2_HOLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER2_HOLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER3_HOLDW<'a> { +#[doc = "Reader of field `TIMER3_HOLD`"] +pub type TIMER3_HOLD_R = crate::R; +#[doc = "Write proxy for field `TIMER3_HOLD`"] +pub struct TIMER3_HOLD_W<'a> { w: &'a mut W, } -impl<'a> _TIMER3_HOLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER3_HOLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _CAN0_HOLDW<'a> { +#[doc = "Reader of field `CAN0_HOLD`"] +pub type CAN0_HOLD_R = crate::R; +#[doc = "Write proxy for field `CAN0_HOLD`"] +pub struct CAN0_HOLD_W<'a> { w: &'a mut W, } -impl<'a> _CAN0_HOLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CAN0_HOLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _I2C0_HOLDW<'a> { +#[doc = "Reader of field `I2C0_HOLD`"] +pub type I2C0_HOLD_R = crate::R; +#[doc = "Write proxy for field `I2C0_HOLD`"] +pub struct I2C0_HOLD_W<'a> { w: &'a mut W, } -impl<'a> _I2C0_HOLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> I2C0_HOLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _I2C1_HOLDW<'a> { +#[doc = "Reader of field `I2C1_HOLD`"] +pub type I2C1_HOLD_R = crate::R; +#[doc = "Write proxy for field `I2C1_HOLD`"] +pub struct I2C1_HOLD_W<'a> { w: &'a mut W, } -impl<'a> _I2C1_HOLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> I2C1_HOLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER4_HOLDW<'a> { +#[doc = "Reader of field `TIMER4_HOLD`"] +pub type TIMER4_HOLD_R = crate::R; +#[doc = "Write proxy for field `TIMER4_HOLD`"] +pub struct TIMER4_HOLD_W<'a> { w: &'a mut W, } -impl<'a> _TIMER4_HOLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER4_HOLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER5_HOLDW<'a> { +#[doc = "Reader of field `TIMER5_HOLD`"] +pub type TIMER5_HOLD_R = crate::R; +#[doc = "Write proxy for field `TIMER5_HOLD`"] +pub struct TIMER5_HOLD_W<'a> { w: &'a mut W, } -impl<'a> _TIMER5_HOLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER5_HOLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER6_HOLDW<'a> { +#[doc = "Reader of field `TIMER6_HOLD`"] +pub type TIMER6_HOLD_R = crate::R; +#[doc = "Write proxy for field `TIMER6_HOLD`"] +pub struct TIMER6_HOLD_W<'a> { w: &'a mut W, } -impl<'a> _TIMER6_HOLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER6_HOLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _CAN1_HOLDW<'a> { +#[doc = "Reader of field `CAN1_HOLD`"] +pub type CAN1_HOLD_R = crate::R; +#[doc = "Write proxy for field `CAN1_HOLD`"] +pub struct CAN1_HOLD_W<'a> { w: &'a mut W, } -impl<'a> _CAN1_HOLDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CAN1_HOLD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Sleep mode hold register"] - #[inline] - pub fn slp_hold(&self) -> SLP_HOLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SLP_HOLDR { bits } + #[inline(always)] + pub fn slp_hold(&self) -> SLP_HOLD_R { + SLP_HOLD_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Deep-sleep mode hold register"] - #[inline] - pub fn dslp_hold(&self) -> DSLP_HOLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DSLP_HOLDR { bits } + #[inline(always)] + pub fn dslp_hold(&self) -> DSLP_HOLD_R { + DSLP_HOLD_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Standby mode hold register"] - #[inline] - pub fn stb_hold(&self) -> STB_HOLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STB_HOLDR { bits } + #[inline(always)] + pub fn stb_hold(&self) -> STB_HOLD_R { + STB_HOLD_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 8 - FWDGT hold bit"] - #[inline] - pub fn fwdgt_hold(&self) -> FWDGT_HOLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FWDGT_HOLDR { bits } + #[inline(always)] + pub fn fwdgt_hold(&self) -> FWDGT_HOLD_R { + FWDGT_HOLD_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - WWDGT hold bit"] - #[inline] - pub fn wwdgt_hold(&self) -> WWDGT_HOLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WWDGT_HOLDR { bits } + #[inline(always)] + pub fn wwdgt_hold(&self) -> WWDGT_HOLD_R { + WWDGT_HOLD_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - TIMER 0 hold bit"] - #[inline] - pub fn timer0_hold(&self) -> TIMER0_HOLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER0_HOLDR { bits } + #[inline(always)] + pub fn timer0_hold(&self) -> TIMER0_HOLD_R { + TIMER0_HOLD_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - TIMER 1 hold bit"] - #[inline] - pub fn timer1_hold(&self) -> TIMER1_HOLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER1_HOLDR { bits } + #[inline(always)] + pub fn timer1_hold(&self) -> TIMER1_HOLD_R { + TIMER1_HOLD_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - TIMER 2 hold bit"] - #[inline] - pub fn timer2_hold(&self) -> TIMER2_HOLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER2_HOLDR { bits } + #[inline(always)] + pub fn timer2_hold(&self) -> TIMER2_HOLD_R { + TIMER2_HOLD_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - TIMER 23 hold bit"] - #[inline] - pub fn timer3_hold(&self) -> TIMER3_HOLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER3_HOLDR { bits } + #[inline(always)] + pub fn timer3_hold(&self) -> TIMER3_HOLD_R { + TIMER3_HOLD_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - CAN0 hold bit"] - #[inline] - pub fn can0_hold(&self) -> CAN0_HOLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CAN0_HOLDR { bits } + #[inline(always)] + pub fn can0_hold(&self) -> CAN0_HOLD_R { + CAN0_HOLD_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - I2C0 hold bit"] - #[inline] - pub fn i2c0_hold(&self) -> I2C0_HOLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - I2C0_HOLDR { bits } + #[inline(always)] + pub fn i2c0_hold(&self) -> I2C0_HOLD_R { + I2C0_HOLD_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - I2C1 hold bit"] - #[inline] - pub fn i2c1_hold(&self) -> I2C1_HOLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - I2C1_HOLDR { bits } + #[inline(always)] + pub fn i2c1_hold(&self) -> I2C1_HOLD_R { + I2C1_HOLD_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 18 - TIMER4_HOLD"] - #[inline] - pub fn timer4_hold(&self) -> TIMER4_HOLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER4_HOLDR { bits } + #[inline(always)] + pub fn timer4_hold(&self) -> TIMER4_HOLD_R { + TIMER4_HOLD_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - TIMER 5 hold bit"] - #[inline] - pub fn timer5_hold(&self) -> TIMER5_HOLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER5_HOLDR { bits } + #[inline(always)] + pub fn timer5_hold(&self) -> TIMER5_HOLD_R { + TIMER5_HOLD_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - TIMER 6 hold bit"] - #[inline] - pub fn timer6_hold(&self) -> TIMER6_HOLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER6_HOLDR { bits } + #[inline(always)] + pub fn timer6_hold(&self) -> TIMER6_HOLD_R { + TIMER6_HOLD_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - CAN1 hold bit"] - #[inline] - pub fn can1_hold(&self) -> CAN1_HOLDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CAN1_HOLDR { bits } + #[inline(always)] + pub fn can1_hold(&self) -> CAN1_HOLD_R { + CAN1_HOLD_R::new(((self.bits >> 21) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Sleep mode hold register"] - #[inline] - pub fn slp_hold(&mut self) -> _SLP_HOLDW { - _SLP_HOLDW { w: self } + #[inline(always)] + pub fn slp_hold(&mut self) -> SLP_HOLD_W { + SLP_HOLD_W { w: self } } #[doc = "Bit 1 - Deep-sleep mode hold register"] - #[inline] - pub fn dslp_hold(&mut self) -> _DSLP_HOLDW { - _DSLP_HOLDW { w: self } + #[inline(always)] + pub fn dslp_hold(&mut self) -> DSLP_HOLD_W { + DSLP_HOLD_W { w: self } } #[doc = "Bit 2 - Standby mode hold register"] - #[inline] - pub fn stb_hold(&mut self) -> _STB_HOLDW { - _STB_HOLDW { w: self } + #[inline(always)] + pub fn stb_hold(&mut self) -> STB_HOLD_W { + STB_HOLD_W { w: self } } #[doc = "Bit 8 - FWDGT hold bit"] - #[inline] - pub fn fwdgt_hold(&mut self) -> _FWDGT_HOLDW { - _FWDGT_HOLDW { w: self } + #[inline(always)] + pub fn fwdgt_hold(&mut self) -> FWDGT_HOLD_W { + FWDGT_HOLD_W { w: self } } #[doc = "Bit 9 - WWDGT hold bit"] - #[inline] - pub fn wwdgt_hold(&mut self) -> _WWDGT_HOLDW { - _WWDGT_HOLDW { w: self } + #[inline(always)] + pub fn wwdgt_hold(&mut self) -> WWDGT_HOLD_W { + WWDGT_HOLD_W { w: self } } #[doc = "Bit 10 - TIMER 0 hold bit"] - #[inline] - pub fn timer0_hold(&mut self) -> _TIMER0_HOLDW { - _TIMER0_HOLDW { w: self } + #[inline(always)] + pub fn timer0_hold(&mut self) -> TIMER0_HOLD_W { + TIMER0_HOLD_W { w: self } } #[doc = "Bit 11 - TIMER 1 hold bit"] - #[inline] - pub fn timer1_hold(&mut self) -> _TIMER1_HOLDW { - _TIMER1_HOLDW { w: self } + #[inline(always)] + pub fn timer1_hold(&mut self) -> TIMER1_HOLD_W { + TIMER1_HOLD_W { w: self } } #[doc = "Bit 12 - TIMER 2 hold bit"] - #[inline] - pub fn timer2_hold(&mut self) -> _TIMER2_HOLDW { - _TIMER2_HOLDW { w: self } + #[inline(always)] + pub fn timer2_hold(&mut self) -> TIMER2_HOLD_W { + TIMER2_HOLD_W { w: self } } #[doc = "Bit 13 - TIMER 23 hold bit"] - #[inline] - pub fn timer3_hold(&mut self) -> _TIMER3_HOLDW { - _TIMER3_HOLDW { w: self } + #[inline(always)] + pub fn timer3_hold(&mut self) -> TIMER3_HOLD_W { + TIMER3_HOLD_W { w: self } } #[doc = "Bit 14 - CAN0 hold bit"] - #[inline] - pub fn can0_hold(&mut self) -> _CAN0_HOLDW { - _CAN0_HOLDW { w: self } + #[inline(always)] + pub fn can0_hold(&mut self) -> CAN0_HOLD_W { + CAN0_HOLD_W { w: self } } #[doc = "Bit 15 - I2C0 hold bit"] - #[inline] - pub fn i2c0_hold(&mut self) -> _I2C0_HOLDW { - _I2C0_HOLDW { w: self } + #[inline(always)] + pub fn i2c0_hold(&mut self) -> I2C0_HOLD_W { + I2C0_HOLD_W { w: self } } #[doc = "Bit 16 - I2C1 hold bit"] - #[inline] - pub fn i2c1_hold(&mut self) -> _I2C1_HOLDW { - _I2C1_HOLDW { w: self } + #[inline(always)] + pub fn i2c1_hold(&mut self) -> I2C1_HOLD_W { + I2C1_HOLD_W { w: self } } #[doc = "Bit 18 - TIMER4_HOLD"] - #[inline] - pub fn timer4_hold(&mut self) -> _TIMER4_HOLDW { - _TIMER4_HOLDW { w: self } + #[inline(always)] + pub fn timer4_hold(&mut self) -> TIMER4_HOLD_W { + TIMER4_HOLD_W { w: self } } #[doc = "Bit 19 - TIMER 5 hold bit"] - #[inline] - pub fn timer5_hold(&mut self) -> _TIMER5_HOLDW { - _TIMER5_HOLDW { w: self } + #[inline(always)] + pub fn timer5_hold(&mut self) -> TIMER5_HOLD_W { + TIMER5_HOLD_W { w: self } } #[doc = "Bit 20 - TIMER 6 hold bit"] - #[inline] - pub fn timer6_hold(&mut self) -> _TIMER6_HOLDW { - _TIMER6_HOLDW { w: self } + #[inline(always)] + pub fn timer6_hold(&mut self) -> TIMER6_HOLD_W { + TIMER6_HOLD_W { w: self } } #[doc = "Bit 21 - CAN1 hold bit"] - #[inline] - pub fn can1_hold(&mut self) -> _CAN1_HOLDW { - _CAN1_HOLDW { w: self } + #[inline(always)] + pub fn can1_hold(&mut self) -> CAN1_HOLD_W { + CAN1_HOLD_W { w: self } } } diff --git a/src/dbg/id.rs b/src/dbg/id.rs index e36d4ad038b8076b669d060f3089d11b9bdc3b58..2999a0c7e657092e443f62c91341c568bdbae823 100644 --- a/src/dbg/id.rs +++ b/src/dbg/id.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::ID { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct ID_CODER { - bits: u32, -} -impl ID_CODER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} +#[doc = "Reader of register ID"] +pub type R = crate::R; +#[doc = "Reader of field `ID_CODE`"] +pub type ID_CODE_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - DBG ID code register"] - #[inline] - pub fn id_code(&self) -> ID_CODER { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - ID_CODER { bits } + #[inline(always)] + pub fn id_code(&self) -> ID_CODE_R { + ID_CODE_R::new((self.bits & 0xffff_ffff) as u32) } } diff --git a/src/dma0.rs b/src/dma0.rs index 2f9a97d9c18982b34280517e64d3ca09f13689bd..41594b3ed5f83ec82848543218f07d471883b2e2 100644 --- a/src/dma0.rs +++ b/src/dma0.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Interrupt flag register"] @@ -13,7 +13,7 @@ pub struct RegisterBlock { pub ch0paddr: CH0PADDR, #[doc = "0x14 - Channel 0 memory base address register"] pub ch0maddr: CH0MADDR, - _reserved0: [u8; 4usize], + _reserved6: [u8; 4usize], #[doc = "0x1c - Channel 1 control register"] pub ch1ctl: CH1CTL, #[doc = "0x20 - Channel 1 counter register"] @@ -22,7 +22,7 @@ pub struct RegisterBlock { pub ch1paddr: CH1PADDR, #[doc = "0x28 - Channel 1 memory base address register"] pub ch1maddr: CH1MADDR, - _reserved1: [u8; 4usize], + _reserved10: [u8; 4usize], #[doc = "0x30 - Channel 2 control register"] pub ch2ctl: CH2CTL, #[doc = "0x34 - Channel 2 counter register"] @@ -31,7 +31,7 @@ pub struct RegisterBlock { pub ch2paddr: CH2PADDR, #[doc = "0x3c - Channel 2 memory base address register"] pub ch2maddr: CH2MADDR, - _reserved2: [u8; 4usize], + _reserved14: [u8; 4usize], #[doc = "0x44 - Channel 3 control register"] pub ch3ctl: CH3CTL, #[doc = "0x48 - Channel 3 counter register"] @@ -40,7 +40,7 @@ pub struct RegisterBlock { pub ch3paddr: CH3PADDR, #[doc = "0x50 - Channel 3 memory base address register"] pub ch3maddr: CH3MADDR, - _reserved3: [u8; 4usize], + _reserved18: [u8; 4usize], #[doc = "0x58 - Channel 4 control register"] pub ch4ctl: CH4CTL, #[doc = "0x5c - Channel 4 counter register"] @@ -49,7 +49,7 @@ pub struct RegisterBlock { pub ch4paddr: CH4PADDR, #[doc = "0x64 - Channel 4 memory base address register"] pub ch4maddr: CH4MADDR, - _reserved4: [u8; 4usize], + _reserved22: [u8; 4usize], #[doc = "0x6c - Channel 5 control register"] pub ch5ctl: CH5CTL, #[doc = "0x70 - Channel 5 counter register"] @@ -58,7 +58,7 @@ pub struct RegisterBlock { pub ch5paddr: CH5PADDR, #[doc = "0x78 - Channel 5 memory base address register"] pub ch5maddr: CH5MADDR, - _reserved5: [u8; 4usize], + _reserved26: [u8; 4usize], #[doc = "0x80 - Channel 6 control register"] pub ch6ctl: CH6CTL, #[doc = "0x84 - Channel 6 counter register"] @@ -68,183 +68,329 @@ pub struct RegisterBlock { #[doc = "0x8c - Channel 6 memory base address register"] pub ch6maddr: CH6MADDR, } -#[doc = "Interrupt flag register"] -pub struct INTF { - register: ::vcell::VolatileCell, -} +#[doc = "Interrupt flag register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [intf](intf) module"] +pub type INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _INTF; +#[doc = "`read()` method returns [intf::R](intf::R) reader structure"] +impl crate::Readable for INTF {} #[doc = "Interrupt flag register"] pub mod intf; -#[doc = "Interrupt flag clear register"] -pub struct INTC { - register: ::vcell::VolatileCell, -} +#[doc = "Interrupt flag clear register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [intc](intc) module"] +pub type INTC = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _INTC; +#[doc = "`write(|w| ..)` method takes [intc::W](intc::W) writer structure"] +impl crate::Writable for INTC {} #[doc = "Interrupt flag clear register"] pub mod intc; -#[doc = "Channel 0 control register"] -pub struct CH0CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 0 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch0ctl](ch0ctl) module"] +pub type CH0CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH0CTL; +#[doc = "`read()` method returns [ch0ctl::R](ch0ctl::R) reader structure"] +impl crate::Readable for CH0CTL {} +#[doc = "`write(|w| ..)` method takes [ch0ctl::W](ch0ctl::W) writer structure"] +impl crate::Writable for CH0CTL {} #[doc = "Channel 0 control register"] pub mod ch0ctl; -#[doc = "Channel 0 counter register"] -pub struct CH0CNT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 0 counter register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch0cnt](ch0cnt) module"] +pub type CH0CNT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH0CNT; +#[doc = "`read()` method returns [ch0cnt::R](ch0cnt::R) reader structure"] +impl crate::Readable for CH0CNT {} +#[doc = "`write(|w| ..)` method takes [ch0cnt::W](ch0cnt::W) writer structure"] +impl crate::Writable for CH0CNT {} #[doc = "Channel 0 counter register"] pub mod ch0cnt; -#[doc = "Channel 0 peripheral base address register"] -pub struct CH0PADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 0 peripheral base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch0paddr](ch0paddr) module"] +pub type CH0PADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH0PADDR; +#[doc = "`read()` method returns [ch0paddr::R](ch0paddr::R) reader structure"] +impl crate::Readable for CH0PADDR {} +#[doc = "`write(|w| ..)` method takes [ch0paddr::W](ch0paddr::W) writer structure"] +impl crate::Writable for CH0PADDR {} #[doc = "Channel 0 peripheral base address register"] pub mod ch0paddr; -#[doc = "Channel 0 memory base address register"] -pub struct CH0MADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 0 memory base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch0maddr](ch0maddr) module"] +pub type CH0MADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH0MADDR; +#[doc = "`read()` method returns [ch0maddr::R](ch0maddr::R) reader structure"] +impl crate::Readable for CH0MADDR {} +#[doc = "`write(|w| ..)` method takes [ch0maddr::W](ch0maddr::W) writer structure"] +impl crate::Writable for CH0MADDR {} #[doc = "Channel 0 memory base address register"] pub mod ch0maddr; -#[doc = "Channel 1 control register"] -pub struct CH1CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 1 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch1ctl](ch1ctl) module"] +pub type CH1CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH1CTL; +#[doc = "`read()` method returns [ch1ctl::R](ch1ctl::R) reader structure"] +impl crate::Readable for CH1CTL {} +#[doc = "`write(|w| ..)` method takes [ch1ctl::W](ch1ctl::W) writer structure"] +impl crate::Writable for CH1CTL {} #[doc = "Channel 1 control register"] pub mod ch1ctl; -#[doc = "Channel 1 counter register"] -pub struct CH1CNT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 1 counter register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch1cnt](ch1cnt) module"] +pub type CH1CNT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH1CNT; +#[doc = "`read()` method returns [ch1cnt::R](ch1cnt::R) reader structure"] +impl crate::Readable for CH1CNT {} +#[doc = "`write(|w| ..)` method takes [ch1cnt::W](ch1cnt::W) writer structure"] +impl crate::Writable for CH1CNT {} #[doc = "Channel 1 counter register"] pub mod ch1cnt; -#[doc = "Channel 1 peripheral base address register"] -pub struct CH1PADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 1 peripheral base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch1paddr](ch1paddr) module"] +pub type CH1PADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH1PADDR; +#[doc = "`read()` method returns [ch1paddr::R](ch1paddr::R) reader structure"] +impl crate::Readable for CH1PADDR {} +#[doc = "`write(|w| ..)` method takes [ch1paddr::W](ch1paddr::W) writer structure"] +impl crate::Writable for CH1PADDR {} #[doc = "Channel 1 peripheral base address register"] pub mod ch1paddr; -#[doc = "Channel 1 memory base address register"] -pub struct CH1MADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 1 memory base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch1maddr](ch1maddr) module"] +pub type CH1MADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH1MADDR; +#[doc = "`read()` method returns [ch1maddr::R](ch1maddr::R) reader structure"] +impl crate::Readable for CH1MADDR {} +#[doc = "`write(|w| ..)` method takes [ch1maddr::W](ch1maddr::W) writer structure"] +impl crate::Writable for CH1MADDR {} #[doc = "Channel 1 memory base address register"] pub mod ch1maddr; -#[doc = "Channel 2 control register"] -pub struct CH2CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 2 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch2ctl](ch2ctl) module"] +pub type CH2CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH2CTL; +#[doc = "`read()` method returns [ch2ctl::R](ch2ctl::R) reader structure"] +impl crate::Readable for CH2CTL {} +#[doc = "`write(|w| ..)` method takes [ch2ctl::W](ch2ctl::W) writer structure"] +impl crate::Writable for CH2CTL {} #[doc = "Channel 2 control register"] pub mod ch2ctl; -#[doc = "Channel 2 counter register"] -pub struct CH2CNT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 2 counter register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch2cnt](ch2cnt) module"] +pub type CH2CNT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH2CNT; +#[doc = "`read()` method returns [ch2cnt::R](ch2cnt::R) reader structure"] +impl crate::Readable for CH2CNT {} +#[doc = "`write(|w| ..)` method takes [ch2cnt::W](ch2cnt::W) writer structure"] +impl crate::Writable for CH2CNT {} #[doc = "Channel 2 counter register"] pub mod ch2cnt; -#[doc = "Channel 2 peripheral base address register"] -pub struct CH2PADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 2 peripheral base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch2paddr](ch2paddr) module"] +pub type CH2PADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH2PADDR; +#[doc = "`read()` method returns [ch2paddr::R](ch2paddr::R) reader structure"] +impl crate::Readable for CH2PADDR {} +#[doc = "`write(|w| ..)` method takes [ch2paddr::W](ch2paddr::W) writer structure"] +impl crate::Writable for CH2PADDR {} #[doc = "Channel 2 peripheral base address register"] pub mod ch2paddr; -#[doc = "Channel 2 memory base address register"] -pub struct CH2MADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 2 memory base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch2maddr](ch2maddr) module"] +pub type CH2MADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH2MADDR; +#[doc = "`read()` method returns [ch2maddr::R](ch2maddr::R) reader structure"] +impl crate::Readable for CH2MADDR {} +#[doc = "`write(|w| ..)` method takes [ch2maddr::W](ch2maddr::W) writer structure"] +impl crate::Writable for CH2MADDR {} #[doc = "Channel 2 memory base address register"] pub mod ch2maddr; -#[doc = "Channel 3 control register"] -pub struct CH3CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 3 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch3ctl](ch3ctl) module"] +pub type CH3CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH3CTL; +#[doc = "`read()` method returns [ch3ctl::R](ch3ctl::R) reader structure"] +impl crate::Readable for CH3CTL {} +#[doc = "`write(|w| ..)` method takes [ch3ctl::W](ch3ctl::W) writer structure"] +impl crate::Writable for CH3CTL {} #[doc = "Channel 3 control register"] pub mod ch3ctl; -#[doc = "Channel 3 counter register"] -pub struct CH3CNT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 3 counter register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch3cnt](ch3cnt) module"] +pub type CH3CNT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH3CNT; +#[doc = "`read()` method returns [ch3cnt::R](ch3cnt::R) reader structure"] +impl crate::Readable for CH3CNT {} +#[doc = "`write(|w| ..)` method takes [ch3cnt::W](ch3cnt::W) writer structure"] +impl crate::Writable for CH3CNT {} #[doc = "Channel 3 counter register"] pub mod ch3cnt; -#[doc = "Channel 3 peripheral base address register"] -pub struct CH3PADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 3 peripheral base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch3paddr](ch3paddr) module"] +pub type CH3PADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH3PADDR; +#[doc = "`read()` method returns [ch3paddr::R](ch3paddr::R) reader structure"] +impl crate::Readable for CH3PADDR {} +#[doc = "`write(|w| ..)` method takes [ch3paddr::W](ch3paddr::W) writer structure"] +impl crate::Writable for CH3PADDR {} #[doc = "Channel 3 peripheral base address register"] pub mod ch3paddr; -#[doc = "Channel 3 memory base address register"] -pub struct CH3MADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 3 memory base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch3maddr](ch3maddr) module"] +pub type CH3MADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH3MADDR; +#[doc = "`read()` method returns [ch3maddr::R](ch3maddr::R) reader structure"] +impl crate::Readable for CH3MADDR {} +#[doc = "`write(|w| ..)` method takes [ch3maddr::W](ch3maddr::W) writer structure"] +impl crate::Writable for CH3MADDR {} #[doc = "Channel 3 memory base address register"] pub mod ch3maddr; -#[doc = "Channel 4 control register"] -pub struct CH4CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 4 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch4ctl](ch4ctl) module"] +pub type CH4CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH4CTL; +#[doc = "`read()` method returns [ch4ctl::R](ch4ctl::R) reader structure"] +impl crate::Readable for CH4CTL {} +#[doc = "`write(|w| ..)` method takes [ch4ctl::W](ch4ctl::W) writer structure"] +impl crate::Writable for CH4CTL {} #[doc = "Channel 4 control register"] pub mod ch4ctl; -#[doc = "Channel 4 counter register"] -pub struct CH4CNT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 4 counter register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch4cnt](ch4cnt) module"] +pub type CH4CNT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH4CNT; +#[doc = "`read()` method returns [ch4cnt::R](ch4cnt::R) reader structure"] +impl crate::Readable for CH4CNT {} +#[doc = "`write(|w| ..)` method takes [ch4cnt::W](ch4cnt::W) writer structure"] +impl crate::Writable for CH4CNT {} #[doc = "Channel 4 counter register"] pub mod ch4cnt; -#[doc = "Channel 4 peripheral base address register"] -pub struct CH4PADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 4 peripheral base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch4paddr](ch4paddr) module"] +pub type CH4PADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH4PADDR; +#[doc = "`read()` method returns [ch4paddr::R](ch4paddr::R) reader structure"] +impl crate::Readable for CH4PADDR {} +#[doc = "`write(|w| ..)` method takes [ch4paddr::W](ch4paddr::W) writer structure"] +impl crate::Writable for CH4PADDR {} #[doc = "Channel 4 peripheral base address register"] pub mod ch4paddr; -#[doc = "Channel 4 memory base address register"] -pub struct CH4MADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 4 memory base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch4maddr](ch4maddr) module"] +pub type CH4MADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH4MADDR; +#[doc = "`read()` method returns [ch4maddr::R](ch4maddr::R) reader structure"] +impl crate::Readable for CH4MADDR {} +#[doc = "`write(|w| ..)` method takes [ch4maddr::W](ch4maddr::W) writer structure"] +impl crate::Writable for CH4MADDR {} #[doc = "Channel 4 memory base address register"] pub mod ch4maddr; -#[doc = "Channel 5 control register"] -pub struct CH5CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 5 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch5ctl](ch5ctl) module"] +pub type CH5CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH5CTL; +#[doc = "`read()` method returns [ch5ctl::R](ch5ctl::R) reader structure"] +impl crate::Readable for CH5CTL {} +#[doc = "`write(|w| ..)` method takes [ch5ctl::W](ch5ctl::W) writer structure"] +impl crate::Writable for CH5CTL {} #[doc = "Channel 5 control register"] pub mod ch5ctl; -#[doc = "Channel 5 counter register"] -pub struct CH5CNT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 5 counter register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch5cnt](ch5cnt) module"] +pub type CH5CNT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH5CNT; +#[doc = "`read()` method returns [ch5cnt::R](ch5cnt::R) reader structure"] +impl crate::Readable for CH5CNT {} +#[doc = "`write(|w| ..)` method takes [ch5cnt::W](ch5cnt::W) writer structure"] +impl crate::Writable for CH5CNT {} #[doc = "Channel 5 counter register"] pub mod ch5cnt; -#[doc = "Channel 5 peripheral base address register"] -pub struct CH5PADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 5 peripheral base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch5paddr](ch5paddr) module"] +pub type CH5PADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH5PADDR; +#[doc = "`read()` method returns [ch5paddr::R](ch5paddr::R) reader structure"] +impl crate::Readable for CH5PADDR {} +#[doc = "`write(|w| ..)` method takes [ch5paddr::W](ch5paddr::W) writer structure"] +impl crate::Writable for CH5PADDR {} #[doc = "Channel 5 peripheral base address register"] pub mod ch5paddr; -#[doc = "Channel 5 memory base address register"] -pub struct CH5MADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 5 memory base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch5maddr](ch5maddr) module"] +pub type CH5MADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH5MADDR; +#[doc = "`read()` method returns [ch5maddr::R](ch5maddr::R) reader structure"] +impl crate::Readable for CH5MADDR {} +#[doc = "`write(|w| ..)` method takes [ch5maddr::W](ch5maddr::W) writer structure"] +impl crate::Writable for CH5MADDR {} #[doc = "Channel 5 memory base address register"] pub mod ch5maddr; -#[doc = "Channel 6 control register"] -pub struct CH6CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 6 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch6ctl](ch6ctl) module"] +pub type CH6CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH6CTL; +#[doc = "`read()` method returns [ch6ctl::R](ch6ctl::R) reader structure"] +impl crate::Readable for CH6CTL {} +#[doc = "`write(|w| ..)` method takes [ch6ctl::W](ch6ctl::W) writer structure"] +impl crate::Writable for CH6CTL {} #[doc = "Channel 6 control register"] pub mod ch6ctl; -#[doc = "Channel 6 counter register"] -pub struct CH6CNT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 6 counter register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch6cnt](ch6cnt) module"] +pub type CH6CNT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH6CNT; +#[doc = "`read()` method returns [ch6cnt::R](ch6cnt::R) reader structure"] +impl crate::Readable for CH6CNT {} +#[doc = "`write(|w| ..)` method takes [ch6cnt::W](ch6cnt::W) writer structure"] +impl crate::Writable for CH6CNT {} #[doc = "Channel 6 counter register"] pub mod ch6cnt; -#[doc = "Channel 6 peripheral base address register"] -pub struct CH6PADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 6 peripheral base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch6paddr](ch6paddr) module"] +pub type CH6PADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH6PADDR; +#[doc = "`read()` method returns [ch6paddr::R](ch6paddr::R) reader structure"] +impl crate::Readable for CH6PADDR {} +#[doc = "`write(|w| ..)` method takes [ch6paddr::W](ch6paddr::W) writer structure"] +impl crate::Writable for CH6PADDR {} #[doc = "Channel 6 peripheral base address register"] pub mod ch6paddr; -#[doc = "Channel 6 memory base address register"] -pub struct CH6MADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 6 memory base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch6maddr](ch6maddr) module"] +pub type CH6MADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH6MADDR; +#[doc = "`read()` method returns [ch6maddr::R](ch6maddr::R) reader structure"] +impl crate::Readable for CH6MADDR {} +#[doc = "`write(|w| ..)` method takes [ch6maddr::W](ch6maddr::W) writer structure"] +impl crate::Writable for CH6MADDR {} #[doc = "Channel 6 memory base address register"] pub mod ch6maddr; diff --git a/src/dma0/ch0cnt.rs b/src/dma0/ch0cnt.rs index a04e9108f9cca8ca2b8ab5624868b21d28647e72..ca1ca88a9bd41887e06393bedf20ea56191a9821 100644 --- a/src/dma0/ch0cnt.rs +++ b/src/dma0/ch0cnt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH0CNT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CH0CNT"] +pub type R = crate::R; +#[doc = "Writer for register CH0CNT"] +pub type W = crate::W; +#[doc = "Register CH0CNT `reset()`'s with value 0"] +impl crate::ResetValue for super::CH0CNT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/dma0/ch0ctl.rs b/src/dma0/ch0ctl.rs index 60dbdbd6759540f853c021615a7c6f84566b623c..8a0c9d6d9a903a91d6888057d06186992fa167c9 100644 --- a/src/dma0/ch0ctl.rs +++ b/src/dma0/ch0ctl.rs @@ -1,718 +1,394 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH0CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CHENR { - bits: bool, -} -impl CHENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIER { - bits: bool, -} -impl FTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIER { - bits: bool, -} -impl HTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DIRR { - bits: bool, -} -impl DIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CMENR { - bits: bool, -} -impl CMENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PNAGAR { - bits: bool, -} -impl PNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MNAGAR { - bits: bool, -} -impl MNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PWIDTHR { - bits: u8, -} -impl PWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MWIDTHR { - bits: u8, -} -impl MWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PRIOR { - bits: u8, -} -impl PRIOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct M2MR { - bits: bool, -} -impl M2MR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CHENW<'a> { +#[doc = "Reader of register CH0CTL"] +pub type R = crate::R; +#[doc = "Writer for register CH0CTL"] +pub type W = crate::W; +#[doc = "Register CH0CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CH0CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CHEN`"] +pub type CHEN_R = crate::R; +#[doc = "Write proxy for field `CHEN`"] +pub struct CHEN_W<'a> { w: &'a mut W, } -impl<'a> _CHENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIEW<'a> { +#[doc = "Reader of field `FTFIE`"] +pub type FTFIE_R = crate::R; +#[doc = "Write proxy for field `FTFIE`"] +pub struct FTFIE_W<'a> { w: &'a mut W, } -impl<'a> _FTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIEW<'a> { +#[doc = "Reader of field `HTFIE`"] +pub type HTFIE_R = crate::R; +#[doc = "Write proxy for field `HTFIE`"] +pub struct HTFIE_W<'a> { w: &'a mut W, } -impl<'a> _HTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _DIRW<'a> { +#[doc = "Reader of field `DIR`"] +pub type DIR_R = crate::R; +#[doc = "Write proxy for field `DIR`"] +pub struct DIR_W<'a> { w: &'a mut W, } -impl<'a> _DIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CMENW<'a> { +#[doc = "Reader of field `CMEN`"] +pub type CMEN_R = crate::R; +#[doc = "Write proxy for field `CMEN`"] +pub struct CMEN_W<'a> { w: &'a mut W, } -impl<'a> _CMENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _PNAGAW<'a> { +#[doc = "Reader of field `PNAGA`"] +pub type PNAGA_R = crate::R; +#[doc = "Write proxy for field `PNAGA`"] +pub struct PNAGA_W<'a> { w: &'a mut W, } -impl<'a> _PNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _MNAGAW<'a> { +#[doc = "Reader of field `MNAGA`"] +pub type MNAGA_R = crate::R; +#[doc = "Write proxy for field `MNAGA`"] +pub struct MNAGA_W<'a> { w: &'a mut W, } -impl<'a> _MNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _PWIDTHW<'a> { +#[doc = "Reader of field `PWIDTH`"] +pub type PWIDTH_R = crate::R; +#[doc = "Write proxy for field `PWIDTH`"] +pub struct PWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _PWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _MWIDTHW<'a> { +#[doc = "Reader of field `MWIDTH`"] +pub type MWIDTH_R = crate::R; +#[doc = "Write proxy for field `MWIDTH`"] +pub struct MWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _MWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PRIOW<'a> { +#[doc = "Reader of field `PRIO`"] +pub type PRIO_R = crate::R; +#[doc = "Write proxy for field `PRIO`"] +pub struct PRIO_W<'a> { w: &'a mut W, } -impl<'a> _PRIOW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PRIO_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _M2MW<'a> { +#[doc = "Reader of field `M2M`"] +pub type M2M_R = crate::R; +#[doc = "Write proxy for field `M2M`"] +pub struct M2M_W<'a> { w: &'a mut W, } -impl<'a> _M2MW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> M2M_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&self) -> CHENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHENR { bits } + #[inline(always)] + pub fn chen(&self) -> CHEN_R { + CHEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&self) -> FTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIER { bits } + #[inline(always)] + pub fn ftfie(&self) -> FTFIE_R { + FTFIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&self) -> HTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIER { bits } + #[inline(always)] + pub fn htfie(&self) -> HTFIE_R { + HTFIE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&self) -> DIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DIRR { bits } + #[inline(always)] + pub fn dir(&self) -> DIR_R { + DIR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&self) -> CMENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CMENR { bits } + #[inline(always)] + pub fn cmen(&self) -> CMEN_R { + CMEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&self) -> PNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PNAGAR { bits } + #[inline(always)] + pub fn pnaga(&self) -> PNAGA_R { + PNAGA_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&self) -> MNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MNAGAR { bits } + #[inline(always)] + pub fn mnaga(&self) -> MNAGA_R { + MNAGA_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&self) -> PWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PWIDTHR { bits } + #[inline(always)] + pub fn pwidth(&self) -> PWIDTH_R { + PWIDTH_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&self) -> MWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MWIDTHR { bits } + #[inline(always)] + pub fn mwidth(&self) -> MWIDTH_R { + MWIDTH_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&self) -> PRIOR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PRIOR { bits } + #[inline(always)] + pub fn prio(&self) -> PRIO_R { + PRIO_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&self) -> M2MR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - M2MR { bits } + #[inline(always)] + pub fn m2m(&self) -> M2M_R { + M2M_R::new(((self.bits >> 14) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&mut self) -> _CHENW { - _CHENW { w: self } + #[inline(always)] + pub fn chen(&mut self) -> CHEN_W { + CHEN_W { w: self } } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&mut self) -> _FTFIEW { - _FTFIEW { w: self } + #[inline(always)] + pub fn ftfie(&mut self) -> FTFIE_W { + FTFIE_W { w: self } } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&mut self) -> _HTFIEW { - _HTFIEW { w: self } + #[inline(always)] + pub fn htfie(&mut self) -> HTFIE_W { + HTFIE_W { w: self } } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&mut self) -> _DIRW { - _DIRW { w: self } + #[inline(always)] + pub fn dir(&mut self) -> DIR_W { + DIR_W { w: self } } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&mut self) -> _CMENW { - _CMENW { w: self } + #[inline(always)] + pub fn cmen(&mut self) -> CMEN_W { + CMEN_W { w: self } } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&mut self) -> _PNAGAW { - _PNAGAW { w: self } + #[inline(always)] + pub fn pnaga(&mut self) -> PNAGA_W { + PNAGA_W { w: self } } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&mut self) -> _MNAGAW { - _MNAGAW { w: self } + #[inline(always)] + pub fn mnaga(&mut self) -> MNAGA_W { + MNAGA_W { w: self } } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&mut self) -> _PWIDTHW { - _PWIDTHW { w: self } + #[inline(always)] + pub fn pwidth(&mut self) -> PWIDTH_W { + PWIDTH_W { w: self } } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&mut self) -> _MWIDTHW { - _MWIDTHW { w: self } + #[inline(always)] + pub fn mwidth(&mut self) -> MWIDTH_W { + MWIDTH_W { w: self } } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&mut self) -> _PRIOW { - _PRIOW { w: self } + #[inline(always)] + pub fn prio(&mut self) -> PRIO_W { + PRIO_W { w: self } } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&mut self) -> _M2MW { - _M2MW { w: self } + #[inline(always)] + pub fn m2m(&mut self) -> M2M_W { + M2M_W { w: self } } } diff --git a/src/dma0/ch0maddr.rs b/src/dma0/ch0maddr.rs index 6cb58571efe8608941909b9d83588c75af3994b9..1174052a06bac90851ef79dfc7e93066050b628c 100644 --- a/src/dma0/ch0maddr.rs +++ b/src/dma0/ch0maddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH0MADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MADDRR { - bits: u32, -} -impl MADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MADDRW<'a> { +#[doc = "Reader of register CH0MADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH0MADDR"] +pub type W = crate::W; +#[doc = "Register CH0MADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH0MADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MADDR`"] +pub type MADDR_R = crate::R; +#[doc = "Write proxy for field `MADDR`"] +pub struct MADDR_W<'a> { w: &'a mut W, } -impl<'a> _MADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&self) -> MADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - MADDRR { bits } + #[inline(always)] + pub fn maddr(&self) -> MADDR_R { + MADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&mut self) -> _MADDRW { - _MADDRW { w: self } + #[inline(always)] + pub fn maddr(&mut self) -> MADDR_W { + MADDR_W { w: self } } } diff --git a/src/dma0/ch0paddr.rs b/src/dma0/ch0paddr.rs index a5253d4825ce837685c6720f9608601e497fc931..9d8ddb7a1d29d03a30afb711abb2c3da74bc3495 100644 --- a/src/dma0/ch0paddr.rs +++ b/src/dma0/ch0paddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH0PADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PADDRR { - bits: u32, -} -impl PADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PADDRW<'a> { +#[doc = "Reader of register CH0PADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH0PADDR"] +pub type W = crate::W; +#[doc = "Register CH0PADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH0PADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PADDR`"] +pub type PADDR_R = crate::R; +#[doc = "Write proxy for field `PADDR`"] +pub struct PADDR_W<'a> { w: &'a mut W, } -impl<'a> _PADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&self) -> PADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - PADDRR { bits } + #[inline(always)] + pub fn paddr(&self) -> PADDR_R { + PADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&mut self) -> _PADDRW { - _PADDRW { w: self } + #[inline(always)] + pub fn paddr(&mut self) -> PADDR_W { + PADDR_W { w: self } } } diff --git a/src/dma0/ch1cnt.rs b/src/dma0/ch1cnt.rs index 799c1c4d6d520c7fcc6239e56a2108d804de0111..c056ed326fa7502fd56cd38ef1e5184548ff1ffb 100644 --- a/src/dma0/ch1cnt.rs +++ b/src/dma0/ch1cnt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH1CNT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CH1CNT"] +pub type R = crate::R; +#[doc = "Writer for register CH1CNT"] +pub type W = crate::W; +#[doc = "Register CH1CNT `reset()`'s with value 0"] +impl crate::ResetValue for super::CH1CNT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/dma0/ch1ctl.rs b/src/dma0/ch1ctl.rs index 05be5160a2ea0b2e41f493638956667ed5a1265e..3be8a847b2650114084a0ce8030a4b5f066366f4 100644 --- a/src/dma0/ch1ctl.rs +++ b/src/dma0/ch1ctl.rs @@ -1,718 +1,394 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH1CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CHENR { - bits: bool, -} -impl CHENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIER { - bits: bool, -} -impl FTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIER { - bits: bool, -} -impl HTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DIRR { - bits: bool, -} -impl DIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CMENR { - bits: bool, -} -impl CMENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PNAGAR { - bits: bool, -} -impl PNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MNAGAR { - bits: bool, -} -impl MNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PWIDTHR { - bits: u8, -} -impl PWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MWIDTHR { - bits: u8, -} -impl MWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PRIOR { - bits: u8, -} -impl PRIOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct M2MR { - bits: bool, -} -impl M2MR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CHENW<'a> { +#[doc = "Reader of register CH1CTL"] +pub type R = crate::R; +#[doc = "Writer for register CH1CTL"] +pub type W = crate::W; +#[doc = "Register CH1CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CH1CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CHEN`"] +pub type CHEN_R = crate::R; +#[doc = "Write proxy for field `CHEN`"] +pub struct CHEN_W<'a> { w: &'a mut W, } -impl<'a> _CHENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIEW<'a> { +#[doc = "Reader of field `FTFIE`"] +pub type FTFIE_R = crate::R; +#[doc = "Write proxy for field `FTFIE`"] +pub struct FTFIE_W<'a> { w: &'a mut W, } -impl<'a> _FTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIEW<'a> { +#[doc = "Reader of field `HTFIE`"] +pub type HTFIE_R = crate::R; +#[doc = "Write proxy for field `HTFIE`"] +pub struct HTFIE_W<'a> { w: &'a mut W, } -impl<'a> _HTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _DIRW<'a> { +#[doc = "Reader of field `DIR`"] +pub type DIR_R = crate::R; +#[doc = "Write proxy for field `DIR`"] +pub struct DIR_W<'a> { w: &'a mut W, } -impl<'a> _DIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CMENW<'a> { +#[doc = "Reader of field `CMEN`"] +pub type CMEN_R = crate::R; +#[doc = "Write proxy for field `CMEN`"] +pub struct CMEN_W<'a> { w: &'a mut W, } -impl<'a> _CMENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _PNAGAW<'a> { +#[doc = "Reader of field `PNAGA`"] +pub type PNAGA_R = crate::R; +#[doc = "Write proxy for field `PNAGA`"] +pub struct PNAGA_W<'a> { w: &'a mut W, } -impl<'a> _PNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _MNAGAW<'a> { +#[doc = "Reader of field `MNAGA`"] +pub type MNAGA_R = crate::R; +#[doc = "Write proxy for field `MNAGA`"] +pub struct MNAGA_W<'a> { w: &'a mut W, } -impl<'a> _MNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _PWIDTHW<'a> { +#[doc = "Reader of field `PWIDTH`"] +pub type PWIDTH_R = crate::R; +#[doc = "Write proxy for field `PWIDTH`"] +pub struct PWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _PWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _MWIDTHW<'a> { +#[doc = "Reader of field `MWIDTH`"] +pub type MWIDTH_R = crate::R; +#[doc = "Write proxy for field `MWIDTH`"] +pub struct MWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _MWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PRIOW<'a> { +#[doc = "Reader of field `PRIO`"] +pub type PRIO_R = crate::R; +#[doc = "Write proxy for field `PRIO`"] +pub struct PRIO_W<'a> { w: &'a mut W, } -impl<'a> _PRIOW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PRIO_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _M2MW<'a> { +#[doc = "Reader of field `M2M`"] +pub type M2M_R = crate::R; +#[doc = "Write proxy for field `M2M`"] +pub struct M2M_W<'a> { w: &'a mut W, } -impl<'a> _M2MW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> M2M_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&self) -> CHENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHENR { bits } + #[inline(always)] + pub fn chen(&self) -> CHEN_R { + CHEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&self) -> FTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIER { bits } + #[inline(always)] + pub fn ftfie(&self) -> FTFIE_R { + FTFIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&self) -> HTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIER { bits } + #[inline(always)] + pub fn htfie(&self) -> HTFIE_R { + HTFIE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&self) -> DIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DIRR { bits } + #[inline(always)] + pub fn dir(&self) -> DIR_R { + DIR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&self) -> CMENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CMENR { bits } + #[inline(always)] + pub fn cmen(&self) -> CMEN_R { + CMEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&self) -> PNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PNAGAR { bits } + #[inline(always)] + pub fn pnaga(&self) -> PNAGA_R { + PNAGA_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&self) -> MNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MNAGAR { bits } + #[inline(always)] + pub fn mnaga(&self) -> MNAGA_R { + MNAGA_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&self) -> PWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PWIDTHR { bits } + #[inline(always)] + pub fn pwidth(&self) -> PWIDTH_R { + PWIDTH_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&self) -> MWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MWIDTHR { bits } + #[inline(always)] + pub fn mwidth(&self) -> MWIDTH_R { + MWIDTH_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&self) -> PRIOR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PRIOR { bits } + #[inline(always)] + pub fn prio(&self) -> PRIO_R { + PRIO_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&self) -> M2MR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - M2MR { bits } + #[inline(always)] + pub fn m2m(&self) -> M2M_R { + M2M_R::new(((self.bits >> 14) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&mut self) -> _CHENW { - _CHENW { w: self } + #[inline(always)] + pub fn chen(&mut self) -> CHEN_W { + CHEN_W { w: self } } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&mut self) -> _FTFIEW { - _FTFIEW { w: self } + #[inline(always)] + pub fn ftfie(&mut self) -> FTFIE_W { + FTFIE_W { w: self } } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&mut self) -> _HTFIEW { - _HTFIEW { w: self } + #[inline(always)] + pub fn htfie(&mut self) -> HTFIE_W { + HTFIE_W { w: self } } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&mut self) -> _DIRW { - _DIRW { w: self } + #[inline(always)] + pub fn dir(&mut self) -> DIR_W { + DIR_W { w: self } } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&mut self) -> _CMENW { - _CMENW { w: self } + #[inline(always)] + pub fn cmen(&mut self) -> CMEN_W { + CMEN_W { w: self } } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&mut self) -> _PNAGAW { - _PNAGAW { w: self } + #[inline(always)] + pub fn pnaga(&mut self) -> PNAGA_W { + PNAGA_W { w: self } } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&mut self) -> _MNAGAW { - _MNAGAW { w: self } + #[inline(always)] + pub fn mnaga(&mut self) -> MNAGA_W { + MNAGA_W { w: self } } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&mut self) -> _PWIDTHW { - _PWIDTHW { w: self } + #[inline(always)] + pub fn pwidth(&mut self) -> PWIDTH_W { + PWIDTH_W { w: self } } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&mut self) -> _MWIDTHW { - _MWIDTHW { w: self } + #[inline(always)] + pub fn mwidth(&mut self) -> MWIDTH_W { + MWIDTH_W { w: self } } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&mut self) -> _PRIOW { - _PRIOW { w: self } + #[inline(always)] + pub fn prio(&mut self) -> PRIO_W { + PRIO_W { w: self } } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&mut self) -> _M2MW { - _M2MW { w: self } + #[inline(always)] + pub fn m2m(&mut self) -> M2M_W { + M2M_W { w: self } } } diff --git a/src/dma0/ch1maddr.rs b/src/dma0/ch1maddr.rs index e40c7994e01227a8c63755e016d432cdd42ff631..1d138277f90786c0906e01cb9df38b7fe2676b64 100644 --- a/src/dma0/ch1maddr.rs +++ b/src/dma0/ch1maddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH1MADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MADDRR { - bits: u32, -} -impl MADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MADDRW<'a> { +#[doc = "Reader of register CH1MADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH1MADDR"] +pub type W = crate::W; +#[doc = "Register CH1MADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH1MADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MADDR`"] +pub type MADDR_R = crate::R; +#[doc = "Write proxy for field `MADDR`"] +pub struct MADDR_W<'a> { w: &'a mut W, } -impl<'a> _MADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&self) -> MADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - MADDRR { bits } + #[inline(always)] + pub fn maddr(&self) -> MADDR_R { + MADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&mut self) -> _MADDRW { - _MADDRW { w: self } + #[inline(always)] + pub fn maddr(&mut self) -> MADDR_W { + MADDR_W { w: self } } } diff --git a/src/dma0/ch1paddr.rs b/src/dma0/ch1paddr.rs index 7db0fd2324f970cd92db09ee4453850fa658f27f..cfb2b2c4de7faf0bc785f31d576b4e7c17e6bd05 100644 --- a/src/dma0/ch1paddr.rs +++ b/src/dma0/ch1paddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH1PADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PADDRR { - bits: u32, -} -impl PADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PADDRW<'a> { +#[doc = "Reader of register CH1PADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH1PADDR"] +pub type W = crate::W; +#[doc = "Register CH1PADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH1PADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PADDR`"] +pub type PADDR_R = crate::R; +#[doc = "Write proxy for field `PADDR`"] +pub struct PADDR_W<'a> { w: &'a mut W, } -impl<'a> _PADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&self) -> PADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - PADDRR { bits } + #[inline(always)] + pub fn paddr(&self) -> PADDR_R { + PADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&mut self) -> _PADDRW { - _PADDRW { w: self } + #[inline(always)] + pub fn paddr(&mut self) -> PADDR_W { + PADDR_W { w: self } } } diff --git a/src/dma0/ch2cnt.rs b/src/dma0/ch2cnt.rs index 0f1745e30384631068f07d4ee47c86dfa2c42893..8f03bd29cf1938c71889d2b12ac4f47966dcf34d 100644 --- a/src/dma0/ch2cnt.rs +++ b/src/dma0/ch2cnt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH2CNT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CH2CNT"] +pub type R = crate::R; +#[doc = "Writer for register CH2CNT"] +pub type W = crate::W; +#[doc = "Register CH2CNT `reset()`'s with value 0"] +impl crate::ResetValue for super::CH2CNT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/dma0/ch2ctl.rs b/src/dma0/ch2ctl.rs index 0b8c6beec1ce3ac41776948418af0f46598302d6..e6cd6a68eb75b49557f0156c2131b720230eeffd 100644 --- a/src/dma0/ch2ctl.rs +++ b/src/dma0/ch2ctl.rs @@ -1,718 +1,394 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH2CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CHENR { - bits: bool, -} -impl CHENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIER { - bits: bool, -} -impl FTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIER { - bits: bool, -} -impl HTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DIRR { - bits: bool, -} -impl DIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CMENR { - bits: bool, -} -impl CMENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PNAGAR { - bits: bool, -} -impl PNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MNAGAR { - bits: bool, -} -impl MNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PWIDTHR { - bits: u8, -} -impl PWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MWIDTHR { - bits: u8, -} -impl MWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PRIOR { - bits: u8, -} -impl PRIOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct M2MR { - bits: bool, -} -impl M2MR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CHENW<'a> { +#[doc = "Reader of register CH2CTL"] +pub type R = crate::R; +#[doc = "Writer for register CH2CTL"] +pub type W = crate::W; +#[doc = "Register CH2CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CH2CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CHEN`"] +pub type CHEN_R = crate::R; +#[doc = "Write proxy for field `CHEN`"] +pub struct CHEN_W<'a> { w: &'a mut W, } -impl<'a> _CHENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIEW<'a> { +#[doc = "Reader of field `FTFIE`"] +pub type FTFIE_R = crate::R; +#[doc = "Write proxy for field `FTFIE`"] +pub struct FTFIE_W<'a> { w: &'a mut W, } -impl<'a> _FTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIEW<'a> { +#[doc = "Reader of field `HTFIE`"] +pub type HTFIE_R = crate::R; +#[doc = "Write proxy for field `HTFIE`"] +pub struct HTFIE_W<'a> { w: &'a mut W, } -impl<'a> _HTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _DIRW<'a> { +#[doc = "Reader of field `DIR`"] +pub type DIR_R = crate::R; +#[doc = "Write proxy for field `DIR`"] +pub struct DIR_W<'a> { w: &'a mut W, } -impl<'a> _DIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CMENW<'a> { +#[doc = "Reader of field `CMEN`"] +pub type CMEN_R = crate::R; +#[doc = "Write proxy for field `CMEN`"] +pub struct CMEN_W<'a> { w: &'a mut W, } -impl<'a> _CMENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _PNAGAW<'a> { +#[doc = "Reader of field `PNAGA`"] +pub type PNAGA_R = crate::R; +#[doc = "Write proxy for field `PNAGA`"] +pub struct PNAGA_W<'a> { w: &'a mut W, } -impl<'a> _PNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _MNAGAW<'a> { +#[doc = "Reader of field `MNAGA`"] +pub type MNAGA_R = crate::R; +#[doc = "Write proxy for field `MNAGA`"] +pub struct MNAGA_W<'a> { w: &'a mut W, } -impl<'a> _MNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _PWIDTHW<'a> { +#[doc = "Reader of field `PWIDTH`"] +pub type PWIDTH_R = crate::R; +#[doc = "Write proxy for field `PWIDTH`"] +pub struct PWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _PWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _MWIDTHW<'a> { +#[doc = "Reader of field `MWIDTH`"] +pub type MWIDTH_R = crate::R; +#[doc = "Write proxy for field `MWIDTH`"] +pub struct MWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _MWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PRIOW<'a> { +#[doc = "Reader of field `PRIO`"] +pub type PRIO_R = crate::R; +#[doc = "Write proxy for field `PRIO`"] +pub struct PRIO_W<'a> { w: &'a mut W, } -impl<'a> _PRIOW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PRIO_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _M2MW<'a> { +#[doc = "Reader of field `M2M`"] +pub type M2M_R = crate::R; +#[doc = "Write proxy for field `M2M`"] +pub struct M2M_W<'a> { w: &'a mut W, } -impl<'a> _M2MW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> M2M_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&self) -> CHENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHENR { bits } + #[inline(always)] + pub fn chen(&self) -> CHEN_R { + CHEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&self) -> FTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIER { bits } + #[inline(always)] + pub fn ftfie(&self) -> FTFIE_R { + FTFIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&self) -> HTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIER { bits } + #[inline(always)] + pub fn htfie(&self) -> HTFIE_R { + HTFIE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&self) -> DIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DIRR { bits } + #[inline(always)] + pub fn dir(&self) -> DIR_R { + DIR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&self) -> CMENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CMENR { bits } + #[inline(always)] + pub fn cmen(&self) -> CMEN_R { + CMEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&self) -> PNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PNAGAR { bits } + #[inline(always)] + pub fn pnaga(&self) -> PNAGA_R { + PNAGA_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&self) -> MNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MNAGAR { bits } + #[inline(always)] + pub fn mnaga(&self) -> MNAGA_R { + MNAGA_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&self) -> PWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PWIDTHR { bits } + #[inline(always)] + pub fn pwidth(&self) -> PWIDTH_R { + PWIDTH_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&self) -> MWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MWIDTHR { bits } + #[inline(always)] + pub fn mwidth(&self) -> MWIDTH_R { + MWIDTH_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&self) -> PRIOR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PRIOR { bits } + #[inline(always)] + pub fn prio(&self) -> PRIO_R { + PRIO_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&self) -> M2MR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - M2MR { bits } + #[inline(always)] + pub fn m2m(&self) -> M2M_R { + M2M_R::new(((self.bits >> 14) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&mut self) -> _CHENW { - _CHENW { w: self } + #[inline(always)] + pub fn chen(&mut self) -> CHEN_W { + CHEN_W { w: self } } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&mut self) -> _FTFIEW { - _FTFIEW { w: self } + #[inline(always)] + pub fn ftfie(&mut self) -> FTFIE_W { + FTFIE_W { w: self } } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&mut self) -> _HTFIEW { - _HTFIEW { w: self } + #[inline(always)] + pub fn htfie(&mut self) -> HTFIE_W { + HTFIE_W { w: self } } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&mut self) -> _DIRW { - _DIRW { w: self } + #[inline(always)] + pub fn dir(&mut self) -> DIR_W { + DIR_W { w: self } } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&mut self) -> _CMENW { - _CMENW { w: self } + #[inline(always)] + pub fn cmen(&mut self) -> CMEN_W { + CMEN_W { w: self } } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&mut self) -> _PNAGAW { - _PNAGAW { w: self } + #[inline(always)] + pub fn pnaga(&mut self) -> PNAGA_W { + PNAGA_W { w: self } } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&mut self) -> _MNAGAW { - _MNAGAW { w: self } + #[inline(always)] + pub fn mnaga(&mut self) -> MNAGA_W { + MNAGA_W { w: self } } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&mut self) -> _PWIDTHW { - _PWIDTHW { w: self } + #[inline(always)] + pub fn pwidth(&mut self) -> PWIDTH_W { + PWIDTH_W { w: self } } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&mut self) -> _MWIDTHW { - _MWIDTHW { w: self } + #[inline(always)] + pub fn mwidth(&mut self) -> MWIDTH_W { + MWIDTH_W { w: self } } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&mut self) -> _PRIOW { - _PRIOW { w: self } + #[inline(always)] + pub fn prio(&mut self) -> PRIO_W { + PRIO_W { w: self } } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&mut self) -> _M2MW { - _M2MW { w: self } + #[inline(always)] + pub fn m2m(&mut self) -> M2M_W { + M2M_W { w: self } } } diff --git a/src/dma0/ch2maddr.rs b/src/dma0/ch2maddr.rs index 82e919752ccd7b77beb286fb10f9ae39340648d8..6c479f2ce14b719a69bd783bb36b96a4505f3fae 100644 --- a/src/dma0/ch2maddr.rs +++ b/src/dma0/ch2maddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH2MADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MADDRR { - bits: u32, -} -impl MADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MADDRW<'a> { +#[doc = "Reader of register CH2MADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH2MADDR"] +pub type W = crate::W; +#[doc = "Register CH2MADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH2MADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MADDR`"] +pub type MADDR_R = crate::R; +#[doc = "Write proxy for field `MADDR`"] +pub struct MADDR_W<'a> { w: &'a mut W, } -impl<'a> _MADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&self) -> MADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - MADDRR { bits } + #[inline(always)] + pub fn maddr(&self) -> MADDR_R { + MADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&mut self) -> _MADDRW { - _MADDRW { w: self } + #[inline(always)] + pub fn maddr(&mut self) -> MADDR_W { + MADDR_W { w: self } } } diff --git a/src/dma0/ch2paddr.rs b/src/dma0/ch2paddr.rs index 9c4a1fee555cb75c6f3306631e9a474ca2fe4d7a..8a044c0246358a22408c9f343da0a6e88ee0657d 100644 --- a/src/dma0/ch2paddr.rs +++ b/src/dma0/ch2paddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH2PADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PADDRR { - bits: u32, -} -impl PADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PADDRW<'a> { +#[doc = "Reader of register CH2PADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH2PADDR"] +pub type W = crate::W; +#[doc = "Register CH2PADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH2PADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PADDR`"] +pub type PADDR_R = crate::R; +#[doc = "Write proxy for field `PADDR`"] +pub struct PADDR_W<'a> { w: &'a mut W, } -impl<'a> _PADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&self) -> PADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - PADDRR { bits } + #[inline(always)] + pub fn paddr(&self) -> PADDR_R { + PADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&mut self) -> _PADDRW { - _PADDRW { w: self } + #[inline(always)] + pub fn paddr(&mut self) -> PADDR_W { + PADDR_W { w: self } } } diff --git a/src/dma0/ch3cnt.rs b/src/dma0/ch3cnt.rs index bd7af739070a61bf7ab59466a2ad97be95b76313..45f4d93a82a894d82752423616b8bc2379e2e444 100644 --- a/src/dma0/ch3cnt.rs +++ b/src/dma0/ch3cnt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH3CNT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CH3CNT"] +pub type R = crate::R; +#[doc = "Writer for register CH3CNT"] +pub type W = crate::W; +#[doc = "Register CH3CNT `reset()`'s with value 0"] +impl crate::ResetValue for super::CH3CNT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/dma0/ch3ctl.rs b/src/dma0/ch3ctl.rs index 66a1311a5b7ef1969ba8c35a68992b123698f77e..d69bbef70542094a3b2fc355f55a39f94bb877c3 100644 --- a/src/dma0/ch3ctl.rs +++ b/src/dma0/ch3ctl.rs @@ -1,718 +1,394 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH3CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CHENR { - bits: bool, -} -impl CHENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIER { - bits: bool, -} -impl FTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIER { - bits: bool, -} -impl HTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DIRR { - bits: bool, -} -impl DIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CMENR { - bits: bool, -} -impl CMENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PNAGAR { - bits: bool, -} -impl PNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MNAGAR { - bits: bool, -} -impl MNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PWIDTHR { - bits: u8, -} -impl PWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MWIDTHR { - bits: u8, -} -impl MWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PRIOR { - bits: u8, -} -impl PRIOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct M2MR { - bits: bool, -} -impl M2MR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CHENW<'a> { +#[doc = "Reader of register CH3CTL"] +pub type R = crate::R; +#[doc = "Writer for register CH3CTL"] +pub type W = crate::W; +#[doc = "Register CH3CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CH3CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CHEN`"] +pub type CHEN_R = crate::R; +#[doc = "Write proxy for field `CHEN`"] +pub struct CHEN_W<'a> { w: &'a mut W, } -impl<'a> _CHENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIEW<'a> { +#[doc = "Reader of field `FTFIE`"] +pub type FTFIE_R = crate::R; +#[doc = "Write proxy for field `FTFIE`"] +pub struct FTFIE_W<'a> { w: &'a mut W, } -impl<'a> _FTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIEW<'a> { +#[doc = "Reader of field `HTFIE`"] +pub type HTFIE_R = crate::R; +#[doc = "Write proxy for field `HTFIE`"] +pub struct HTFIE_W<'a> { w: &'a mut W, } -impl<'a> _HTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _DIRW<'a> { +#[doc = "Reader of field `DIR`"] +pub type DIR_R = crate::R; +#[doc = "Write proxy for field `DIR`"] +pub struct DIR_W<'a> { w: &'a mut W, } -impl<'a> _DIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CMENW<'a> { +#[doc = "Reader of field `CMEN`"] +pub type CMEN_R = crate::R; +#[doc = "Write proxy for field `CMEN`"] +pub struct CMEN_W<'a> { w: &'a mut W, } -impl<'a> _CMENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _PNAGAW<'a> { +#[doc = "Reader of field `PNAGA`"] +pub type PNAGA_R = crate::R; +#[doc = "Write proxy for field `PNAGA`"] +pub struct PNAGA_W<'a> { w: &'a mut W, } -impl<'a> _PNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _MNAGAW<'a> { +#[doc = "Reader of field `MNAGA`"] +pub type MNAGA_R = crate::R; +#[doc = "Write proxy for field `MNAGA`"] +pub struct MNAGA_W<'a> { w: &'a mut W, } -impl<'a> _MNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _PWIDTHW<'a> { +#[doc = "Reader of field `PWIDTH`"] +pub type PWIDTH_R = crate::R; +#[doc = "Write proxy for field `PWIDTH`"] +pub struct PWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _PWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _MWIDTHW<'a> { +#[doc = "Reader of field `MWIDTH`"] +pub type MWIDTH_R = crate::R; +#[doc = "Write proxy for field `MWIDTH`"] +pub struct MWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _MWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PRIOW<'a> { +#[doc = "Reader of field `PRIO`"] +pub type PRIO_R = crate::R; +#[doc = "Write proxy for field `PRIO`"] +pub struct PRIO_W<'a> { w: &'a mut W, } -impl<'a> _PRIOW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PRIO_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _M2MW<'a> { +#[doc = "Reader of field `M2M`"] +pub type M2M_R = crate::R; +#[doc = "Write proxy for field `M2M`"] +pub struct M2M_W<'a> { w: &'a mut W, } -impl<'a> _M2MW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> M2M_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&self) -> CHENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHENR { bits } + #[inline(always)] + pub fn chen(&self) -> CHEN_R { + CHEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&self) -> FTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIER { bits } + #[inline(always)] + pub fn ftfie(&self) -> FTFIE_R { + FTFIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&self) -> HTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIER { bits } + #[inline(always)] + pub fn htfie(&self) -> HTFIE_R { + HTFIE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&self) -> DIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DIRR { bits } + #[inline(always)] + pub fn dir(&self) -> DIR_R { + DIR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&self) -> CMENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CMENR { bits } + #[inline(always)] + pub fn cmen(&self) -> CMEN_R { + CMEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&self) -> PNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PNAGAR { bits } + #[inline(always)] + pub fn pnaga(&self) -> PNAGA_R { + PNAGA_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&self) -> MNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MNAGAR { bits } + #[inline(always)] + pub fn mnaga(&self) -> MNAGA_R { + MNAGA_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&self) -> PWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PWIDTHR { bits } + #[inline(always)] + pub fn pwidth(&self) -> PWIDTH_R { + PWIDTH_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&self) -> MWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MWIDTHR { bits } + #[inline(always)] + pub fn mwidth(&self) -> MWIDTH_R { + MWIDTH_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&self) -> PRIOR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PRIOR { bits } + #[inline(always)] + pub fn prio(&self) -> PRIO_R { + PRIO_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&self) -> M2MR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - M2MR { bits } + #[inline(always)] + pub fn m2m(&self) -> M2M_R { + M2M_R::new(((self.bits >> 14) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&mut self) -> _CHENW { - _CHENW { w: self } + #[inline(always)] + pub fn chen(&mut self) -> CHEN_W { + CHEN_W { w: self } } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&mut self) -> _FTFIEW { - _FTFIEW { w: self } + #[inline(always)] + pub fn ftfie(&mut self) -> FTFIE_W { + FTFIE_W { w: self } } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&mut self) -> _HTFIEW { - _HTFIEW { w: self } + #[inline(always)] + pub fn htfie(&mut self) -> HTFIE_W { + HTFIE_W { w: self } } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&mut self) -> _DIRW { - _DIRW { w: self } + #[inline(always)] + pub fn dir(&mut self) -> DIR_W { + DIR_W { w: self } } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&mut self) -> _CMENW { - _CMENW { w: self } + #[inline(always)] + pub fn cmen(&mut self) -> CMEN_W { + CMEN_W { w: self } } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&mut self) -> _PNAGAW { - _PNAGAW { w: self } + #[inline(always)] + pub fn pnaga(&mut self) -> PNAGA_W { + PNAGA_W { w: self } } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&mut self) -> _MNAGAW { - _MNAGAW { w: self } + #[inline(always)] + pub fn mnaga(&mut self) -> MNAGA_W { + MNAGA_W { w: self } } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&mut self) -> _PWIDTHW { - _PWIDTHW { w: self } + #[inline(always)] + pub fn pwidth(&mut self) -> PWIDTH_W { + PWIDTH_W { w: self } } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&mut self) -> _MWIDTHW { - _MWIDTHW { w: self } + #[inline(always)] + pub fn mwidth(&mut self) -> MWIDTH_W { + MWIDTH_W { w: self } } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&mut self) -> _PRIOW { - _PRIOW { w: self } + #[inline(always)] + pub fn prio(&mut self) -> PRIO_W { + PRIO_W { w: self } } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&mut self) -> _M2MW { - _M2MW { w: self } + #[inline(always)] + pub fn m2m(&mut self) -> M2M_W { + M2M_W { w: self } } } diff --git a/src/dma0/ch3maddr.rs b/src/dma0/ch3maddr.rs index 20e190e974e22859a439a512d6b2f0753f90792f..e6c9a99a17d89e5a3f3a9d8d8b1e5f7e24307f76 100644 --- a/src/dma0/ch3maddr.rs +++ b/src/dma0/ch3maddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH3MADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MADDRR { - bits: u32, -} -impl MADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MADDRW<'a> { +#[doc = "Reader of register CH3MADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH3MADDR"] +pub type W = crate::W; +#[doc = "Register CH3MADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH3MADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MADDR`"] +pub type MADDR_R = crate::R; +#[doc = "Write proxy for field `MADDR`"] +pub struct MADDR_W<'a> { w: &'a mut W, } -impl<'a> _MADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&self) -> MADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - MADDRR { bits } + #[inline(always)] + pub fn maddr(&self) -> MADDR_R { + MADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&mut self) -> _MADDRW { - _MADDRW { w: self } + #[inline(always)] + pub fn maddr(&mut self) -> MADDR_W { + MADDR_W { w: self } } } diff --git a/src/dma0/ch3paddr.rs b/src/dma0/ch3paddr.rs index e65898934ddb8e7b333139a4a4247a7b27977138..e9e47902cb1aafc0bcd21cd414bcbcdc1ba4eb54 100644 --- a/src/dma0/ch3paddr.rs +++ b/src/dma0/ch3paddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH3PADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PADDRR { - bits: u32, -} -impl PADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PADDRW<'a> { +#[doc = "Reader of register CH3PADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH3PADDR"] +pub type W = crate::W; +#[doc = "Register CH3PADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH3PADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PADDR`"] +pub type PADDR_R = crate::R; +#[doc = "Write proxy for field `PADDR`"] +pub struct PADDR_W<'a> { w: &'a mut W, } -impl<'a> _PADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&self) -> PADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - PADDRR { bits } + #[inline(always)] + pub fn paddr(&self) -> PADDR_R { + PADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&mut self) -> _PADDRW { - _PADDRW { w: self } + #[inline(always)] + pub fn paddr(&mut self) -> PADDR_W { + PADDR_W { w: self } } } diff --git a/src/dma0/ch4cnt.rs b/src/dma0/ch4cnt.rs index 265aa66d67f73f31fc976ba21db582f9b040cc35..d7089b40561bf0004b84b76146196458dad6027c 100644 --- a/src/dma0/ch4cnt.rs +++ b/src/dma0/ch4cnt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH4CNT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CH4CNT"] +pub type R = crate::R; +#[doc = "Writer for register CH4CNT"] +pub type W = crate::W; +#[doc = "Register CH4CNT `reset()`'s with value 0"] +impl crate::ResetValue for super::CH4CNT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/dma0/ch4ctl.rs b/src/dma0/ch4ctl.rs index e3867f099f3acb16f608a954341caf724e977d79..aca0392d4d652361fb5316dac72b0c4d43bb2487 100644 --- a/src/dma0/ch4ctl.rs +++ b/src/dma0/ch4ctl.rs @@ -1,718 +1,394 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH4CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CHENR { - bits: bool, -} -impl CHENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIER { - bits: bool, -} -impl FTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIER { - bits: bool, -} -impl HTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DIRR { - bits: bool, -} -impl DIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CMENR { - bits: bool, -} -impl CMENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PNAGAR { - bits: bool, -} -impl PNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MNAGAR { - bits: bool, -} -impl MNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PWIDTHR { - bits: u8, -} -impl PWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MWIDTHR { - bits: u8, -} -impl MWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PRIOR { - bits: u8, -} -impl PRIOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct M2MR { - bits: bool, -} -impl M2MR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CHENW<'a> { +#[doc = "Reader of register CH4CTL"] +pub type R = crate::R; +#[doc = "Writer for register CH4CTL"] +pub type W = crate::W; +#[doc = "Register CH4CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CH4CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CHEN`"] +pub type CHEN_R = crate::R; +#[doc = "Write proxy for field `CHEN`"] +pub struct CHEN_W<'a> { w: &'a mut W, } -impl<'a> _CHENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIEW<'a> { +#[doc = "Reader of field `FTFIE`"] +pub type FTFIE_R = crate::R; +#[doc = "Write proxy for field `FTFIE`"] +pub struct FTFIE_W<'a> { w: &'a mut W, } -impl<'a> _FTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIEW<'a> { +#[doc = "Reader of field `HTFIE`"] +pub type HTFIE_R = crate::R; +#[doc = "Write proxy for field `HTFIE`"] +pub struct HTFIE_W<'a> { w: &'a mut W, } -impl<'a> _HTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _DIRW<'a> { +#[doc = "Reader of field `DIR`"] +pub type DIR_R = crate::R; +#[doc = "Write proxy for field `DIR`"] +pub struct DIR_W<'a> { w: &'a mut W, } -impl<'a> _DIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CMENW<'a> { +#[doc = "Reader of field `CMEN`"] +pub type CMEN_R = crate::R; +#[doc = "Write proxy for field `CMEN`"] +pub struct CMEN_W<'a> { w: &'a mut W, } -impl<'a> _CMENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _PNAGAW<'a> { +#[doc = "Reader of field `PNAGA`"] +pub type PNAGA_R = crate::R; +#[doc = "Write proxy for field `PNAGA`"] +pub struct PNAGA_W<'a> { w: &'a mut W, } -impl<'a> _PNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _MNAGAW<'a> { +#[doc = "Reader of field `MNAGA`"] +pub type MNAGA_R = crate::R; +#[doc = "Write proxy for field `MNAGA`"] +pub struct MNAGA_W<'a> { w: &'a mut W, } -impl<'a> _MNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _PWIDTHW<'a> { +#[doc = "Reader of field `PWIDTH`"] +pub type PWIDTH_R = crate::R; +#[doc = "Write proxy for field `PWIDTH`"] +pub struct PWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _PWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _MWIDTHW<'a> { +#[doc = "Reader of field `MWIDTH`"] +pub type MWIDTH_R = crate::R; +#[doc = "Write proxy for field `MWIDTH`"] +pub struct MWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _MWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PRIOW<'a> { +#[doc = "Reader of field `PRIO`"] +pub type PRIO_R = crate::R; +#[doc = "Write proxy for field `PRIO`"] +pub struct PRIO_W<'a> { w: &'a mut W, } -impl<'a> _PRIOW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PRIO_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _M2MW<'a> { +#[doc = "Reader of field `M2M`"] +pub type M2M_R = crate::R; +#[doc = "Write proxy for field `M2M`"] +pub struct M2M_W<'a> { w: &'a mut W, } -impl<'a> _M2MW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> M2M_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&self) -> CHENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHENR { bits } + #[inline(always)] + pub fn chen(&self) -> CHEN_R { + CHEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&self) -> FTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIER { bits } + #[inline(always)] + pub fn ftfie(&self) -> FTFIE_R { + FTFIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&self) -> HTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIER { bits } + #[inline(always)] + pub fn htfie(&self) -> HTFIE_R { + HTFIE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&self) -> DIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DIRR { bits } + #[inline(always)] + pub fn dir(&self) -> DIR_R { + DIR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&self) -> CMENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CMENR { bits } + #[inline(always)] + pub fn cmen(&self) -> CMEN_R { + CMEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&self) -> PNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PNAGAR { bits } + #[inline(always)] + pub fn pnaga(&self) -> PNAGA_R { + PNAGA_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&self) -> MNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MNAGAR { bits } + #[inline(always)] + pub fn mnaga(&self) -> MNAGA_R { + MNAGA_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&self) -> PWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PWIDTHR { bits } + #[inline(always)] + pub fn pwidth(&self) -> PWIDTH_R { + PWIDTH_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&self) -> MWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MWIDTHR { bits } + #[inline(always)] + pub fn mwidth(&self) -> MWIDTH_R { + MWIDTH_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&self) -> PRIOR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PRIOR { bits } + #[inline(always)] + pub fn prio(&self) -> PRIO_R { + PRIO_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&self) -> M2MR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - M2MR { bits } + #[inline(always)] + pub fn m2m(&self) -> M2M_R { + M2M_R::new(((self.bits >> 14) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&mut self) -> _CHENW { - _CHENW { w: self } + #[inline(always)] + pub fn chen(&mut self) -> CHEN_W { + CHEN_W { w: self } } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&mut self) -> _FTFIEW { - _FTFIEW { w: self } + #[inline(always)] + pub fn ftfie(&mut self) -> FTFIE_W { + FTFIE_W { w: self } } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&mut self) -> _HTFIEW { - _HTFIEW { w: self } + #[inline(always)] + pub fn htfie(&mut self) -> HTFIE_W { + HTFIE_W { w: self } } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&mut self) -> _DIRW { - _DIRW { w: self } + #[inline(always)] + pub fn dir(&mut self) -> DIR_W { + DIR_W { w: self } } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&mut self) -> _CMENW { - _CMENW { w: self } + #[inline(always)] + pub fn cmen(&mut self) -> CMEN_W { + CMEN_W { w: self } } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&mut self) -> _PNAGAW { - _PNAGAW { w: self } + #[inline(always)] + pub fn pnaga(&mut self) -> PNAGA_W { + PNAGA_W { w: self } } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&mut self) -> _MNAGAW { - _MNAGAW { w: self } + #[inline(always)] + pub fn mnaga(&mut self) -> MNAGA_W { + MNAGA_W { w: self } } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&mut self) -> _PWIDTHW { - _PWIDTHW { w: self } + #[inline(always)] + pub fn pwidth(&mut self) -> PWIDTH_W { + PWIDTH_W { w: self } } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&mut self) -> _MWIDTHW { - _MWIDTHW { w: self } + #[inline(always)] + pub fn mwidth(&mut self) -> MWIDTH_W { + MWIDTH_W { w: self } } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&mut self) -> _PRIOW { - _PRIOW { w: self } + #[inline(always)] + pub fn prio(&mut self) -> PRIO_W { + PRIO_W { w: self } } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&mut self) -> _M2MW { - _M2MW { w: self } + #[inline(always)] + pub fn m2m(&mut self) -> M2M_W { + M2M_W { w: self } } } diff --git a/src/dma0/ch4maddr.rs b/src/dma0/ch4maddr.rs index 64a898d5523f8523a6792bc8b239b61d0b73afcc..f4ba697fd4e099de74c9321437351084ce04a848 100644 --- a/src/dma0/ch4maddr.rs +++ b/src/dma0/ch4maddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH4MADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MADDRR { - bits: u32, -} -impl MADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MADDRW<'a> { +#[doc = "Reader of register CH4MADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH4MADDR"] +pub type W = crate::W; +#[doc = "Register CH4MADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH4MADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MADDR`"] +pub type MADDR_R = crate::R; +#[doc = "Write proxy for field `MADDR`"] +pub struct MADDR_W<'a> { w: &'a mut W, } -impl<'a> _MADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&self) -> MADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - MADDRR { bits } + #[inline(always)] + pub fn maddr(&self) -> MADDR_R { + MADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&mut self) -> _MADDRW { - _MADDRW { w: self } + #[inline(always)] + pub fn maddr(&mut self) -> MADDR_W { + MADDR_W { w: self } } } diff --git a/src/dma0/ch4paddr.rs b/src/dma0/ch4paddr.rs index ce033ecf758aab39531639ec7e9d30579fa12ab4..401eb65c660e1835aeb263670ca0d8f78a0d7da4 100644 --- a/src/dma0/ch4paddr.rs +++ b/src/dma0/ch4paddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH4PADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PADDRR { - bits: u32, -} -impl PADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PADDRW<'a> { +#[doc = "Reader of register CH4PADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH4PADDR"] +pub type W = crate::W; +#[doc = "Register CH4PADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH4PADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PADDR`"] +pub type PADDR_R = crate::R; +#[doc = "Write proxy for field `PADDR`"] +pub struct PADDR_W<'a> { w: &'a mut W, } -impl<'a> _PADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&self) -> PADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - PADDRR { bits } + #[inline(always)] + pub fn paddr(&self) -> PADDR_R { + PADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&mut self) -> _PADDRW { - _PADDRW { w: self } + #[inline(always)] + pub fn paddr(&mut self) -> PADDR_W { + PADDR_W { w: self } } } diff --git a/src/dma0/ch5cnt.rs b/src/dma0/ch5cnt.rs index 68dfcecb371dab6129a79e68a49657732e51463b..ea8ff9d9b0517d3ebab185501ccbb03bde039c22 100644 --- a/src/dma0/ch5cnt.rs +++ b/src/dma0/ch5cnt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH5CNT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CH5CNT"] +pub type R = crate::R; +#[doc = "Writer for register CH5CNT"] +pub type W = crate::W; +#[doc = "Register CH5CNT `reset()`'s with value 0"] +impl crate::ResetValue for super::CH5CNT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/dma0/ch5ctl.rs b/src/dma0/ch5ctl.rs index 24f26db23b920b0a087f78d643e9dfc98ad17c06..48901e01bc2e7aeac273b163b87dd2be929c8f36 100644 --- a/src/dma0/ch5ctl.rs +++ b/src/dma0/ch5ctl.rs @@ -1,718 +1,394 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH5CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CHENR { - bits: bool, -} -impl CHENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIER { - bits: bool, -} -impl FTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIER { - bits: bool, -} -impl HTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DIRR { - bits: bool, -} -impl DIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CMENR { - bits: bool, -} -impl CMENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PNAGAR { - bits: bool, -} -impl PNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MNAGAR { - bits: bool, -} -impl MNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PWIDTHR { - bits: u8, -} -impl PWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MWIDTHR { - bits: u8, -} -impl MWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PRIOR { - bits: u8, -} -impl PRIOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct M2MR { - bits: bool, -} -impl M2MR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CHENW<'a> { +#[doc = "Reader of register CH5CTL"] +pub type R = crate::R; +#[doc = "Writer for register CH5CTL"] +pub type W = crate::W; +#[doc = "Register CH5CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CH5CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CHEN`"] +pub type CHEN_R = crate::R; +#[doc = "Write proxy for field `CHEN`"] +pub struct CHEN_W<'a> { w: &'a mut W, } -impl<'a> _CHENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIEW<'a> { +#[doc = "Reader of field `FTFIE`"] +pub type FTFIE_R = crate::R; +#[doc = "Write proxy for field `FTFIE`"] +pub struct FTFIE_W<'a> { w: &'a mut W, } -impl<'a> _FTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIEW<'a> { +#[doc = "Reader of field `HTFIE`"] +pub type HTFIE_R = crate::R; +#[doc = "Write proxy for field `HTFIE`"] +pub struct HTFIE_W<'a> { w: &'a mut W, } -impl<'a> _HTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _DIRW<'a> { +#[doc = "Reader of field `DIR`"] +pub type DIR_R = crate::R; +#[doc = "Write proxy for field `DIR`"] +pub struct DIR_W<'a> { w: &'a mut W, } -impl<'a> _DIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CMENW<'a> { +#[doc = "Reader of field `CMEN`"] +pub type CMEN_R = crate::R; +#[doc = "Write proxy for field `CMEN`"] +pub struct CMEN_W<'a> { w: &'a mut W, } -impl<'a> _CMENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _PNAGAW<'a> { +#[doc = "Reader of field `PNAGA`"] +pub type PNAGA_R = crate::R; +#[doc = "Write proxy for field `PNAGA`"] +pub struct PNAGA_W<'a> { w: &'a mut W, } -impl<'a> _PNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _MNAGAW<'a> { +#[doc = "Reader of field `MNAGA`"] +pub type MNAGA_R = crate::R; +#[doc = "Write proxy for field `MNAGA`"] +pub struct MNAGA_W<'a> { w: &'a mut W, } -impl<'a> _MNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _PWIDTHW<'a> { +#[doc = "Reader of field `PWIDTH`"] +pub type PWIDTH_R = crate::R; +#[doc = "Write proxy for field `PWIDTH`"] +pub struct PWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _PWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _MWIDTHW<'a> { +#[doc = "Reader of field `MWIDTH`"] +pub type MWIDTH_R = crate::R; +#[doc = "Write proxy for field `MWIDTH`"] +pub struct MWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _MWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PRIOW<'a> { +#[doc = "Reader of field `PRIO`"] +pub type PRIO_R = crate::R; +#[doc = "Write proxy for field `PRIO`"] +pub struct PRIO_W<'a> { w: &'a mut W, } -impl<'a> _PRIOW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PRIO_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _M2MW<'a> { +#[doc = "Reader of field `M2M`"] +pub type M2M_R = crate::R; +#[doc = "Write proxy for field `M2M`"] +pub struct M2M_W<'a> { w: &'a mut W, } -impl<'a> _M2MW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> M2M_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&self) -> CHENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHENR { bits } + #[inline(always)] + pub fn chen(&self) -> CHEN_R { + CHEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&self) -> FTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIER { bits } + #[inline(always)] + pub fn ftfie(&self) -> FTFIE_R { + FTFIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&self) -> HTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIER { bits } + #[inline(always)] + pub fn htfie(&self) -> HTFIE_R { + HTFIE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&self) -> DIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DIRR { bits } + #[inline(always)] + pub fn dir(&self) -> DIR_R { + DIR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&self) -> CMENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CMENR { bits } + #[inline(always)] + pub fn cmen(&self) -> CMEN_R { + CMEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&self) -> PNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PNAGAR { bits } + #[inline(always)] + pub fn pnaga(&self) -> PNAGA_R { + PNAGA_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&self) -> MNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MNAGAR { bits } + #[inline(always)] + pub fn mnaga(&self) -> MNAGA_R { + MNAGA_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&self) -> PWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PWIDTHR { bits } + #[inline(always)] + pub fn pwidth(&self) -> PWIDTH_R { + PWIDTH_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&self) -> MWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MWIDTHR { bits } + #[inline(always)] + pub fn mwidth(&self) -> MWIDTH_R { + MWIDTH_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&self) -> PRIOR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PRIOR { bits } + #[inline(always)] + pub fn prio(&self) -> PRIO_R { + PRIO_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&self) -> M2MR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - M2MR { bits } + #[inline(always)] + pub fn m2m(&self) -> M2M_R { + M2M_R::new(((self.bits >> 14) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&mut self) -> _CHENW { - _CHENW { w: self } + #[inline(always)] + pub fn chen(&mut self) -> CHEN_W { + CHEN_W { w: self } } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&mut self) -> _FTFIEW { - _FTFIEW { w: self } + #[inline(always)] + pub fn ftfie(&mut self) -> FTFIE_W { + FTFIE_W { w: self } } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&mut self) -> _HTFIEW { - _HTFIEW { w: self } + #[inline(always)] + pub fn htfie(&mut self) -> HTFIE_W { + HTFIE_W { w: self } } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&mut self) -> _DIRW { - _DIRW { w: self } + #[inline(always)] + pub fn dir(&mut self) -> DIR_W { + DIR_W { w: self } } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&mut self) -> _CMENW { - _CMENW { w: self } + #[inline(always)] + pub fn cmen(&mut self) -> CMEN_W { + CMEN_W { w: self } } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&mut self) -> _PNAGAW { - _PNAGAW { w: self } + #[inline(always)] + pub fn pnaga(&mut self) -> PNAGA_W { + PNAGA_W { w: self } } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&mut self) -> _MNAGAW { - _MNAGAW { w: self } + #[inline(always)] + pub fn mnaga(&mut self) -> MNAGA_W { + MNAGA_W { w: self } } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&mut self) -> _PWIDTHW { - _PWIDTHW { w: self } + #[inline(always)] + pub fn pwidth(&mut self) -> PWIDTH_W { + PWIDTH_W { w: self } } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&mut self) -> _MWIDTHW { - _MWIDTHW { w: self } + #[inline(always)] + pub fn mwidth(&mut self) -> MWIDTH_W { + MWIDTH_W { w: self } } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&mut self) -> _PRIOW { - _PRIOW { w: self } + #[inline(always)] + pub fn prio(&mut self) -> PRIO_W { + PRIO_W { w: self } } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&mut self) -> _M2MW { - _M2MW { w: self } + #[inline(always)] + pub fn m2m(&mut self) -> M2M_W { + M2M_W { w: self } } } diff --git a/src/dma0/ch5maddr.rs b/src/dma0/ch5maddr.rs index 3d88a9326d74eaad735dd7e13097c282d88b28b7..e148ea2725646cb0104ebcd5140a3a83023cca38 100644 --- a/src/dma0/ch5maddr.rs +++ b/src/dma0/ch5maddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH5MADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MADDRR { - bits: u32, -} -impl MADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MADDRW<'a> { +#[doc = "Reader of register CH5MADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH5MADDR"] +pub type W = crate::W; +#[doc = "Register CH5MADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH5MADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MADDR`"] +pub type MADDR_R = crate::R; +#[doc = "Write proxy for field `MADDR`"] +pub struct MADDR_W<'a> { w: &'a mut W, } -impl<'a> _MADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&self) -> MADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - MADDRR { bits } + #[inline(always)] + pub fn maddr(&self) -> MADDR_R { + MADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&mut self) -> _MADDRW { - _MADDRW { w: self } + #[inline(always)] + pub fn maddr(&mut self) -> MADDR_W { + MADDR_W { w: self } } } diff --git a/src/dma0/ch5paddr.rs b/src/dma0/ch5paddr.rs index 1950333a6137438a124465f0c4142addac864292..3d6bac7552cf6fcf248491ac3ec7bb5f3fee7d9e 100644 --- a/src/dma0/ch5paddr.rs +++ b/src/dma0/ch5paddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH5PADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PADDRR { - bits: u32, -} -impl PADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PADDRW<'a> { +#[doc = "Reader of register CH5PADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH5PADDR"] +pub type W = crate::W; +#[doc = "Register CH5PADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH5PADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PADDR`"] +pub type PADDR_R = crate::R; +#[doc = "Write proxy for field `PADDR`"] +pub struct PADDR_W<'a> { w: &'a mut W, } -impl<'a> _PADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&self) -> PADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - PADDRR { bits } + #[inline(always)] + pub fn paddr(&self) -> PADDR_R { + PADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&mut self) -> _PADDRW { - _PADDRW { w: self } + #[inline(always)] + pub fn paddr(&mut self) -> PADDR_W { + PADDR_W { w: self } } } diff --git a/src/dma0/ch6cnt.rs b/src/dma0/ch6cnt.rs index de128341f6c3f91b403c7ea508454afa244c37eb..167e416beaad82494fd291b90d68b3d6be697fe6 100644 --- a/src/dma0/ch6cnt.rs +++ b/src/dma0/ch6cnt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH6CNT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CH6CNT"] +pub type R = crate::R; +#[doc = "Writer for register CH6CNT"] +pub type W = crate::W; +#[doc = "Register CH6CNT `reset()`'s with value 0"] +impl crate::ResetValue for super::CH6CNT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/dma0/ch6ctl.rs b/src/dma0/ch6ctl.rs index d94fd249c50a2bf59f6e8232eb503fa66089e5d8..49e899ceb452c176b0f7238183e5bbd058aa4612 100644 --- a/src/dma0/ch6ctl.rs +++ b/src/dma0/ch6ctl.rs @@ -1,718 +1,394 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH6CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CHENR { - bits: bool, -} -impl CHENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIER { - bits: bool, -} -impl FTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIER { - bits: bool, -} -impl HTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DIRR { - bits: bool, -} -impl DIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CMENR { - bits: bool, -} -impl CMENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PNAGAR { - bits: bool, -} -impl PNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MNAGAR { - bits: bool, -} -impl MNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PWIDTHR { - bits: u8, -} -impl PWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MWIDTHR { - bits: u8, -} -impl MWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PRIOR { - bits: u8, -} -impl PRIOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct M2MR { - bits: bool, -} -impl M2MR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CHENW<'a> { +#[doc = "Reader of register CH6CTL"] +pub type R = crate::R; +#[doc = "Writer for register CH6CTL"] +pub type W = crate::W; +#[doc = "Register CH6CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CH6CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CHEN`"] +pub type CHEN_R = crate::R; +#[doc = "Write proxy for field `CHEN`"] +pub struct CHEN_W<'a> { w: &'a mut W, } -impl<'a> _CHENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIEW<'a> { +#[doc = "Reader of field `FTFIE`"] +pub type FTFIE_R = crate::R; +#[doc = "Write proxy for field `FTFIE`"] +pub struct FTFIE_W<'a> { w: &'a mut W, } -impl<'a> _FTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIEW<'a> { +#[doc = "Reader of field `HTFIE`"] +pub type HTFIE_R = crate::R; +#[doc = "Write proxy for field `HTFIE`"] +pub struct HTFIE_W<'a> { w: &'a mut W, } -impl<'a> _HTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _DIRW<'a> { +#[doc = "Reader of field `DIR`"] +pub type DIR_R = crate::R; +#[doc = "Write proxy for field `DIR`"] +pub struct DIR_W<'a> { w: &'a mut W, } -impl<'a> _DIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CMENW<'a> { +#[doc = "Reader of field `CMEN`"] +pub type CMEN_R = crate::R; +#[doc = "Write proxy for field `CMEN`"] +pub struct CMEN_W<'a> { w: &'a mut W, } -impl<'a> _CMENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _PNAGAW<'a> { +#[doc = "Reader of field `PNAGA`"] +pub type PNAGA_R = crate::R; +#[doc = "Write proxy for field `PNAGA`"] +pub struct PNAGA_W<'a> { w: &'a mut W, } -impl<'a> _PNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _MNAGAW<'a> { +#[doc = "Reader of field `MNAGA`"] +pub type MNAGA_R = crate::R; +#[doc = "Write proxy for field `MNAGA`"] +pub struct MNAGA_W<'a> { w: &'a mut W, } -impl<'a> _MNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _PWIDTHW<'a> { +#[doc = "Reader of field `PWIDTH`"] +pub type PWIDTH_R = crate::R; +#[doc = "Write proxy for field `PWIDTH`"] +pub struct PWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _PWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _MWIDTHW<'a> { +#[doc = "Reader of field `MWIDTH`"] +pub type MWIDTH_R = crate::R; +#[doc = "Write proxy for field `MWIDTH`"] +pub struct MWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _MWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PRIOW<'a> { +#[doc = "Reader of field `PRIO`"] +pub type PRIO_R = crate::R; +#[doc = "Write proxy for field `PRIO`"] +pub struct PRIO_W<'a> { w: &'a mut W, } -impl<'a> _PRIOW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PRIO_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _M2MW<'a> { +#[doc = "Reader of field `M2M`"] +pub type M2M_R = crate::R; +#[doc = "Write proxy for field `M2M`"] +pub struct M2M_W<'a> { w: &'a mut W, } -impl<'a> _M2MW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> M2M_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&self) -> CHENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHENR { bits } + #[inline(always)] + pub fn chen(&self) -> CHEN_R { + CHEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&self) -> FTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIER { bits } + #[inline(always)] + pub fn ftfie(&self) -> FTFIE_R { + FTFIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&self) -> HTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIER { bits } + #[inline(always)] + pub fn htfie(&self) -> HTFIE_R { + HTFIE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&self) -> DIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DIRR { bits } + #[inline(always)] + pub fn dir(&self) -> DIR_R { + DIR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&self) -> CMENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CMENR { bits } + #[inline(always)] + pub fn cmen(&self) -> CMEN_R { + CMEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&self) -> PNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PNAGAR { bits } + #[inline(always)] + pub fn pnaga(&self) -> PNAGA_R { + PNAGA_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&self) -> MNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MNAGAR { bits } + #[inline(always)] + pub fn mnaga(&self) -> MNAGA_R { + MNAGA_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&self) -> PWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PWIDTHR { bits } + #[inline(always)] + pub fn pwidth(&self) -> PWIDTH_R { + PWIDTH_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&self) -> MWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MWIDTHR { bits } + #[inline(always)] + pub fn mwidth(&self) -> MWIDTH_R { + MWIDTH_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&self) -> PRIOR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PRIOR { bits } + #[inline(always)] + pub fn prio(&self) -> PRIO_R { + PRIO_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&self) -> M2MR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - M2MR { bits } + #[inline(always)] + pub fn m2m(&self) -> M2M_R { + M2M_R::new(((self.bits >> 14) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&mut self) -> _CHENW { - _CHENW { w: self } + #[inline(always)] + pub fn chen(&mut self) -> CHEN_W { + CHEN_W { w: self } } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&mut self) -> _FTFIEW { - _FTFIEW { w: self } + #[inline(always)] + pub fn ftfie(&mut self) -> FTFIE_W { + FTFIE_W { w: self } } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&mut self) -> _HTFIEW { - _HTFIEW { w: self } + #[inline(always)] + pub fn htfie(&mut self) -> HTFIE_W { + HTFIE_W { w: self } } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&mut self) -> _DIRW { - _DIRW { w: self } + #[inline(always)] + pub fn dir(&mut self) -> DIR_W { + DIR_W { w: self } } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&mut self) -> _CMENW { - _CMENW { w: self } + #[inline(always)] + pub fn cmen(&mut self) -> CMEN_W { + CMEN_W { w: self } } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&mut self) -> _PNAGAW { - _PNAGAW { w: self } + #[inline(always)] + pub fn pnaga(&mut self) -> PNAGA_W { + PNAGA_W { w: self } } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&mut self) -> _MNAGAW { - _MNAGAW { w: self } + #[inline(always)] + pub fn mnaga(&mut self) -> MNAGA_W { + MNAGA_W { w: self } } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&mut self) -> _PWIDTHW { - _PWIDTHW { w: self } + #[inline(always)] + pub fn pwidth(&mut self) -> PWIDTH_W { + PWIDTH_W { w: self } } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&mut self) -> _MWIDTHW { - _MWIDTHW { w: self } + #[inline(always)] + pub fn mwidth(&mut self) -> MWIDTH_W { + MWIDTH_W { w: self } } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&mut self) -> _PRIOW { - _PRIOW { w: self } + #[inline(always)] + pub fn prio(&mut self) -> PRIO_W { + PRIO_W { w: self } } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&mut self) -> _M2MW { - _M2MW { w: self } + #[inline(always)] + pub fn m2m(&mut self) -> M2M_W { + M2M_W { w: self } } } diff --git a/src/dma0/ch6maddr.rs b/src/dma0/ch6maddr.rs index db62182ad7ed6d642b811051fb32547ff3d9f0bf..0b44bfc6a9760eba23b2ed6f7b444a92b97b9934 100644 --- a/src/dma0/ch6maddr.rs +++ b/src/dma0/ch6maddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH6MADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MADDRR { - bits: u32, -} -impl MADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MADDRW<'a> { +#[doc = "Reader of register CH6MADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH6MADDR"] +pub type W = crate::W; +#[doc = "Register CH6MADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH6MADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MADDR`"] +pub type MADDR_R = crate::R; +#[doc = "Write proxy for field `MADDR`"] +pub struct MADDR_W<'a> { w: &'a mut W, } -impl<'a> _MADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&self) -> MADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - MADDRR { bits } + #[inline(always)] + pub fn maddr(&self) -> MADDR_R { + MADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&mut self) -> _MADDRW { - _MADDRW { w: self } + #[inline(always)] + pub fn maddr(&mut self) -> MADDR_W { + MADDR_W { w: self } } } diff --git a/src/dma0/ch6paddr.rs b/src/dma0/ch6paddr.rs index f170335dfd2fcf27d0aa78ffffe9641d040ee537..2be0f69427fb97243bfe190d1fde5441bb23de10 100644 --- a/src/dma0/ch6paddr.rs +++ b/src/dma0/ch6paddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH6PADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PADDRR { - bits: u32, -} -impl PADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PADDRW<'a> { +#[doc = "Reader of register CH6PADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH6PADDR"] +pub type W = crate::W; +#[doc = "Register CH6PADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH6PADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PADDR`"] +pub type PADDR_R = crate::R; +#[doc = "Write proxy for field `PADDR`"] +pub struct PADDR_W<'a> { w: &'a mut W, } -impl<'a> _PADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&self) -> PADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - PADDRR { bits } + #[inline(always)] + pub fn paddr(&self) -> PADDR_R { + PADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&mut self) -> _PADDRW { - _PADDRW { w: self } + #[inline(always)] + pub fn paddr(&mut self) -> PADDR_W { + PADDR_W { w: self } } } diff --git a/src/dma0/intc.rs b/src/dma0/intc.rs index ca0dfff9f9e914dcdb91dcf342c5a652dc98f7ee..117b16e4ac2a10093d8e93442ecac1e75e0a0cea 100644 --- a/src/dma0/intc.rs +++ b/src/dma0/intc.rs @@ -1,813 +1,768 @@ -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::INTC { - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } -} -#[doc = r" Proxy"] -pub struct _GIFC0W<'a> { +#[doc = "Writer for register INTC"] +pub type W = crate::W; +#[doc = "Register INTC `reset()`'s with value 0"] +impl crate::ResetValue for super::INTC { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Write proxy for field `GIFC0`"] +pub struct GIFC0_W<'a> { w: &'a mut W, } -impl<'a> _GIFC0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> GIFC0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIFC0W<'a> { +#[doc = "Write proxy for field `FTFIFC0`"] +pub struct FTFIFC0_W<'a> { w: &'a mut W, } -impl<'a> _FTFIFC0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIFC0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIFC0W<'a> { +#[doc = "Write proxy for field `HTFIFC0`"] +pub struct HTFIFC0_W<'a> { w: &'a mut W, } -impl<'a> _HTFIFC0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIFC0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIFC0W<'a> { +#[doc = "Write proxy for field `ERRIFC0`"] +pub struct ERRIFC0_W<'a> { w: &'a mut W, } -impl<'a> _ERRIFC0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIFC0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _GIFC1W<'a> { +#[doc = "Write proxy for field `GIFC1`"] +pub struct GIFC1_W<'a> { w: &'a mut W, } -impl<'a> _GIFC1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> GIFC1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIFC1W<'a> { +#[doc = "Write proxy for field `FTFIFC1`"] +pub struct FTFIFC1_W<'a> { w: &'a mut W, } -impl<'a> _FTFIFC1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIFC1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIFC1W<'a> { +#[doc = "Write proxy for field `HTFIFC1`"] +pub struct HTFIFC1_W<'a> { w: &'a mut W, } -impl<'a> _HTFIFC1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIFC1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIFC1W<'a> { +#[doc = "Write proxy for field `ERRIFC1`"] +pub struct ERRIFC1_W<'a> { w: &'a mut W, } -impl<'a> _ERRIFC1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIFC1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _GIFC2W<'a> { +#[doc = "Write proxy for field `GIFC2`"] +pub struct GIFC2_W<'a> { w: &'a mut W, } -impl<'a> _GIFC2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> GIFC2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIFC2W<'a> { +#[doc = "Write proxy for field `FTFIFC2`"] +pub struct FTFIFC2_W<'a> { w: &'a mut W, } -impl<'a> _FTFIFC2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIFC2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIFC2W<'a> { +#[doc = "Write proxy for field `HTFIFC2`"] +pub struct HTFIFC2_W<'a> { w: &'a mut W, } -impl<'a> _HTFIFC2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIFC2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIFC2W<'a> { +#[doc = "Write proxy for field `ERRIFC2`"] +pub struct ERRIFC2_W<'a> { w: &'a mut W, } -impl<'a> _ERRIFC2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIFC2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _GIFC3W<'a> { +#[doc = "Write proxy for field `GIFC3`"] +pub struct GIFC3_W<'a> { w: &'a mut W, } -impl<'a> _GIFC3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> GIFC3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIFC3W<'a> { +#[doc = "Write proxy for field `FTFIFC3`"] +pub struct FTFIFC3_W<'a> { w: &'a mut W, } -impl<'a> _FTFIFC3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIFC3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIFC3W<'a> { +#[doc = "Write proxy for field `HTFIFC3`"] +pub struct HTFIFC3_W<'a> { w: &'a mut W, } -impl<'a> _HTFIFC3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIFC3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIFC3W<'a> { +#[doc = "Write proxy for field `ERRIFC3`"] +pub struct ERRIFC3_W<'a> { w: &'a mut W, } -impl<'a> _ERRIFC3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIFC3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _GIFC4W<'a> { +#[doc = "Write proxy for field `GIFC4`"] +pub struct GIFC4_W<'a> { w: &'a mut W, } -impl<'a> _GIFC4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> GIFC4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIFC4W<'a> { +#[doc = "Write proxy for field `FTFIFC4`"] +pub struct FTFIFC4_W<'a> { w: &'a mut W, } -impl<'a> _FTFIFC4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIFC4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIFC4W<'a> { +#[doc = "Write proxy for field `HTFIFC4`"] +pub struct HTFIFC4_W<'a> { w: &'a mut W, } -impl<'a> _HTFIFC4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIFC4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIFC4W<'a> { +#[doc = "Write proxy for field `ERRIFC4`"] +pub struct ERRIFC4_W<'a> { w: &'a mut W, } -impl<'a> _ERRIFC4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIFC4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _GIFC5W<'a> { +#[doc = "Write proxy for field `GIFC5`"] +pub struct GIFC5_W<'a> { w: &'a mut W, } -impl<'a> _GIFC5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> GIFC5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIFC5W<'a> { +#[doc = "Write proxy for field `FTFIFC5`"] +pub struct FTFIFC5_W<'a> { w: &'a mut W, } -impl<'a> _FTFIFC5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIFC5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIFC5W<'a> { +#[doc = "Write proxy for field `HTFIFC5`"] +pub struct HTFIFC5_W<'a> { w: &'a mut W, } -impl<'a> _HTFIFC5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIFC5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIFC5W<'a> { +#[doc = "Write proxy for field `ERRIFC5`"] +pub struct ERRIFC5_W<'a> { w: &'a mut W, } -impl<'a> _ERRIFC5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIFC5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _GIFC6W<'a> { +#[doc = "Write proxy for field `GIFC6`"] +pub struct GIFC6_W<'a> { w: &'a mut W, } -impl<'a> _GIFC6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> GIFC6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIFC6W<'a> { +#[doc = "Write proxy for field `FTFIFC6`"] +pub struct FTFIFC6_W<'a> { w: &'a mut W, } -impl<'a> _FTFIFC6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIFC6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIFC6W<'a> { +#[doc = "Write proxy for field `HTFIFC6`"] +pub struct HTFIFC6_W<'a> { w: &'a mut W, } -impl<'a> _HTFIFC6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIFC6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIFC6W<'a> { +#[doc = "Write proxy for field `ERRIFC6`"] +pub struct ERRIFC6_W<'a> { w: &'a mut W, } -impl<'a> _ERRIFC6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIFC6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Clear global interrupt flag of channel 0"] - #[inline] - pub fn gifc0(&mut self) -> _GIFC0W { - _GIFC0W { w: self } + #[inline(always)] + pub fn gifc0(&mut self) -> GIFC0_W { + GIFC0_W { w: self } } #[doc = "Bit 1 - Clear bit for full transfer finish flag of channel 0"] - #[inline] - pub fn ftfifc0(&mut self) -> _FTFIFC0W { - _FTFIFC0W { w: self } + #[inline(always)] + pub fn ftfifc0(&mut self) -> FTFIFC0_W { + FTFIFC0_W { w: self } } #[doc = "Bit 2 - Clear bit for half transfer finish flag of channel 0"] - #[inline] - pub fn htfifc0(&mut self) -> _HTFIFC0W { - _HTFIFC0W { w: self } + #[inline(always)] + pub fn htfifc0(&mut self) -> HTFIFC0_W { + HTFIFC0_W { w: self } } #[doc = "Bit 3 - Clear bit for error flag of channel 0"] - #[inline] - pub fn errifc0(&mut self) -> _ERRIFC0W { - _ERRIFC0W { w: self } + #[inline(always)] + pub fn errifc0(&mut self) -> ERRIFC0_W { + ERRIFC0_W { w: self } } #[doc = "Bit 4 - Clear global interrupt flag of channel 1"] - #[inline] - pub fn gifc1(&mut self) -> _GIFC1W { - _GIFC1W { w: self } + #[inline(always)] + pub fn gifc1(&mut self) -> GIFC1_W { + GIFC1_W { w: self } } #[doc = "Bit 5 - Clear bit for full transfer finish flag of channel 1"] - #[inline] - pub fn ftfifc1(&mut self) -> _FTFIFC1W { - _FTFIFC1W { w: self } + #[inline(always)] + pub fn ftfifc1(&mut self) -> FTFIFC1_W { + FTFIFC1_W { w: self } } #[doc = "Bit 6 - Clear bit for half transfer finish flag of channel 1"] - #[inline] - pub fn htfifc1(&mut self) -> _HTFIFC1W { - _HTFIFC1W { w: self } + #[inline(always)] + pub fn htfifc1(&mut self) -> HTFIFC1_W { + HTFIFC1_W { w: self } } #[doc = "Bit 7 - Clear bit for error flag of channel 1"] - #[inline] - pub fn errifc1(&mut self) -> _ERRIFC1W { - _ERRIFC1W { w: self } + #[inline(always)] + pub fn errifc1(&mut self) -> ERRIFC1_W { + ERRIFC1_W { w: self } } #[doc = "Bit 8 - Clear global interrupt flag of channel 2"] - #[inline] - pub fn gifc2(&mut self) -> _GIFC2W { - _GIFC2W { w: self } + #[inline(always)] + pub fn gifc2(&mut self) -> GIFC2_W { + GIFC2_W { w: self } } #[doc = "Bit 9 - Clear bit for full transfer finish flag of channel 2"] - #[inline] - pub fn ftfifc2(&mut self) -> _FTFIFC2W { - _FTFIFC2W { w: self } + #[inline(always)] + pub fn ftfifc2(&mut self) -> FTFIFC2_W { + FTFIFC2_W { w: self } } #[doc = "Bit 10 - Clear bit for half transfer finish flag of channel 2"] - #[inline] - pub fn htfifc2(&mut self) -> _HTFIFC2W { - _HTFIFC2W { w: self } + #[inline(always)] + pub fn htfifc2(&mut self) -> HTFIFC2_W { + HTFIFC2_W { w: self } } #[doc = "Bit 11 - Clear bit for error flag of channel 2"] - #[inline] - pub fn errifc2(&mut self) -> _ERRIFC2W { - _ERRIFC2W { w: self } + #[inline(always)] + pub fn errifc2(&mut self) -> ERRIFC2_W { + ERRIFC2_W { w: self } } #[doc = "Bit 12 - Clear global interrupt flag of channel 3"] - #[inline] - pub fn gifc3(&mut self) -> _GIFC3W { - _GIFC3W { w: self } + #[inline(always)] + pub fn gifc3(&mut self) -> GIFC3_W { + GIFC3_W { w: self } } #[doc = "Bit 13 - Clear bit for full transfer finish flag of channel 3"] - #[inline] - pub fn ftfifc3(&mut self) -> _FTFIFC3W { - _FTFIFC3W { w: self } + #[inline(always)] + pub fn ftfifc3(&mut self) -> FTFIFC3_W { + FTFIFC3_W { w: self } } #[doc = "Bit 14 - Clear bit for half transfer finish flag of channel 3"] - #[inline] - pub fn htfifc3(&mut self) -> _HTFIFC3W { - _HTFIFC3W { w: self } + #[inline(always)] + pub fn htfifc3(&mut self) -> HTFIFC3_W { + HTFIFC3_W { w: self } } #[doc = "Bit 15 - Clear bit for error flag of channel 3"] - #[inline] - pub fn errifc3(&mut self) -> _ERRIFC3W { - _ERRIFC3W { w: self } + #[inline(always)] + pub fn errifc3(&mut self) -> ERRIFC3_W { + ERRIFC3_W { w: self } } #[doc = "Bit 16 - Clear global interrupt flag of channel 4"] - #[inline] - pub fn gifc4(&mut self) -> _GIFC4W { - _GIFC4W { w: self } + #[inline(always)] + pub fn gifc4(&mut self) -> GIFC4_W { + GIFC4_W { w: self } } #[doc = "Bit 17 - Clear bit for full transfer finish flag of channel 4"] - #[inline] - pub fn ftfifc4(&mut self) -> _FTFIFC4W { - _FTFIFC4W { w: self } + #[inline(always)] + pub fn ftfifc4(&mut self) -> FTFIFC4_W { + FTFIFC4_W { w: self } } #[doc = "Bit 18 - Clear bit for half transfer finish flag of channel 4"] - #[inline] - pub fn htfifc4(&mut self) -> _HTFIFC4W { - _HTFIFC4W { w: self } + #[inline(always)] + pub fn htfifc4(&mut self) -> HTFIFC4_W { + HTFIFC4_W { w: self } } #[doc = "Bit 19 - Clear bit for error flag of channel 4"] - #[inline] - pub fn errifc4(&mut self) -> _ERRIFC4W { - _ERRIFC4W { w: self } + #[inline(always)] + pub fn errifc4(&mut self) -> ERRIFC4_W { + ERRIFC4_W { w: self } } #[doc = "Bit 20 - Clear global interrupt flag of channel 5"] - #[inline] - pub fn gifc5(&mut self) -> _GIFC5W { - _GIFC5W { w: self } + #[inline(always)] + pub fn gifc5(&mut self) -> GIFC5_W { + GIFC5_W { w: self } } #[doc = "Bit 21 - Clear bit for full transfer finish flag of channel 5"] - #[inline] - pub fn ftfifc5(&mut self) -> _FTFIFC5W { - _FTFIFC5W { w: self } + #[inline(always)] + pub fn ftfifc5(&mut self) -> FTFIFC5_W { + FTFIFC5_W { w: self } } #[doc = "Bit 22 - Clear bit for half transfer finish flag of channel 5"] - #[inline] - pub fn htfifc5(&mut self) -> _HTFIFC5W { - _HTFIFC5W { w: self } + #[inline(always)] + pub fn htfifc5(&mut self) -> HTFIFC5_W { + HTFIFC5_W { w: self } } #[doc = "Bit 23 - Clear bit for error flag of channel 5"] - #[inline] - pub fn errifc5(&mut self) -> _ERRIFC5W { - _ERRIFC5W { w: self } + #[inline(always)] + pub fn errifc5(&mut self) -> ERRIFC5_W { + ERRIFC5_W { w: self } } #[doc = "Bit 24 - Clear global interrupt flag of channel 6"] - #[inline] - pub fn gifc6(&mut self) -> _GIFC6W { - _GIFC6W { w: self } + #[inline(always)] + pub fn gifc6(&mut self) -> GIFC6_W { + GIFC6_W { w: self } } #[doc = "Bit 25 - Clear bit for full transfer finish flag of channel 6"] - #[inline] - pub fn ftfifc6(&mut self) -> _FTFIFC6W { - _FTFIFC6W { w: self } + #[inline(always)] + pub fn ftfifc6(&mut self) -> FTFIFC6_W { + FTFIFC6_W { w: self } } #[doc = "Bit 26 - Clear bit for half transfer finish flag of channel 6"] - #[inline] - pub fn htfifc6(&mut self) -> _HTFIFC6W { - _HTFIFC6W { w: self } + #[inline(always)] + pub fn htfifc6(&mut self) -> HTFIFC6_W { + HTFIFC6_W { w: self } } #[doc = "Bit 27 - Clear bit for error flag of channel 6"] - #[inline] - pub fn errifc6(&mut self) -> _ERRIFC6W { - _ERRIFC6W { w: self } + #[inline(always)] + pub fn errifc6(&mut self) -> ERRIFC6_W { + ERRIFC6_W { w: self } } } diff --git a/src/dma0/intf.rs b/src/dma0/intf.rs index ae8ec0deb25d555b87d3bb9ba81c68dad0ddf3d7..8cd7f9b5e6864253e0f9d82afdb29b8829eb939e 100644 --- a/src/dma0/intf.rs +++ b/src/dma0/intf.rs @@ -1,888 +1,200 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::INTF { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct GIF0R { - bits: bool, -} -impl GIF0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIF0R { - bits: bool, -} -impl FTFIF0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIF0R { - bits: bool, -} -impl HTFIF0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIF0R { - bits: bool, -} -impl ERRIF0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GIF1R { - bits: bool, -} -impl GIF1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIF1R { - bits: bool, -} -impl FTFIF1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIF1R { - bits: bool, -} -impl HTFIF1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIF1R { - bits: bool, -} -impl ERRIF1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GIF2R { - bits: bool, -} -impl GIF2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIF2R { - bits: bool, -} -impl FTFIF2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIF2R { - bits: bool, -} -impl HTFIF2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIF2R { - bits: bool, -} -impl ERRIF2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GIF3R { - bits: bool, -} -impl GIF3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIF3R { - bits: bool, -} -impl FTFIF3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIF3R { - bits: bool, -} -impl HTFIF3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIF3R { - bits: bool, -} -impl ERRIF3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GIF4R { - bits: bool, -} -impl GIF4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIF4R { - bits: bool, -} -impl FTFIF4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIF4R { - bits: bool, -} -impl HTFIF4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIF4R { - bits: bool, -} -impl ERRIF4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GIF5R { - bits: bool, -} -impl GIF5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIF5R { - bits: bool, -} -impl FTFIF5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIF5R { - bits: bool, -} -impl HTFIF5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIF5R { - bits: bool, -} -impl ERRIF5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GIF6R { - bits: bool, -} -impl GIF6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIF6R { - bits: bool, -} -impl FTFIF6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIF6R { - bits: bool, -} -impl HTFIF6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIF6R { - bits: bool, -} -impl ERRIF6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} +#[doc = "Reader of register INTF"] +pub type R = crate::R; +#[doc = "Reader of field `GIF0`"] +pub type GIF0_R = crate::R; +#[doc = "Reader of field `FTFIF0`"] +pub type FTFIF0_R = crate::R; +#[doc = "Reader of field `HTFIF0`"] +pub type HTFIF0_R = crate::R; +#[doc = "Reader of field `ERRIF0`"] +pub type ERRIF0_R = crate::R; +#[doc = "Reader of field `GIF1`"] +pub type GIF1_R = crate::R; +#[doc = "Reader of field `FTFIF1`"] +pub type FTFIF1_R = crate::R; +#[doc = "Reader of field `HTFIF1`"] +pub type HTFIF1_R = crate::R; +#[doc = "Reader of field `ERRIF1`"] +pub type ERRIF1_R = crate::R; +#[doc = "Reader of field `GIF2`"] +pub type GIF2_R = crate::R; +#[doc = "Reader of field `FTFIF2`"] +pub type FTFIF2_R = crate::R; +#[doc = "Reader of field `HTFIF2`"] +pub type HTFIF2_R = crate::R; +#[doc = "Reader of field `ERRIF2`"] +pub type ERRIF2_R = crate::R; +#[doc = "Reader of field `GIF3`"] +pub type GIF3_R = crate::R; +#[doc = "Reader of field `FTFIF3`"] +pub type FTFIF3_R = crate::R; +#[doc = "Reader of field `HTFIF3`"] +pub type HTFIF3_R = crate::R; +#[doc = "Reader of field `ERRIF3`"] +pub type ERRIF3_R = crate::R; +#[doc = "Reader of field `GIF4`"] +pub type GIF4_R = crate::R; +#[doc = "Reader of field `FTFIF4`"] +pub type FTFIF4_R = crate::R; +#[doc = "Reader of field `HTFIF4`"] +pub type HTFIF4_R = crate::R; +#[doc = "Reader of field `ERRIF4`"] +pub type ERRIF4_R = crate::R; +#[doc = "Reader of field `GIF5`"] +pub type GIF5_R = crate::R; +#[doc = "Reader of field `FTFIF5`"] +pub type FTFIF5_R = crate::R; +#[doc = "Reader of field `HTFIF5`"] +pub type HTFIF5_R = crate::R; +#[doc = "Reader of field `ERRIF5`"] +pub type ERRIF5_R = crate::R; +#[doc = "Reader of field `GIF6`"] +pub type GIF6_R = crate::R; +#[doc = "Reader of field `FTFIF6`"] +pub type FTFIF6_R = crate::R; +#[doc = "Reader of field `HTFIF6`"] +pub type HTFIF6_R = crate::R; +#[doc = "Reader of field `ERRIF6`"] +pub type ERRIF6_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Global interrupt flag of channel 0"] - #[inline] - pub fn gif0(&self) -> GIF0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GIF0R { bits } + #[inline(always)] + pub fn gif0(&self) -> GIF0_R { + GIF0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Full Transfer finish flag of channe 0"] - #[inline] - pub fn ftfif0(&self) -> FTFIF0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIF0R { bits } + #[inline(always)] + pub fn ftfif0(&self) -> FTFIF0_R { + FTFIF0_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Half transfer finish flag of channel 0"] - #[inline] - pub fn htfif0(&self) -> HTFIF0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIF0R { bits } + #[inline(always)] + pub fn htfif0(&self) -> HTFIF0_R { + HTFIF0_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Error flag of channel 0"] - #[inline] - pub fn errif0(&self) -> ERRIF0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIF0R { bits } + #[inline(always)] + pub fn errif0(&self) -> ERRIF0_R { + ERRIF0_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Global interrupt flag of channel 1"] - #[inline] - pub fn gif1(&self) -> GIF1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GIF1R { bits } + #[inline(always)] + pub fn gif1(&self) -> GIF1_R { + GIF1_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Full Transfer finish flag of channe 1"] - #[inline] - pub fn ftfif1(&self) -> FTFIF1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIF1R { bits } + #[inline(always)] + pub fn ftfif1(&self) -> FTFIF1_R { + FTFIF1_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Half transfer finish flag of channel 1"] - #[inline] - pub fn htfif1(&self) -> HTFIF1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIF1R { bits } + #[inline(always)] + pub fn htfif1(&self) -> HTFIF1_R { + HTFIF1_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Error flag of channel 1"] - #[inline] - pub fn errif1(&self) -> ERRIF1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIF1R { bits } + #[inline(always)] + pub fn errif1(&self) -> ERRIF1_R { + ERRIF1_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Global interrupt flag of channel 2"] - #[inline] - pub fn gif2(&self) -> GIF2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GIF2R { bits } + #[inline(always)] + pub fn gif2(&self) -> GIF2_R { + GIF2_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Full Transfer finish flag of channe 2"] - #[inline] - pub fn ftfif2(&self) -> FTFIF2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIF2R { bits } + #[inline(always)] + pub fn ftfif2(&self) -> FTFIF2_R { + FTFIF2_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Half transfer finish flag of channel 2"] - #[inline] - pub fn htfif2(&self) -> HTFIF2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIF2R { bits } + #[inline(always)] + pub fn htfif2(&self) -> HTFIF2_R { + HTFIF2_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Error flag of channel 2"] - #[inline] - pub fn errif2(&self) -> ERRIF2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIF2R { bits } + #[inline(always)] + pub fn errif2(&self) -> ERRIF2_R { + ERRIF2_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Global interrupt flag of channel 3"] - #[inline] - pub fn gif3(&self) -> GIF3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GIF3R { bits } + #[inline(always)] + pub fn gif3(&self) -> GIF3_R { + GIF3_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Full Transfer finish flag of channe 3"] - #[inline] - pub fn ftfif3(&self) -> FTFIF3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIF3R { bits } + #[inline(always)] + pub fn ftfif3(&self) -> FTFIF3_R { + FTFIF3_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Half transfer finish flag of channel 3"] - #[inline] - pub fn htfif3(&self) -> HTFIF3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIF3R { bits } + #[inline(always)] + pub fn htfif3(&self) -> HTFIF3_R { + HTFIF3_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Error flag of channel 3"] - #[inline] - pub fn errif3(&self) -> ERRIF3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIF3R { bits } + #[inline(always)] + pub fn errif3(&self) -> ERRIF3_R { + ERRIF3_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Global interrupt flag of channel 4"] - #[inline] - pub fn gif4(&self) -> GIF4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GIF4R { bits } + #[inline(always)] + pub fn gif4(&self) -> GIF4_R { + GIF4_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Full Transfer finish flag of channe 4"] - #[inline] - pub fn ftfif4(&self) -> FTFIF4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIF4R { bits } + #[inline(always)] + pub fn ftfif4(&self) -> FTFIF4_R { + FTFIF4_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Half transfer finish flag of channel 4"] - #[inline] - pub fn htfif4(&self) -> HTFIF4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIF4R { bits } + #[inline(always)] + pub fn htfif4(&self) -> HTFIF4_R { + HTFIF4_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Error flag of channel 4"] - #[inline] - pub fn errif4(&self) -> ERRIF4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIF4R { bits } + #[inline(always)] + pub fn errif4(&self) -> ERRIF4_R { + ERRIF4_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Global interrupt flag of channel 5"] - #[inline] - pub fn gif5(&self) -> GIF5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GIF5R { bits } + #[inline(always)] + pub fn gif5(&self) -> GIF5_R { + GIF5_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - Full Transfer finish flag of channe 5"] - #[inline] - pub fn ftfif5(&self) -> FTFIF5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIF5R { bits } + #[inline(always)] + pub fn ftfif5(&self) -> FTFIF5_R { + FTFIF5_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - Half transfer finish flag of channel 5"] - #[inline] - pub fn htfif5(&self) -> HTFIF5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIF5R { bits } + #[inline(always)] + pub fn htfif5(&self) -> HTFIF5_R { + HTFIF5_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 23 - Error flag of channel 5"] - #[inline] - pub fn errif5(&self) -> ERRIF5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 23; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIF5R { bits } + #[inline(always)] + pub fn errif5(&self) -> ERRIF5_R { + ERRIF5_R::new(((self.bits >> 23) & 0x01) != 0) } #[doc = "Bit 24 - Global interrupt flag of channel 6"] - #[inline] - pub fn gif6(&self) -> GIF6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GIF6R { bits } + #[inline(always)] + pub fn gif6(&self) -> GIF6_R { + GIF6_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Full Transfer finish flag of channe 6"] - #[inline] - pub fn ftfif6(&self) -> FTFIF6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIF6R { bits } + #[inline(always)] + pub fn ftfif6(&self) -> FTFIF6_R { + FTFIF6_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Half transfer finish flag of channel 6"] - #[inline] - pub fn htfif6(&self) -> HTFIF6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIF6R { bits } + #[inline(always)] + pub fn htfif6(&self) -> HTFIF6_R { + HTFIF6_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Error flag of channel 6"] - #[inline] - pub fn errif6(&self) -> ERRIF6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIF6R { bits } + #[inline(always)] + pub fn errif6(&self) -> ERRIF6_R { + ERRIF6_R::new(((self.bits >> 27) & 0x01) != 0) } } diff --git a/src/dma1.rs b/src/dma1.rs index 41c33c5ebe65ba9e16762ad4b0bb4e6958c8adb0..99ce25206c365e7a26113fcd690c8c3b4070f738 100644 --- a/src/dma1.rs +++ b/src/dma1.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Interrupt flag register"] @@ -13,7 +13,7 @@ pub struct RegisterBlock { pub ch0paddr: CH0PADDR, #[doc = "0x14 - Channel 0 memory base address register"] pub ch0maddr: CH0MADDR, - _reserved0: [u8; 4usize], + _reserved6: [u8; 4usize], #[doc = "0x1c - Channel 1 control register"] pub ch1ctl: CH1CTL, #[doc = "0x20 - Channel 1 counter register"] @@ -22,7 +22,7 @@ pub struct RegisterBlock { pub ch1paddr: CH1PADDR, #[doc = "0x28 - Channel 1 memory base address register"] pub ch1maddr: CH1MADDR, - _reserved1: [u8; 4usize], + _reserved10: [u8; 4usize], #[doc = "0x30 - Channel 2 control register"] pub ch2ctl: CH2CTL, #[doc = "0x34 - Channel 2 counter register"] @@ -31,7 +31,7 @@ pub struct RegisterBlock { pub ch2paddr: CH2PADDR, #[doc = "0x3c - Channel 2 memory base address register"] pub ch2maddr: CH2MADDR, - _reserved2: [u8; 4usize], + _reserved14: [u8; 4usize], #[doc = "0x44 - Channel 3 control register"] pub ch3ctl: CH3CTL, #[doc = "0x48 - Channel 3 counter register"] @@ -40,7 +40,7 @@ pub struct RegisterBlock { pub ch3paddr: CH3PADDR, #[doc = "0x50 - Channel 3 memory base address register"] pub ch3maddr: CH3MADDR, - _reserved3: [u8; 4usize], + _reserved18: [u8; 4usize], #[doc = "0x58 - Channel 4 control register"] pub ch4ctl: CH4CTL, #[doc = "0x5c - Channel 4 counter register"] @@ -50,135 +50,241 @@ pub struct RegisterBlock { #[doc = "0x64 - Channel 4 memory base address register"] pub ch4maddr: CH4MADDR, } -#[doc = "Interrupt flag register"] -pub struct INTF { - register: ::vcell::VolatileCell, -} +#[doc = "Interrupt flag register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [intf](intf) module"] +pub type INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _INTF; +#[doc = "`read()` method returns [intf::R](intf::R) reader structure"] +impl crate::Readable for INTF {} #[doc = "Interrupt flag register"] pub mod intf; -#[doc = "Interrupt flag clear register"] -pub struct INTC { - register: ::vcell::VolatileCell, -} +#[doc = "Interrupt flag clear register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [intc](intc) module"] +pub type INTC = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _INTC; +#[doc = "`write(|w| ..)` method takes [intc::W](intc::W) writer structure"] +impl crate::Writable for INTC {} #[doc = "Interrupt flag clear register"] pub mod intc; -#[doc = "Channel 0 control register"] -pub struct CH0CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 0 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch0ctl](ch0ctl) module"] +pub type CH0CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH0CTL; +#[doc = "`read()` method returns [ch0ctl::R](ch0ctl::R) reader structure"] +impl crate::Readable for CH0CTL {} +#[doc = "`write(|w| ..)` method takes [ch0ctl::W](ch0ctl::W) writer structure"] +impl crate::Writable for CH0CTL {} #[doc = "Channel 0 control register"] pub mod ch0ctl; -#[doc = "Channel 0 counter register"] -pub struct CH0CNT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 0 counter register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch0cnt](ch0cnt) module"] +pub type CH0CNT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH0CNT; +#[doc = "`read()` method returns [ch0cnt::R](ch0cnt::R) reader structure"] +impl crate::Readable for CH0CNT {} +#[doc = "`write(|w| ..)` method takes [ch0cnt::W](ch0cnt::W) writer structure"] +impl crate::Writable for CH0CNT {} #[doc = "Channel 0 counter register"] pub mod ch0cnt; -#[doc = "Channel 0 peripheral base address register"] -pub struct CH0PADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 0 peripheral base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch0paddr](ch0paddr) module"] +pub type CH0PADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH0PADDR; +#[doc = "`read()` method returns [ch0paddr::R](ch0paddr::R) reader structure"] +impl crate::Readable for CH0PADDR {} +#[doc = "`write(|w| ..)` method takes [ch0paddr::W](ch0paddr::W) writer structure"] +impl crate::Writable for CH0PADDR {} #[doc = "Channel 0 peripheral base address register"] pub mod ch0paddr; -#[doc = "Channel 0 memory base address register"] -pub struct CH0MADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 0 memory base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch0maddr](ch0maddr) module"] +pub type CH0MADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH0MADDR; +#[doc = "`read()` method returns [ch0maddr::R](ch0maddr::R) reader structure"] +impl crate::Readable for CH0MADDR {} +#[doc = "`write(|w| ..)` method takes [ch0maddr::W](ch0maddr::W) writer structure"] +impl crate::Writable for CH0MADDR {} #[doc = "Channel 0 memory base address register"] pub mod ch0maddr; -#[doc = "Channel 1 control register"] -pub struct CH1CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 1 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch1ctl](ch1ctl) module"] +pub type CH1CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH1CTL; +#[doc = "`read()` method returns [ch1ctl::R](ch1ctl::R) reader structure"] +impl crate::Readable for CH1CTL {} +#[doc = "`write(|w| ..)` method takes [ch1ctl::W](ch1ctl::W) writer structure"] +impl crate::Writable for CH1CTL {} #[doc = "Channel 1 control register"] pub mod ch1ctl; -#[doc = "Channel 1 counter register"] -pub struct CH1CNT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 1 counter register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch1cnt](ch1cnt) module"] +pub type CH1CNT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH1CNT; +#[doc = "`read()` method returns [ch1cnt::R](ch1cnt::R) reader structure"] +impl crate::Readable for CH1CNT {} +#[doc = "`write(|w| ..)` method takes [ch1cnt::W](ch1cnt::W) writer structure"] +impl crate::Writable for CH1CNT {} #[doc = "Channel 1 counter register"] pub mod ch1cnt; -#[doc = "Channel 1 peripheral base address register"] -pub struct CH1PADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 1 peripheral base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch1paddr](ch1paddr) module"] +pub type CH1PADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH1PADDR; +#[doc = "`read()` method returns [ch1paddr::R](ch1paddr::R) reader structure"] +impl crate::Readable for CH1PADDR {} +#[doc = "`write(|w| ..)` method takes [ch1paddr::W](ch1paddr::W) writer structure"] +impl crate::Writable for CH1PADDR {} #[doc = "Channel 1 peripheral base address register"] pub mod ch1paddr; -#[doc = "Channel 1 memory base address register"] -pub struct CH1MADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 1 memory base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch1maddr](ch1maddr) module"] +pub type CH1MADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH1MADDR; +#[doc = "`read()` method returns [ch1maddr::R](ch1maddr::R) reader structure"] +impl crate::Readable for CH1MADDR {} +#[doc = "`write(|w| ..)` method takes [ch1maddr::W](ch1maddr::W) writer structure"] +impl crate::Writable for CH1MADDR {} #[doc = "Channel 1 memory base address register"] pub mod ch1maddr; -#[doc = "Channel 2 control register"] -pub struct CH2CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 2 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch2ctl](ch2ctl) module"] +pub type CH2CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH2CTL; +#[doc = "`read()` method returns [ch2ctl::R](ch2ctl::R) reader structure"] +impl crate::Readable for CH2CTL {} +#[doc = "`write(|w| ..)` method takes [ch2ctl::W](ch2ctl::W) writer structure"] +impl crate::Writable for CH2CTL {} #[doc = "Channel 2 control register"] pub mod ch2ctl; -#[doc = "Channel 2 counter register"] -pub struct CH2CNT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 2 counter register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch2cnt](ch2cnt) module"] +pub type CH2CNT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH2CNT; +#[doc = "`read()` method returns [ch2cnt::R](ch2cnt::R) reader structure"] +impl crate::Readable for CH2CNT {} +#[doc = "`write(|w| ..)` method takes [ch2cnt::W](ch2cnt::W) writer structure"] +impl crate::Writable for CH2CNT {} #[doc = "Channel 2 counter register"] pub mod ch2cnt; -#[doc = "Channel 2 peripheral base address register"] -pub struct CH2PADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 2 peripheral base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch2paddr](ch2paddr) module"] +pub type CH2PADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH2PADDR; +#[doc = "`read()` method returns [ch2paddr::R](ch2paddr::R) reader structure"] +impl crate::Readable for CH2PADDR {} +#[doc = "`write(|w| ..)` method takes [ch2paddr::W](ch2paddr::W) writer structure"] +impl crate::Writable for CH2PADDR {} #[doc = "Channel 2 peripheral base address register"] pub mod ch2paddr; -#[doc = "Channel 2 memory base address register"] -pub struct CH2MADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 2 memory base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch2maddr](ch2maddr) module"] +pub type CH2MADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH2MADDR; +#[doc = "`read()` method returns [ch2maddr::R](ch2maddr::R) reader structure"] +impl crate::Readable for CH2MADDR {} +#[doc = "`write(|w| ..)` method takes [ch2maddr::W](ch2maddr::W) writer structure"] +impl crate::Writable for CH2MADDR {} #[doc = "Channel 2 memory base address register"] pub mod ch2maddr; -#[doc = "Channel 3 control register"] -pub struct CH3CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 3 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch3ctl](ch3ctl) module"] +pub type CH3CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH3CTL; +#[doc = "`read()` method returns [ch3ctl::R](ch3ctl::R) reader structure"] +impl crate::Readable for CH3CTL {} +#[doc = "`write(|w| ..)` method takes [ch3ctl::W](ch3ctl::W) writer structure"] +impl crate::Writable for CH3CTL {} #[doc = "Channel 3 control register"] pub mod ch3ctl; -#[doc = "Channel 3 counter register"] -pub struct CH3CNT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 3 counter register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch3cnt](ch3cnt) module"] +pub type CH3CNT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH3CNT; +#[doc = "`read()` method returns [ch3cnt::R](ch3cnt::R) reader structure"] +impl crate::Readable for CH3CNT {} +#[doc = "`write(|w| ..)` method takes [ch3cnt::W](ch3cnt::W) writer structure"] +impl crate::Writable for CH3CNT {} #[doc = "Channel 3 counter register"] pub mod ch3cnt; -#[doc = "Channel 3 peripheral base address register"] -pub struct CH3PADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 3 peripheral base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch3paddr](ch3paddr) module"] +pub type CH3PADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH3PADDR; +#[doc = "`read()` method returns [ch3paddr::R](ch3paddr::R) reader structure"] +impl crate::Readable for CH3PADDR {} +#[doc = "`write(|w| ..)` method takes [ch3paddr::W](ch3paddr::W) writer structure"] +impl crate::Writable for CH3PADDR {} #[doc = "Channel 3 peripheral base address register"] pub mod ch3paddr; -#[doc = "Channel 3 memory base address register"] -pub struct CH3MADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 3 memory base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch3maddr](ch3maddr) module"] +pub type CH3MADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH3MADDR; +#[doc = "`read()` method returns [ch3maddr::R](ch3maddr::R) reader structure"] +impl crate::Readable for CH3MADDR {} +#[doc = "`write(|w| ..)` method takes [ch3maddr::W](ch3maddr::W) writer structure"] +impl crate::Writable for CH3MADDR {} #[doc = "Channel 3 memory base address register"] pub mod ch3maddr; -#[doc = "Channel 4 control register"] -pub struct CH4CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 4 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch4ctl](ch4ctl) module"] +pub type CH4CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH4CTL; +#[doc = "`read()` method returns [ch4ctl::R](ch4ctl::R) reader structure"] +impl crate::Readable for CH4CTL {} +#[doc = "`write(|w| ..)` method takes [ch4ctl::W](ch4ctl::W) writer structure"] +impl crate::Writable for CH4CTL {} #[doc = "Channel 4 control register"] pub mod ch4ctl; -#[doc = "Channel 4 counter register"] -pub struct CH4CNT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 4 counter register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch4cnt](ch4cnt) module"] +pub type CH4CNT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH4CNT; +#[doc = "`read()` method returns [ch4cnt::R](ch4cnt::R) reader structure"] +impl crate::Readable for CH4CNT {} +#[doc = "`write(|w| ..)` method takes [ch4cnt::W](ch4cnt::W) writer structure"] +impl crate::Writable for CH4CNT {} #[doc = "Channel 4 counter register"] pub mod ch4cnt; -#[doc = "Channel 4 peripheral base address register"] -pub struct CH4PADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 4 peripheral base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch4paddr](ch4paddr) module"] +pub type CH4PADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH4PADDR; +#[doc = "`read()` method returns [ch4paddr::R](ch4paddr::R) reader structure"] +impl crate::Readable for CH4PADDR {} +#[doc = "`write(|w| ..)` method takes [ch4paddr::W](ch4paddr::W) writer structure"] +impl crate::Writable for CH4PADDR {} #[doc = "Channel 4 peripheral base address register"] pub mod ch4paddr; -#[doc = "Channel 4 memory base address register"] -pub struct CH4MADDR { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 4 memory base address register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch4maddr](ch4maddr) module"] +pub type CH4MADDR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH4MADDR; +#[doc = "`read()` method returns [ch4maddr::R](ch4maddr::R) reader structure"] +impl crate::Readable for CH4MADDR {} +#[doc = "`write(|w| ..)` method takes [ch4maddr::W](ch4maddr::W) writer structure"] +impl crate::Writable for CH4MADDR {} #[doc = "Channel 4 memory base address register"] pub mod ch4maddr; diff --git a/src/dma1/ch0cnt.rs b/src/dma1/ch0cnt.rs index a04e9108f9cca8ca2b8ab5624868b21d28647e72..ca1ca88a9bd41887e06393bedf20ea56191a9821 100644 --- a/src/dma1/ch0cnt.rs +++ b/src/dma1/ch0cnt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH0CNT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CH0CNT"] +pub type R = crate::R; +#[doc = "Writer for register CH0CNT"] +pub type W = crate::W; +#[doc = "Register CH0CNT `reset()`'s with value 0"] +impl crate::ResetValue for super::CH0CNT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/dma1/ch0ctl.rs b/src/dma1/ch0ctl.rs index 60dbdbd6759540f853c021615a7c6f84566b623c..8a0c9d6d9a903a91d6888057d06186992fa167c9 100644 --- a/src/dma1/ch0ctl.rs +++ b/src/dma1/ch0ctl.rs @@ -1,718 +1,394 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH0CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CHENR { - bits: bool, -} -impl CHENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIER { - bits: bool, -} -impl FTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIER { - bits: bool, -} -impl HTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DIRR { - bits: bool, -} -impl DIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CMENR { - bits: bool, -} -impl CMENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PNAGAR { - bits: bool, -} -impl PNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MNAGAR { - bits: bool, -} -impl MNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PWIDTHR { - bits: u8, -} -impl PWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MWIDTHR { - bits: u8, -} -impl MWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PRIOR { - bits: u8, -} -impl PRIOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct M2MR { - bits: bool, -} -impl M2MR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CHENW<'a> { +#[doc = "Reader of register CH0CTL"] +pub type R = crate::R; +#[doc = "Writer for register CH0CTL"] +pub type W = crate::W; +#[doc = "Register CH0CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CH0CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CHEN`"] +pub type CHEN_R = crate::R; +#[doc = "Write proxy for field `CHEN`"] +pub struct CHEN_W<'a> { w: &'a mut W, } -impl<'a> _CHENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIEW<'a> { +#[doc = "Reader of field `FTFIE`"] +pub type FTFIE_R = crate::R; +#[doc = "Write proxy for field `FTFIE`"] +pub struct FTFIE_W<'a> { w: &'a mut W, } -impl<'a> _FTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIEW<'a> { +#[doc = "Reader of field `HTFIE`"] +pub type HTFIE_R = crate::R; +#[doc = "Write proxy for field `HTFIE`"] +pub struct HTFIE_W<'a> { w: &'a mut W, } -impl<'a> _HTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _DIRW<'a> { +#[doc = "Reader of field `DIR`"] +pub type DIR_R = crate::R; +#[doc = "Write proxy for field `DIR`"] +pub struct DIR_W<'a> { w: &'a mut W, } -impl<'a> _DIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CMENW<'a> { +#[doc = "Reader of field `CMEN`"] +pub type CMEN_R = crate::R; +#[doc = "Write proxy for field `CMEN`"] +pub struct CMEN_W<'a> { w: &'a mut W, } -impl<'a> _CMENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _PNAGAW<'a> { +#[doc = "Reader of field `PNAGA`"] +pub type PNAGA_R = crate::R; +#[doc = "Write proxy for field `PNAGA`"] +pub struct PNAGA_W<'a> { w: &'a mut W, } -impl<'a> _PNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _MNAGAW<'a> { +#[doc = "Reader of field `MNAGA`"] +pub type MNAGA_R = crate::R; +#[doc = "Write proxy for field `MNAGA`"] +pub struct MNAGA_W<'a> { w: &'a mut W, } -impl<'a> _MNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _PWIDTHW<'a> { +#[doc = "Reader of field `PWIDTH`"] +pub type PWIDTH_R = crate::R; +#[doc = "Write proxy for field `PWIDTH`"] +pub struct PWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _PWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _MWIDTHW<'a> { +#[doc = "Reader of field `MWIDTH`"] +pub type MWIDTH_R = crate::R; +#[doc = "Write proxy for field `MWIDTH`"] +pub struct MWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _MWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PRIOW<'a> { +#[doc = "Reader of field `PRIO`"] +pub type PRIO_R = crate::R; +#[doc = "Write proxy for field `PRIO`"] +pub struct PRIO_W<'a> { w: &'a mut W, } -impl<'a> _PRIOW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PRIO_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _M2MW<'a> { +#[doc = "Reader of field `M2M`"] +pub type M2M_R = crate::R; +#[doc = "Write proxy for field `M2M`"] +pub struct M2M_W<'a> { w: &'a mut W, } -impl<'a> _M2MW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> M2M_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&self) -> CHENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHENR { bits } + #[inline(always)] + pub fn chen(&self) -> CHEN_R { + CHEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&self) -> FTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIER { bits } + #[inline(always)] + pub fn ftfie(&self) -> FTFIE_R { + FTFIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&self) -> HTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIER { bits } + #[inline(always)] + pub fn htfie(&self) -> HTFIE_R { + HTFIE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&self) -> DIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DIRR { bits } + #[inline(always)] + pub fn dir(&self) -> DIR_R { + DIR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&self) -> CMENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CMENR { bits } + #[inline(always)] + pub fn cmen(&self) -> CMEN_R { + CMEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&self) -> PNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PNAGAR { bits } + #[inline(always)] + pub fn pnaga(&self) -> PNAGA_R { + PNAGA_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&self) -> MNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MNAGAR { bits } + #[inline(always)] + pub fn mnaga(&self) -> MNAGA_R { + MNAGA_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&self) -> PWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PWIDTHR { bits } + #[inline(always)] + pub fn pwidth(&self) -> PWIDTH_R { + PWIDTH_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&self) -> MWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MWIDTHR { bits } + #[inline(always)] + pub fn mwidth(&self) -> MWIDTH_R { + MWIDTH_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&self) -> PRIOR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PRIOR { bits } + #[inline(always)] + pub fn prio(&self) -> PRIO_R { + PRIO_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&self) -> M2MR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - M2MR { bits } + #[inline(always)] + pub fn m2m(&self) -> M2M_R { + M2M_R::new(((self.bits >> 14) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&mut self) -> _CHENW { - _CHENW { w: self } + #[inline(always)] + pub fn chen(&mut self) -> CHEN_W { + CHEN_W { w: self } } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&mut self) -> _FTFIEW { - _FTFIEW { w: self } + #[inline(always)] + pub fn ftfie(&mut self) -> FTFIE_W { + FTFIE_W { w: self } } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&mut self) -> _HTFIEW { - _HTFIEW { w: self } + #[inline(always)] + pub fn htfie(&mut self) -> HTFIE_W { + HTFIE_W { w: self } } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&mut self) -> _DIRW { - _DIRW { w: self } + #[inline(always)] + pub fn dir(&mut self) -> DIR_W { + DIR_W { w: self } } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&mut self) -> _CMENW { - _CMENW { w: self } + #[inline(always)] + pub fn cmen(&mut self) -> CMEN_W { + CMEN_W { w: self } } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&mut self) -> _PNAGAW { - _PNAGAW { w: self } + #[inline(always)] + pub fn pnaga(&mut self) -> PNAGA_W { + PNAGA_W { w: self } } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&mut self) -> _MNAGAW { - _MNAGAW { w: self } + #[inline(always)] + pub fn mnaga(&mut self) -> MNAGA_W { + MNAGA_W { w: self } } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&mut self) -> _PWIDTHW { - _PWIDTHW { w: self } + #[inline(always)] + pub fn pwidth(&mut self) -> PWIDTH_W { + PWIDTH_W { w: self } } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&mut self) -> _MWIDTHW { - _MWIDTHW { w: self } + #[inline(always)] + pub fn mwidth(&mut self) -> MWIDTH_W { + MWIDTH_W { w: self } } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&mut self) -> _PRIOW { - _PRIOW { w: self } + #[inline(always)] + pub fn prio(&mut self) -> PRIO_W { + PRIO_W { w: self } } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&mut self) -> _M2MW { - _M2MW { w: self } + #[inline(always)] + pub fn m2m(&mut self) -> M2M_W { + M2M_W { w: self } } } diff --git a/src/dma1/ch0maddr.rs b/src/dma1/ch0maddr.rs index 6cb58571efe8608941909b9d83588c75af3994b9..1174052a06bac90851ef79dfc7e93066050b628c 100644 --- a/src/dma1/ch0maddr.rs +++ b/src/dma1/ch0maddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH0MADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MADDRR { - bits: u32, -} -impl MADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MADDRW<'a> { +#[doc = "Reader of register CH0MADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH0MADDR"] +pub type W = crate::W; +#[doc = "Register CH0MADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH0MADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MADDR`"] +pub type MADDR_R = crate::R; +#[doc = "Write proxy for field `MADDR`"] +pub struct MADDR_W<'a> { w: &'a mut W, } -impl<'a> _MADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&self) -> MADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - MADDRR { bits } + #[inline(always)] + pub fn maddr(&self) -> MADDR_R { + MADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&mut self) -> _MADDRW { - _MADDRW { w: self } + #[inline(always)] + pub fn maddr(&mut self) -> MADDR_W { + MADDR_W { w: self } } } diff --git a/src/dma1/ch0paddr.rs b/src/dma1/ch0paddr.rs index a5253d4825ce837685c6720f9608601e497fc931..9d8ddb7a1d29d03a30afb711abb2c3da74bc3495 100644 --- a/src/dma1/ch0paddr.rs +++ b/src/dma1/ch0paddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH0PADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PADDRR { - bits: u32, -} -impl PADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PADDRW<'a> { +#[doc = "Reader of register CH0PADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH0PADDR"] +pub type W = crate::W; +#[doc = "Register CH0PADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH0PADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PADDR`"] +pub type PADDR_R = crate::R; +#[doc = "Write proxy for field `PADDR`"] +pub struct PADDR_W<'a> { w: &'a mut W, } -impl<'a> _PADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&self) -> PADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - PADDRR { bits } + #[inline(always)] + pub fn paddr(&self) -> PADDR_R { + PADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&mut self) -> _PADDRW { - _PADDRW { w: self } + #[inline(always)] + pub fn paddr(&mut self) -> PADDR_W { + PADDR_W { w: self } } } diff --git a/src/dma1/ch1cnt.rs b/src/dma1/ch1cnt.rs index 799c1c4d6d520c7fcc6239e56a2108d804de0111..c056ed326fa7502fd56cd38ef1e5184548ff1ffb 100644 --- a/src/dma1/ch1cnt.rs +++ b/src/dma1/ch1cnt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH1CNT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CH1CNT"] +pub type R = crate::R; +#[doc = "Writer for register CH1CNT"] +pub type W = crate::W; +#[doc = "Register CH1CNT `reset()`'s with value 0"] +impl crate::ResetValue for super::CH1CNT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/dma1/ch1ctl.rs b/src/dma1/ch1ctl.rs index 05be5160a2ea0b2e41f493638956667ed5a1265e..3be8a847b2650114084a0ce8030a4b5f066366f4 100644 --- a/src/dma1/ch1ctl.rs +++ b/src/dma1/ch1ctl.rs @@ -1,718 +1,394 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH1CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CHENR { - bits: bool, -} -impl CHENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIER { - bits: bool, -} -impl FTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIER { - bits: bool, -} -impl HTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DIRR { - bits: bool, -} -impl DIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CMENR { - bits: bool, -} -impl CMENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PNAGAR { - bits: bool, -} -impl PNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MNAGAR { - bits: bool, -} -impl MNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PWIDTHR { - bits: u8, -} -impl PWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MWIDTHR { - bits: u8, -} -impl MWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PRIOR { - bits: u8, -} -impl PRIOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct M2MR { - bits: bool, -} -impl M2MR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CHENW<'a> { +#[doc = "Reader of register CH1CTL"] +pub type R = crate::R; +#[doc = "Writer for register CH1CTL"] +pub type W = crate::W; +#[doc = "Register CH1CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CH1CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CHEN`"] +pub type CHEN_R = crate::R; +#[doc = "Write proxy for field `CHEN`"] +pub struct CHEN_W<'a> { w: &'a mut W, } -impl<'a> _CHENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIEW<'a> { +#[doc = "Reader of field `FTFIE`"] +pub type FTFIE_R = crate::R; +#[doc = "Write proxy for field `FTFIE`"] +pub struct FTFIE_W<'a> { w: &'a mut W, } -impl<'a> _FTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIEW<'a> { +#[doc = "Reader of field `HTFIE`"] +pub type HTFIE_R = crate::R; +#[doc = "Write proxy for field `HTFIE`"] +pub struct HTFIE_W<'a> { w: &'a mut W, } -impl<'a> _HTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _DIRW<'a> { +#[doc = "Reader of field `DIR`"] +pub type DIR_R = crate::R; +#[doc = "Write proxy for field `DIR`"] +pub struct DIR_W<'a> { w: &'a mut W, } -impl<'a> _DIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CMENW<'a> { +#[doc = "Reader of field `CMEN`"] +pub type CMEN_R = crate::R; +#[doc = "Write proxy for field `CMEN`"] +pub struct CMEN_W<'a> { w: &'a mut W, } -impl<'a> _CMENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _PNAGAW<'a> { +#[doc = "Reader of field `PNAGA`"] +pub type PNAGA_R = crate::R; +#[doc = "Write proxy for field `PNAGA`"] +pub struct PNAGA_W<'a> { w: &'a mut W, } -impl<'a> _PNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _MNAGAW<'a> { +#[doc = "Reader of field `MNAGA`"] +pub type MNAGA_R = crate::R; +#[doc = "Write proxy for field `MNAGA`"] +pub struct MNAGA_W<'a> { w: &'a mut W, } -impl<'a> _MNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _PWIDTHW<'a> { +#[doc = "Reader of field `PWIDTH`"] +pub type PWIDTH_R = crate::R; +#[doc = "Write proxy for field `PWIDTH`"] +pub struct PWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _PWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _MWIDTHW<'a> { +#[doc = "Reader of field `MWIDTH`"] +pub type MWIDTH_R = crate::R; +#[doc = "Write proxy for field `MWIDTH`"] +pub struct MWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _MWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PRIOW<'a> { +#[doc = "Reader of field `PRIO`"] +pub type PRIO_R = crate::R; +#[doc = "Write proxy for field `PRIO`"] +pub struct PRIO_W<'a> { w: &'a mut W, } -impl<'a> _PRIOW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PRIO_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _M2MW<'a> { +#[doc = "Reader of field `M2M`"] +pub type M2M_R = crate::R; +#[doc = "Write proxy for field `M2M`"] +pub struct M2M_W<'a> { w: &'a mut W, } -impl<'a> _M2MW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> M2M_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&self) -> CHENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHENR { bits } + #[inline(always)] + pub fn chen(&self) -> CHEN_R { + CHEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&self) -> FTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIER { bits } + #[inline(always)] + pub fn ftfie(&self) -> FTFIE_R { + FTFIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&self) -> HTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIER { bits } + #[inline(always)] + pub fn htfie(&self) -> HTFIE_R { + HTFIE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&self) -> DIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DIRR { bits } + #[inline(always)] + pub fn dir(&self) -> DIR_R { + DIR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&self) -> CMENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CMENR { bits } + #[inline(always)] + pub fn cmen(&self) -> CMEN_R { + CMEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&self) -> PNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PNAGAR { bits } + #[inline(always)] + pub fn pnaga(&self) -> PNAGA_R { + PNAGA_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&self) -> MNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MNAGAR { bits } + #[inline(always)] + pub fn mnaga(&self) -> MNAGA_R { + MNAGA_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&self) -> PWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PWIDTHR { bits } + #[inline(always)] + pub fn pwidth(&self) -> PWIDTH_R { + PWIDTH_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&self) -> MWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MWIDTHR { bits } + #[inline(always)] + pub fn mwidth(&self) -> MWIDTH_R { + MWIDTH_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&self) -> PRIOR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PRIOR { bits } + #[inline(always)] + pub fn prio(&self) -> PRIO_R { + PRIO_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&self) -> M2MR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - M2MR { bits } + #[inline(always)] + pub fn m2m(&self) -> M2M_R { + M2M_R::new(((self.bits >> 14) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&mut self) -> _CHENW { - _CHENW { w: self } + #[inline(always)] + pub fn chen(&mut self) -> CHEN_W { + CHEN_W { w: self } } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&mut self) -> _FTFIEW { - _FTFIEW { w: self } + #[inline(always)] + pub fn ftfie(&mut self) -> FTFIE_W { + FTFIE_W { w: self } } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&mut self) -> _HTFIEW { - _HTFIEW { w: self } + #[inline(always)] + pub fn htfie(&mut self) -> HTFIE_W { + HTFIE_W { w: self } } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&mut self) -> _DIRW { - _DIRW { w: self } + #[inline(always)] + pub fn dir(&mut self) -> DIR_W { + DIR_W { w: self } } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&mut self) -> _CMENW { - _CMENW { w: self } + #[inline(always)] + pub fn cmen(&mut self) -> CMEN_W { + CMEN_W { w: self } } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&mut self) -> _PNAGAW { - _PNAGAW { w: self } + #[inline(always)] + pub fn pnaga(&mut self) -> PNAGA_W { + PNAGA_W { w: self } } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&mut self) -> _MNAGAW { - _MNAGAW { w: self } + #[inline(always)] + pub fn mnaga(&mut self) -> MNAGA_W { + MNAGA_W { w: self } } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&mut self) -> _PWIDTHW { - _PWIDTHW { w: self } + #[inline(always)] + pub fn pwidth(&mut self) -> PWIDTH_W { + PWIDTH_W { w: self } } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&mut self) -> _MWIDTHW { - _MWIDTHW { w: self } + #[inline(always)] + pub fn mwidth(&mut self) -> MWIDTH_W { + MWIDTH_W { w: self } } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&mut self) -> _PRIOW { - _PRIOW { w: self } + #[inline(always)] + pub fn prio(&mut self) -> PRIO_W { + PRIO_W { w: self } } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&mut self) -> _M2MW { - _M2MW { w: self } + #[inline(always)] + pub fn m2m(&mut self) -> M2M_W { + M2M_W { w: self } } } diff --git a/src/dma1/ch1maddr.rs b/src/dma1/ch1maddr.rs index e40c7994e01227a8c63755e016d432cdd42ff631..1d138277f90786c0906e01cb9df38b7fe2676b64 100644 --- a/src/dma1/ch1maddr.rs +++ b/src/dma1/ch1maddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH1MADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MADDRR { - bits: u32, -} -impl MADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MADDRW<'a> { +#[doc = "Reader of register CH1MADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH1MADDR"] +pub type W = crate::W; +#[doc = "Register CH1MADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH1MADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MADDR`"] +pub type MADDR_R = crate::R; +#[doc = "Write proxy for field `MADDR`"] +pub struct MADDR_W<'a> { w: &'a mut W, } -impl<'a> _MADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&self) -> MADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - MADDRR { bits } + #[inline(always)] + pub fn maddr(&self) -> MADDR_R { + MADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&mut self) -> _MADDRW { - _MADDRW { w: self } + #[inline(always)] + pub fn maddr(&mut self) -> MADDR_W { + MADDR_W { w: self } } } diff --git a/src/dma1/ch1paddr.rs b/src/dma1/ch1paddr.rs index 7db0fd2324f970cd92db09ee4453850fa658f27f..cfb2b2c4de7faf0bc785f31d576b4e7c17e6bd05 100644 --- a/src/dma1/ch1paddr.rs +++ b/src/dma1/ch1paddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH1PADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PADDRR { - bits: u32, -} -impl PADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PADDRW<'a> { +#[doc = "Reader of register CH1PADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH1PADDR"] +pub type W = crate::W; +#[doc = "Register CH1PADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH1PADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PADDR`"] +pub type PADDR_R = crate::R; +#[doc = "Write proxy for field `PADDR`"] +pub struct PADDR_W<'a> { w: &'a mut W, } -impl<'a> _PADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&self) -> PADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - PADDRR { bits } + #[inline(always)] + pub fn paddr(&self) -> PADDR_R { + PADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&mut self) -> _PADDRW { - _PADDRW { w: self } + #[inline(always)] + pub fn paddr(&mut self) -> PADDR_W { + PADDR_W { w: self } } } diff --git a/src/dma1/ch2cnt.rs b/src/dma1/ch2cnt.rs index 0f1745e30384631068f07d4ee47c86dfa2c42893..8f03bd29cf1938c71889d2b12ac4f47966dcf34d 100644 --- a/src/dma1/ch2cnt.rs +++ b/src/dma1/ch2cnt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH2CNT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CH2CNT"] +pub type R = crate::R; +#[doc = "Writer for register CH2CNT"] +pub type W = crate::W; +#[doc = "Register CH2CNT `reset()`'s with value 0"] +impl crate::ResetValue for super::CH2CNT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/dma1/ch2ctl.rs b/src/dma1/ch2ctl.rs index 0b8c6beec1ce3ac41776948418af0f46598302d6..e6cd6a68eb75b49557f0156c2131b720230eeffd 100644 --- a/src/dma1/ch2ctl.rs +++ b/src/dma1/ch2ctl.rs @@ -1,718 +1,394 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH2CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CHENR { - bits: bool, -} -impl CHENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIER { - bits: bool, -} -impl FTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIER { - bits: bool, -} -impl HTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DIRR { - bits: bool, -} -impl DIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CMENR { - bits: bool, -} -impl CMENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PNAGAR { - bits: bool, -} -impl PNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MNAGAR { - bits: bool, -} -impl MNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PWIDTHR { - bits: u8, -} -impl PWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MWIDTHR { - bits: u8, -} -impl MWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PRIOR { - bits: u8, -} -impl PRIOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct M2MR { - bits: bool, -} -impl M2MR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CHENW<'a> { +#[doc = "Reader of register CH2CTL"] +pub type R = crate::R; +#[doc = "Writer for register CH2CTL"] +pub type W = crate::W; +#[doc = "Register CH2CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CH2CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CHEN`"] +pub type CHEN_R = crate::R; +#[doc = "Write proxy for field `CHEN`"] +pub struct CHEN_W<'a> { w: &'a mut W, } -impl<'a> _CHENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIEW<'a> { +#[doc = "Reader of field `FTFIE`"] +pub type FTFIE_R = crate::R; +#[doc = "Write proxy for field `FTFIE`"] +pub struct FTFIE_W<'a> { w: &'a mut W, } -impl<'a> _FTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIEW<'a> { +#[doc = "Reader of field `HTFIE`"] +pub type HTFIE_R = crate::R; +#[doc = "Write proxy for field `HTFIE`"] +pub struct HTFIE_W<'a> { w: &'a mut W, } -impl<'a> _HTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _DIRW<'a> { +#[doc = "Reader of field `DIR`"] +pub type DIR_R = crate::R; +#[doc = "Write proxy for field `DIR`"] +pub struct DIR_W<'a> { w: &'a mut W, } -impl<'a> _DIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CMENW<'a> { +#[doc = "Reader of field `CMEN`"] +pub type CMEN_R = crate::R; +#[doc = "Write proxy for field `CMEN`"] +pub struct CMEN_W<'a> { w: &'a mut W, } -impl<'a> _CMENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _PNAGAW<'a> { +#[doc = "Reader of field `PNAGA`"] +pub type PNAGA_R = crate::R; +#[doc = "Write proxy for field `PNAGA`"] +pub struct PNAGA_W<'a> { w: &'a mut W, } -impl<'a> _PNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _MNAGAW<'a> { +#[doc = "Reader of field `MNAGA`"] +pub type MNAGA_R = crate::R; +#[doc = "Write proxy for field `MNAGA`"] +pub struct MNAGA_W<'a> { w: &'a mut W, } -impl<'a> _MNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _PWIDTHW<'a> { +#[doc = "Reader of field `PWIDTH`"] +pub type PWIDTH_R = crate::R; +#[doc = "Write proxy for field `PWIDTH`"] +pub struct PWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _PWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _MWIDTHW<'a> { +#[doc = "Reader of field `MWIDTH`"] +pub type MWIDTH_R = crate::R; +#[doc = "Write proxy for field `MWIDTH`"] +pub struct MWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _MWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PRIOW<'a> { +#[doc = "Reader of field `PRIO`"] +pub type PRIO_R = crate::R; +#[doc = "Write proxy for field `PRIO`"] +pub struct PRIO_W<'a> { w: &'a mut W, } -impl<'a> _PRIOW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PRIO_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _M2MW<'a> { +#[doc = "Reader of field `M2M`"] +pub type M2M_R = crate::R; +#[doc = "Write proxy for field `M2M`"] +pub struct M2M_W<'a> { w: &'a mut W, } -impl<'a> _M2MW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> M2M_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&self) -> CHENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHENR { bits } + #[inline(always)] + pub fn chen(&self) -> CHEN_R { + CHEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&self) -> FTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIER { bits } + #[inline(always)] + pub fn ftfie(&self) -> FTFIE_R { + FTFIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&self) -> HTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIER { bits } + #[inline(always)] + pub fn htfie(&self) -> HTFIE_R { + HTFIE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&self) -> DIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DIRR { bits } + #[inline(always)] + pub fn dir(&self) -> DIR_R { + DIR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&self) -> CMENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CMENR { bits } + #[inline(always)] + pub fn cmen(&self) -> CMEN_R { + CMEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&self) -> PNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PNAGAR { bits } + #[inline(always)] + pub fn pnaga(&self) -> PNAGA_R { + PNAGA_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&self) -> MNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MNAGAR { bits } + #[inline(always)] + pub fn mnaga(&self) -> MNAGA_R { + MNAGA_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&self) -> PWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PWIDTHR { bits } + #[inline(always)] + pub fn pwidth(&self) -> PWIDTH_R { + PWIDTH_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&self) -> MWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MWIDTHR { bits } + #[inline(always)] + pub fn mwidth(&self) -> MWIDTH_R { + MWIDTH_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&self) -> PRIOR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PRIOR { bits } + #[inline(always)] + pub fn prio(&self) -> PRIO_R { + PRIO_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&self) -> M2MR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - M2MR { bits } + #[inline(always)] + pub fn m2m(&self) -> M2M_R { + M2M_R::new(((self.bits >> 14) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&mut self) -> _CHENW { - _CHENW { w: self } + #[inline(always)] + pub fn chen(&mut self) -> CHEN_W { + CHEN_W { w: self } } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&mut self) -> _FTFIEW { - _FTFIEW { w: self } + #[inline(always)] + pub fn ftfie(&mut self) -> FTFIE_W { + FTFIE_W { w: self } } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&mut self) -> _HTFIEW { - _HTFIEW { w: self } + #[inline(always)] + pub fn htfie(&mut self) -> HTFIE_W { + HTFIE_W { w: self } } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&mut self) -> _DIRW { - _DIRW { w: self } + #[inline(always)] + pub fn dir(&mut self) -> DIR_W { + DIR_W { w: self } } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&mut self) -> _CMENW { - _CMENW { w: self } + #[inline(always)] + pub fn cmen(&mut self) -> CMEN_W { + CMEN_W { w: self } } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&mut self) -> _PNAGAW { - _PNAGAW { w: self } + #[inline(always)] + pub fn pnaga(&mut self) -> PNAGA_W { + PNAGA_W { w: self } } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&mut self) -> _MNAGAW { - _MNAGAW { w: self } + #[inline(always)] + pub fn mnaga(&mut self) -> MNAGA_W { + MNAGA_W { w: self } } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&mut self) -> _PWIDTHW { - _PWIDTHW { w: self } + #[inline(always)] + pub fn pwidth(&mut self) -> PWIDTH_W { + PWIDTH_W { w: self } } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&mut self) -> _MWIDTHW { - _MWIDTHW { w: self } + #[inline(always)] + pub fn mwidth(&mut self) -> MWIDTH_W { + MWIDTH_W { w: self } } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&mut self) -> _PRIOW { - _PRIOW { w: self } + #[inline(always)] + pub fn prio(&mut self) -> PRIO_W { + PRIO_W { w: self } } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&mut self) -> _M2MW { - _M2MW { w: self } + #[inline(always)] + pub fn m2m(&mut self) -> M2M_W { + M2M_W { w: self } } } diff --git a/src/dma1/ch2maddr.rs b/src/dma1/ch2maddr.rs index 82e919752ccd7b77beb286fb10f9ae39340648d8..6c479f2ce14b719a69bd783bb36b96a4505f3fae 100644 --- a/src/dma1/ch2maddr.rs +++ b/src/dma1/ch2maddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH2MADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MADDRR { - bits: u32, -} -impl MADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MADDRW<'a> { +#[doc = "Reader of register CH2MADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH2MADDR"] +pub type W = crate::W; +#[doc = "Register CH2MADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH2MADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MADDR`"] +pub type MADDR_R = crate::R; +#[doc = "Write proxy for field `MADDR`"] +pub struct MADDR_W<'a> { w: &'a mut W, } -impl<'a> _MADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&self) -> MADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - MADDRR { bits } + #[inline(always)] + pub fn maddr(&self) -> MADDR_R { + MADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&mut self) -> _MADDRW { - _MADDRW { w: self } + #[inline(always)] + pub fn maddr(&mut self) -> MADDR_W { + MADDR_W { w: self } } } diff --git a/src/dma1/ch2paddr.rs b/src/dma1/ch2paddr.rs index 9c4a1fee555cb75c6f3306631e9a474ca2fe4d7a..8a044c0246358a22408c9f343da0a6e88ee0657d 100644 --- a/src/dma1/ch2paddr.rs +++ b/src/dma1/ch2paddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH2PADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PADDRR { - bits: u32, -} -impl PADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PADDRW<'a> { +#[doc = "Reader of register CH2PADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH2PADDR"] +pub type W = crate::W; +#[doc = "Register CH2PADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH2PADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PADDR`"] +pub type PADDR_R = crate::R; +#[doc = "Write proxy for field `PADDR`"] +pub struct PADDR_W<'a> { w: &'a mut W, } -impl<'a> _PADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&self) -> PADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - PADDRR { bits } + #[inline(always)] + pub fn paddr(&self) -> PADDR_R { + PADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&mut self) -> _PADDRW { - _PADDRW { w: self } + #[inline(always)] + pub fn paddr(&mut self) -> PADDR_W { + PADDR_W { w: self } } } diff --git a/src/dma1/ch3cnt.rs b/src/dma1/ch3cnt.rs index bd7af739070a61bf7ab59466a2ad97be95b76313..45f4d93a82a894d82752423616b8bc2379e2e444 100644 --- a/src/dma1/ch3cnt.rs +++ b/src/dma1/ch3cnt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH3CNT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CH3CNT"] +pub type R = crate::R; +#[doc = "Writer for register CH3CNT"] +pub type W = crate::W; +#[doc = "Register CH3CNT `reset()`'s with value 0"] +impl crate::ResetValue for super::CH3CNT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/dma1/ch3ctl.rs b/src/dma1/ch3ctl.rs index 66a1311a5b7ef1969ba8c35a68992b123698f77e..d69bbef70542094a3b2fc355f55a39f94bb877c3 100644 --- a/src/dma1/ch3ctl.rs +++ b/src/dma1/ch3ctl.rs @@ -1,718 +1,394 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH3CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CHENR { - bits: bool, -} -impl CHENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIER { - bits: bool, -} -impl FTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIER { - bits: bool, -} -impl HTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DIRR { - bits: bool, -} -impl DIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CMENR { - bits: bool, -} -impl CMENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PNAGAR { - bits: bool, -} -impl PNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MNAGAR { - bits: bool, -} -impl MNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PWIDTHR { - bits: u8, -} -impl PWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MWIDTHR { - bits: u8, -} -impl MWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PRIOR { - bits: u8, -} -impl PRIOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct M2MR { - bits: bool, -} -impl M2MR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CHENW<'a> { +#[doc = "Reader of register CH3CTL"] +pub type R = crate::R; +#[doc = "Writer for register CH3CTL"] +pub type W = crate::W; +#[doc = "Register CH3CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CH3CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CHEN`"] +pub type CHEN_R = crate::R; +#[doc = "Write proxy for field `CHEN`"] +pub struct CHEN_W<'a> { w: &'a mut W, } -impl<'a> _CHENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIEW<'a> { +#[doc = "Reader of field `FTFIE`"] +pub type FTFIE_R = crate::R; +#[doc = "Write proxy for field `FTFIE`"] +pub struct FTFIE_W<'a> { w: &'a mut W, } -impl<'a> _FTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIEW<'a> { +#[doc = "Reader of field `HTFIE`"] +pub type HTFIE_R = crate::R; +#[doc = "Write proxy for field `HTFIE`"] +pub struct HTFIE_W<'a> { w: &'a mut W, } -impl<'a> _HTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _DIRW<'a> { +#[doc = "Reader of field `DIR`"] +pub type DIR_R = crate::R; +#[doc = "Write proxy for field `DIR`"] +pub struct DIR_W<'a> { w: &'a mut W, } -impl<'a> _DIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CMENW<'a> { +#[doc = "Reader of field `CMEN`"] +pub type CMEN_R = crate::R; +#[doc = "Write proxy for field `CMEN`"] +pub struct CMEN_W<'a> { w: &'a mut W, } -impl<'a> _CMENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _PNAGAW<'a> { +#[doc = "Reader of field `PNAGA`"] +pub type PNAGA_R = crate::R; +#[doc = "Write proxy for field `PNAGA`"] +pub struct PNAGA_W<'a> { w: &'a mut W, } -impl<'a> _PNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _MNAGAW<'a> { +#[doc = "Reader of field `MNAGA`"] +pub type MNAGA_R = crate::R; +#[doc = "Write proxy for field `MNAGA`"] +pub struct MNAGA_W<'a> { w: &'a mut W, } -impl<'a> _MNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _PWIDTHW<'a> { +#[doc = "Reader of field `PWIDTH`"] +pub type PWIDTH_R = crate::R; +#[doc = "Write proxy for field `PWIDTH`"] +pub struct PWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _PWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _MWIDTHW<'a> { +#[doc = "Reader of field `MWIDTH`"] +pub type MWIDTH_R = crate::R; +#[doc = "Write proxy for field `MWIDTH`"] +pub struct MWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _MWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PRIOW<'a> { +#[doc = "Reader of field `PRIO`"] +pub type PRIO_R = crate::R; +#[doc = "Write proxy for field `PRIO`"] +pub struct PRIO_W<'a> { w: &'a mut W, } -impl<'a> _PRIOW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PRIO_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _M2MW<'a> { +#[doc = "Reader of field `M2M`"] +pub type M2M_R = crate::R; +#[doc = "Write proxy for field `M2M`"] +pub struct M2M_W<'a> { w: &'a mut W, } -impl<'a> _M2MW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> M2M_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&self) -> CHENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHENR { bits } + #[inline(always)] + pub fn chen(&self) -> CHEN_R { + CHEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&self) -> FTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIER { bits } + #[inline(always)] + pub fn ftfie(&self) -> FTFIE_R { + FTFIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&self) -> HTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIER { bits } + #[inline(always)] + pub fn htfie(&self) -> HTFIE_R { + HTFIE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&self) -> DIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DIRR { bits } + #[inline(always)] + pub fn dir(&self) -> DIR_R { + DIR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&self) -> CMENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CMENR { bits } + #[inline(always)] + pub fn cmen(&self) -> CMEN_R { + CMEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&self) -> PNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PNAGAR { bits } + #[inline(always)] + pub fn pnaga(&self) -> PNAGA_R { + PNAGA_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&self) -> MNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MNAGAR { bits } + #[inline(always)] + pub fn mnaga(&self) -> MNAGA_R { + MNAGA_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&self) -> PWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PWIDTHR { bits } + #[inline(always)] + pub fn pwidth(&self) -> PWIDTH_R { + PWIDTH_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&self) -> MWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MWIDTHR { bits } + #[inline(always)] + pub fn mwidth(&self) -> MWIDTH_R { + MWIDTH_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&self) -> PRIOR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PRIOR { bits } + #[inline(always)] + pub fn prio(&self) -> PRIO_R { + PRIO_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&self) -> M2MR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - M2MR { bits } + #[inline(always)] + pub fn m2m(&self) -> M2M_R { + M2M_R::new(((self.bits >> 14) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&mut self) -> _CHENW { - _CHENW { w: self } + #[inline(always)] + pub fn chen(&mut self) -> CHEN_W { + CHEN_W { w: self } } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&mut self) -> _FTFIEW { - _FTFIEW { w: self } + #[inline(always)] + pub fn ftfie(&mut self) -> FTFIE_W { + FTFIE_W { w: self } } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&mut self) -> _HTFIEW { - _HTFIEW { w: self } + #[inline(always)] + pub fn htfie(&mut self) -> HTFIE_W { + HTFIE_W { w: self } } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&mut self) -> _DIRW { - _DIRW { w: self } + #[inline(always)] + pub fn dir(&mut self) -> DIR_W { + DIR_W { w: self } } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&mut self) -> _CMENW { - _CMENW { w: self } + #[inline(always)] + pub fn cmen(&mut self) -> CMEN_W { + CMEN_W { w: self } } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&mut self) -> _PNAGAW { - _PNAGAW { w: self } + #[inline(always)] + pub fn pnaga(&mut self) -> PNAGA_W { + PNAGA_W { w: self } } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&mut self) -> _MNAGAW { - _MNAGAW { w: self } + #[inline(always)] + pub fn mnaga(&mut self) -> MNAGA_W { + MNAGA_W { w: self } } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&mut self) -> _PWIDTHW { - _PWIDTHW { w: self } + #[inline(always)] + pub fn pwidth(&mut self) -> PWIDTH_W { + PWIDTH_W { w: self } } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&mut self) -> _MWIDTHW { - _MWIDTHW { w: self } + #[inline(always)] + pub fn mwidth(&mut self) -> MWIDTH_W { + MWIDTH_W { w: self } } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&mut self) -> _PRIOW { - _PRIOW { w: self } + #[inline(always)] + pub fn prio(&mut self) -> PRIO_W { + PRIO_W { w: self } } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&mut self) -> _M2MW { - _M2MW { w: self } + #[inline(always)] + pub fn m2m(&mut self) -> M2M_W { + M2M_W { w: self } } } diff --git a/src/dma1/ch3maddr.rs b/src/dma1/ch3maddr.rs index 20e190e974e22859a439a512d6b2f0753f90792f..e6c9a99a17d89e5a3f3a9d8d8b1e5f7e24307f76 100644 --- a/src/dma1/ch3maddr.rs +++ b/src/dma1/ch3maddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH3MADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MADDRR { - bits: u32, -} -impl MADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MADDRW<'a> { +#[doc = "Reader of register CH3MADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH3MADDR"] +pub type W = crate::W; +#[doc = "Register CH3MADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH3MADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MADDR`"] +pub type MADDR_R = crate::R; +#[doc = "Write proxy for field `MADDR`"] +pub struct MADDR_W<'a> { w: &'a mut W, } -impl<'a> _MADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&self) -> MADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - MADDRR { bits } + #[inline(always)] + pub fn maddr(&self) -> MADDR_R { + MADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&mut self) -> _MADDRW { - _MADDRW { w: self } + #[inline(always)] + pub fn maddr(&mut self) -> MADDR_W { + MADDR_W { w: self } } } diff --git a/src/dma1/ch3paddr.rs b/src/dma1/ch3paddr.rs index e65898934ddb8e7b333139a4a4247a7b27977138..e9e47902cb1aafc0bcd21cd414bcbcdc1ba4eb54 100644 --- a/src/dma1/ch3paddr.rs +++ b/src/dma1/ch3paddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH3PADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PADDRR { - bits: u32, -} -impl PADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PADDRW<'a> { +#[doc = "Reader of register CH3PADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH3PADDR"] +pub type W = crate::W; +#[doc = "Register CH3PADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH3PADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PADDR`"] +pub type PADDR_R = crate::R; +#[doc = "Write proxy for field `PADDR`"] +pub struct PADDR_W<'a> { w: &'a mut W, } -impl<'a> _PADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&self) -> PADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - PADDRR { bits } + #[inline(always)] + pub fn paddr(&self) -> PADDR_R { + PADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&mut self) -> _PADDRW { - _PADDRW { w: self } + #[inline(always)] + pub fn paddr(&mut self) -> PADDR_W { + PADDR_W { w: self } } } diff --git a/src/dma1/ch4cnt.rs b/src/dma1/ch4cnt.rs index 265aa66d67f73f31fc976ba21db582f9b040cc35..d7089b40561bf0004b84b76146196458dad6027c 100644 --- a/src/dma1/ch4cnt.rs +++ b/src/dma1/ch4cnt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH4CNT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CH4CNT"] +pub type R = crate::R; +#[doc = "Writer for register CH4CNT"] +pub type W = crate::W; +#[doc = "Register CH4CNT `reset()`'s with value 0"] +impl crate::ResetValue for super::CH4CNT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Transfer counter"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/dma1/ch4ctl.rs b/src/dma1/ch4ctl.rs index e3867f099f3acb16f608a954341caf724e977d79..aca0392d4d652361fb5316dac72b0c4d43bb2487 100644 --- a/src/dma1/ch4ctl.rs +++ b/src/dma1/ch4ctl.rs @@ -1,718 +1,394 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH4CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CHENR { - bits: bool, -} -impl CHENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIER { - bits: bool, -} -impl FTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIER { - bits: bool, -} -impl HTFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DIRR { - bits: bool, -} -impl DIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CMENR { - bits: bool, -} -impl CMENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PNAGAR { - bits: bool, -} -impl PNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MNAGAR { - bits: bool, -} -impl MNAGAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PWIDTHR { - bits: u8, -} -impl PWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MWIDTHR { - bits: u8, -} -impl MWIDTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PRIOR { - bits: u8, -} -impl PRIOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct M2MR { - bits: bool, -} -impl M2MR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CHENW<'a> { +#[doc = "Reader of register CH4CTL"] +pub type R = crate::R; +#[doc = "Writer for register CH4CTL"] +pub type W = crate::W; +#[doc = "Register CH4CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CH4CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CHEN`"] +pub type CHEN_R = crate::R; +#[doc = "Write proxy for field `CHEN`"] +pub struct CHEN_W<'a> { w: &'a mut W, } -impl<'a> _CHENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIEW<'a> { +#[doc = "Reader of field `FTFIE`"] +pub type FTFIE_R = crate::R; +#[doc = "Write proxy for field `FTFIE`"] +pub struct FTFIE_W<'a> { w: &'a mut W, } -impl<'a> _FTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIEW<'a> { +#[doc = "Reader of field `HTFIE`"] +pub type HTFIE_R = crate::R; +#[doc = "Write proxy for field `HTFIE`"] +pub struct HTFIE_W<'a> { w: &'a mut W, } -impl<'a> _HTFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _DIRW<'a> { +#[doc = "Reader of field `DIR`"] +pub type DIR_R = crate::R; +#[doc = "Write proxy for field `DIR`"] +pub struct DIR_W<'a> { w: &'a mut W, } -impl<'a> _DIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CMENW<'a> { +#[doc = "Reader of field `CMEN`"] +pub type CMEN_R = crate::R; +#[doc = "Write proxy for field `CMEN`"] +pub struct CMEN_W<'a> { w: &'a mut W, } -impl<'a> _CMENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _PNAGAW<'a> { +#[doc = "Reader of field `PNAGA`"] +pub type PNAGA_R = crate::R; +#[doc = "Write proxy for field `PNAGA`"] +pub struct PNAGA_W<'a> { w: &'a mut W, } -impl<'a> _PNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _MNAGAW<'a> { +#[doc = "Reader of field `MNAGA`"] +pub type MNAGA_R = crate::R; +#[doc = "Write proxy for field `MNAGA`"] +pub struct MNAGA_W<'a> { w: &'a mut W, } -impl<'a> _MNAGAW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MNAGA_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _PWIDTHW<'a> { +#[doc = "Reader of field `PWIDTH`"] +pub type PWIDTH_R = crate::R; +#[doc = "Write proxy for field `PWIDTH`"] +pub struct PWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _PWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _MWIDTHW<'a> { +#[doc = "Reader of field `MWIDTH`"] +pub type MWIDTH_R = crate::R; +#[doc = "Write proxy for field `MWIDTH`"] +pub struct MWIDTH_W<'a> { w: &'a mut W, } -impl<'a> _MWIDTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MWIDTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PRIOW<'a> { +#[doc = "Reader of field `PRIO`"] +pub type PRIO_R = crate::R; +#[doc = "Write proxy for field `PRIO`"] +pub struct PRIO_W<'a> { w: &'a mut W, } -impl<'a> _PRIOW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PRIO_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _M2MW<'a> { +#[doc = "Reader of field `M2M`"] +pub type M2M_R = crate::R; +#[doc = "Write proxy for field `M2M`"] +pub struct M2M_W<'a> { w: &'a mut W, } -impl<'a> _M2MW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> M2M_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&self) -> CHENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHENR { bits } + #[inline(always)] + pub fn chen(&self) -> CHEN_R { + CHEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&self) -> FTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIER { bits } + #[inline(always)] + pub fn ftfie(&self) -> FTFIE_R { + FTFIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&self) -> HTFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIER { bits } + #[inline(always)] + pub fn htfie(&self) -> HTFIE_R { + HTFIE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&self) -> DIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DIRR { bits } + #[inline(always)] + pub fn dir(&self) -> DIR_R { + DIR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&self) -> CMENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CMENR { bits } + #[inline(always)] + pub fn cmen(&self) -> CMEN_R { + CMEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&self) -> PNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PNAGAR { bits } + #[inline(always)] + pub fn pnaga(&self) -> PNAGA_R { + PNAGA_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&self) -> MNAGAR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MNAGAR { bits } + #[inline(always)] + pub fn mnaga(&self) -> MNAGA_R { + MNAGA_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&self) -> PWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PWIDTHR { bits } + #[inline(always)] + pub fn pwidth(&self) -> PWIDTH_R { + PWIDTH_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&self) -> MWIDTHR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MWIDTHR { bits } + #[inline(always)] + pub fn mwidth(&self) -> MWIDTH_R { + MWIDTH_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&self) -> PRIOR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PRIOR { bits } + #[inline(always)] + pub fn prio(&self) -> PRIO_R { + PRIO_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&self) -> M2MR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - M2MR { bits } + #[inline(always)] + pub fn m2m(&self) -> M2M_R { + M2M_R::new(((self.bits >> 14) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Channel enable"] - #[inline] - pub fn chen(&mut self) -> _CHENW { - _CHENW { w: self } + #[inline(always)] + pub fn chen(&mut self) -> CHEN_W { + CHEN_W { w: self } } #[doc = "Bit 1 - Enable bit for channel full transfer finish interrupt"] - #[inline] - pub fn ftfie(&mut self) -> _FTFIEW { - _FTFIEW { w: self } + #[inline(always)] + pub fn ftfie(&mut self) -> FTFIE_W { + FTFIE_W { w: self } } #[doc = "Bit 2 - Enable bit for channel half transfer finish interrupt"] - #[inline] - pub fn htfie(&mut self) -> _HTFIEW { - _HTFIEW { w: self } + #[inline(always)] + pub fn htfie(&mut self) -> HTFIE_W { + HTFIE_W { w: self } } #[doc = "Bit 3 - Enable bit for channel error interrupt"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } #[doc = "Bit 4 - Transfer direction"] - #[inline] - pub fn dir(&mut self) -> _DIRW { - _DIRW { w: self } + #[inline(always)] + pub fn dir(&mut self) -> DIR_W { + DIR_W { w: self } } #[doc = "Bit 5 - Circular mode enable"] - #[inline] - pub fn cmen(&mut self) -> _CMENW { - _CMENW { w: self } + #[inline(always)] + pub fn cmen(&mut self) -> CMEN_W { + CMEN_W { w: self } } #[doc = "Bit 6 - Next address generation algorithm of peripheral"] - #[inline] - pub fn pnaga(&mut self) -> _PNAGAW { - _PNAGAW { w: self } + #[inline(always)] + pub fn pnaga(&mut self) -> PNAGA_W { + PNAGA_W { w: self } } #[doc = "Bit 7 - Next address generation algorithm of memory"] - #[inline] - pub fn mnaga(&mut self) -> _MNAGAW { - _MNAGAW { w: self } + #[inline(always)] + pub fn mnaga(&mut self) -> MNAGA_W { + MNAGA_W { w: self } } #[doc = "Bits 8:9 - Transfer data size of peripheral"] - #[inline] - pub fn pwidth(&mut self) -> _PWIDTHW { - _PWIDTHW { w: self } + #[inline(always)] + pub fn pwidth(&mut self) -> PWIDTH_W { + PWIDTH_W { w: self } } #[doc = "Bits 10:11 - Transfer data size of memory"] - #[inline] - pub fn mwidth(&mut self) -> _MWIDTHW { - _MWIDTHW { w: self } + #[inline(always)] + pub fn mwidth(&mut self) -> MWIDTH_W { + MWIDTH_W { w: self } } #[doc = "Bits 12:13 - Priority level"] - #[inline] - pub fn prio(&mut self) -> _PRIOW { - _PRIOW { w: self } + #[inline(always)] + pub fn prio(&mut self) -> PRIO_W { + PRIO_W { w: self } } #[doc = "Bit 14 - Memory to Memory Mode"] - #[inline] - pub fn m2m(&mut self) -> _M2MW { - _M2MW { w: self } + #[inline(always)] + pub fn m2m(&mut self) -> M2M_W { + M2M_W { w: self } } } diff --git a/src/dma1/ch4maddr.rs b/src/dma1/ch4maddr.rs index 64a898d5523f8523a6792bc8b239b61d0b73afcc..f4ba697fd4e099de74c9321437351084ce04a848 100644 --- a/src/dma1/ch4maddr.rs +++ b/src/dma1/ch4maddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH4MADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MADDRR { - bits: u32, -} -impl MADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MADDRW<'a> { +#[doc = "Reader of register CH4MADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH4MADDR"] +pub type W = crate::W; +#[doc = "Register CH4MADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH4MADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MADDR`"] +pub type MADDR_R = crate::R; +#[doc = "Write proxy for field `MADDR`"] +pub struct MADDR_W<'a> { w: &'a mut W, } -impl<'a> _MADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&self) -> MADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - MADDRR { bits } + #[inline(always)] + pub fn maddr(&self) -> MADDR_R { + MADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Memory base address"] - #[inline] - pub fn maddr(&mut self) -> _MADDRW { - _MADDRW { w: self } + #[inline(always)] + pub fn maddr(&mut self) -> MADDR_W { + MADDR_W { w: self } } } diff --git a/src/dma1/ch4paddr.rs b/src/dma1/ch4paddr.rs index ce033ecf758aab39531639ec7e9d30579fa12ab4..401eb65c660e1835aeb263670ca0d8f78a0d7da4 100644 --- a/src/dma1/ch4paddr.rs +++ b/src/dma1/ch4paddr.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH4PADDR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PADDRR { - bits: u32, -} -impl PADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PADDRW<'a> { +#[doc = "Reader of register CH4PADDR"] +pub type R = crate::R; +#[doc = "Writer for register CH4PADDR"] +pub type W = crate::W; +#[doc = "Register CH4PADDR `reset()`'s with value 0"] +impl crate::ResetValue for super::CH4PADDR { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PADDR`"] +pub type PADDR_R = crate::R; +#[doc = "Write proxy for field `PADDR`"] +pub struct PADDR_W<'a> { w: &'a mut W, } -impl<'a> _PADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&self) -> PADDRR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - PADDRR { bits } + #[inline(always)] + pub fn paddr(&self) -> PADDR_R { + PADDR_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Peripheral base address"] - #[inline] - pub fn paddr(&mut self) -> _PADDRW { - _PADDRW { w: self } + #[inline(always)] + pub fn paddr(&mut self) -> PADDR_W { + PADDR_W { w: self } } } diff --git a/src/dma1/intc.rs b/src/dma1/intc.rs index 8e666b8afedff3a28f2e5a7c68bf10f86ea2156c..c1105ed16bb64555f8621f569d3637a136fc8bc9 100644 --- a/src/dma1/intc.rs +++ b/src/dma1/intc.rs @@ -1,589 +1,552 @@ -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::INTC { - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } -} -#[doc = r" Proxy"] -pub struct _GIFC0W<'a> { +#[doc = "Writer for register INTC"] +pub type W = crate::W; +#[doc = "Register INTC `reset()`'s with value 0"] +impl crate::ResetValue for super::INTC { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Write proxy for field `GIFC0`"] +pub struct GIFC0_W<'a> { w: &'a mut W, } -impl<'a> _GIFC0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> GIFC0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIFC0W<'a> { +#[doc = "Write proxy for field `FTFIFC0`"] +pub struct FTFIFC0_W<'a> { w: &'a mut W, } -impl<'a> _FTFIFC0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIFC0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIFC0W<'a> { +#[doc = "Write proxy for field `HTFIFC0`"] +pub struct HTFIFC0_W<'a> { w: &'a mut W, } -impl<'a> _HTFIFC0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIFC0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIFC0W<'a> { +#[doc = "Write proxy for field `ERRIFC0`"] +pub struct ERRIFC0_W<'a> { w: &'a mut W, } -impl<'a> _ERRIFC0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIFC0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _GIFC1W<'a> { +#[doc = "Write proxy for field `GIFC1`"] +pub struct GIFC1_W<'a> { w: &'a mut W, } -impl<'a> _GIFC1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> GIFC1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIFC1W<'a> { +#[doc = "Write proxy for field `FTFIFC1`"] +pub struct FTFIFC1_W<'a> { w: &'a mut W, } -impl<'a> _FTFIFC1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIFC1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIFC1W<'a> { +#[doc = "Write proxy for field `HTFIFC1`"] +pub struct HTFIFC1_W<'a> { w: &'a mut W, } -impl<'a> _HTFIFC1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIFC1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIFC1W<'a> { +#[doc = "Write proxy for field `ERRIFC1`"] +pub struct ERRIFC1_W<'a> { w: &'a mut W, } -impl<'a> _ERRIFC1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIFC1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _GIFC2W<'a> { +#[doc = "Write proxy for field `GIFC2`"] +pub struct GIFC2_W<'a> { w: &'a mut W, } -impl<'a> _GIFC2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> GIFC2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIFC2W<'a> { +#[doc = "Write proxy for field `FTFIFC2`"] +pub struct FTFIFC2_W<'a> { w: &'a mut W, } -impl<'a> _FTFIFC2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIFC2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIFC2W<'a> { +#[doc = "Write proxy for field `HTFIFC2`"] +pub struct HTFIFC2_W<'a> { w: &'a mut W, } -impl<'a> _HTFIFC2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIFC2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIFC2W<'a> { +#[doc = "Write proxy for field `ERRIFC2`"] +pub struct ERRIFC2_W<'a> { w: &'a mut W, } -impl<'a> _ERRIFC2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIFC2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _GIFC3W<'a> { +#[doc = "Write proxy for field `GIFC3`"] +pub struct GIFC3_W<'a> { w: &'a mut W, } -impl<'a> _GIFC3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> GIFC3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIFC3W<'a> { +#[doc = "Write proxy for field `FTFIFC3`"] +pub struct FTFIFC3_W<'a> { w: &'a mut W, } -impl<'a> _FTFIFC3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIFC3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIFC3W<'a> { +#[doc = "Write proxy for field `HTFIFC3`"] +pub struct HTFIFC3_W<'a> { w: &'a mut W, } -impl<'a> _HTFIFC3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIFC3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIFC3W<'a> { +#[doc = "Write proxy for field `ERRIFC3`"] +pub struct ERRIFC3_W<'a> { w: &'a mut W, } -impl<'a> _ERRIFC3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIFC3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _GIFC4W<'a> { +#[doc = "Write proxy for field `GIFC4`"] +pub struct GIFC4_W<'a> { w: &'a mut W, } -impl<'a> _GIFC4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> GIFC4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FTFIFC4W<'a> { +#[doc = "Write proxy for field `FTFIFC4`"] +pub struct FTFIFC4_W<'a> { w: &'a mut W, } -impl<'a> _FTFIFC4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTFIFC4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _HTFIFC4W<'a> { +#[doc = "Write proxy for field `HTFIFC4`"] +pub struct HTFIFC4_W<'a> { w: &'a mut W, } -impl<'a> _HTFIFC4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HTFIFC4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIFC4W<'a> { +#[doc = "Write proxy for field `ERRIFC4`"] +pub struct ERRIFC4_W<'a> { w: &'a mut W, } -impl<'a> _ERRIFC4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIFC4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Clear global interrupt flag of channel 0"] - #[inline] - pub fn gifc0(&mut self) -> _GIFC0W { - _GIFC0W { w: self } + #[inline(always)] + pub fn gifc0(&mut self) -> GIFC0_W { + GIFC0_W { w: self } } #[doc = "Bit 1 - Clear bit for full transfer finish flag of channel 0"] - #[inline] - pub fn ftfifc0(&mut self) -> _FTFIFC0W { - _FTFIFC0W { w: self } + #[inline(always)] + pub fn ftfifc0(&mut self) -> FTFIFC0_W { + FTFIFC0_W { w: self } } #[doc = "Bit 2 - Clear bit for half transfer finish flag of channel 0"] - #[inline] - pub fn htfifc0(&mut self) -> _HTFIFC0W { - _HTFIFC0W { w: self } + #[inline(always)] + pub fn htfifc0(&mut self) -> HTFIFC0_W { + HTFIFC0_W { w: self } } #[doc = "Bit 3 - Clear bit for error flag of channel 0"] - #[inline] - pub fn errifc0(&mut self) -> _ERRIFC0W { - _ERRIFC0W { w: self } + #[inline(always)] + pub fn errifc0(&mut self) -> ERRIFC0_W { + ERRIFC0_W { w: self } } #[doc = "Bit 4 - Clear global interrupt flag of channel 1"] - #[inline] - pub fn gifc1(&mut self) -> _GIFC1W { - _GIFC1W { w: self } + #[inline(always)] + pub fn gifc1(&mut self) -> GIFC1_W { + GIFC1_W { w: self } } #[doc = "Bit 5 - Clear bit for full transfer finish flag of channel 1"] - #[inline] - pub fn ftfifc1(&mut self) -> _FTFIFC1W { - _FTFIFC1W { w: self } + #[inline(always)] + pub fn ftfifc1(&mut self) -> FTFIFC1_W { + FTFIFC1_W { w: self } } #[doc = "Bit 6 - Clear bit for half transfer finish flag of channel 1"] - #[inline] - pub fn htfifc1(&mut self) -> _HTFIFC1W { - _HTFIFC1W { w: self } + #[inline(always)] + pub fn htfifc1(&mut self) -> HTFIFC1_W { + HTFIFC1_W { w: self } } #[doc = "Bit 7 - Clear bit for error flag of channel 1"] - #[inline] - pub fn errifc1(&mut self) -> _ERRIFC1W { - _ERRIFC1W { w: self } + #[inline(always)] + pub fn errifc1(&mut self) -> ERRIFC1_W { + ERRIFC1_W { w: self } } #[doc = "Bit 8 - Clear global interrupt flag of channel 2"] - #[inline] - pub fn gifc2(&mut self) -> _GIFC2W { - _GIFC2W { w: self } + #[inline(always)] + pub fn gifc2(&mut self) -> GIFC2_W { + GIFC2_W { w: self } } #[doc = "Bit 9 - Clear bit for full transfer finish flag of channel 2"] - #[inline] - pub fn ftfifc2(&mut self) -> _FTFIFC2W { - _FTFIFC2W { w: self } + #[inline(always)] + pub fn ftfifc2(&mut self) -> FTFIFC2_W { + FTFIFC2_W { w: self } } #[doc = "Bit 10 - Clear bit for half transfer finish flag of channel 2"] - #[inline] - pub fn htfifc2(&mut self) -> _HTFIFC2W { - _HTFIFC2W { w: self } + #[inline(always)] + pub fn htfifc2(&mut self) -> HTFIFC2_W { + HTFIFC2_W { w: self } } #[doc = "Bit 11 - Clear bit for error flag of channel 2"] - #[inline] - pub fn errifc2(&mut self) -> _ERRIFC2W { - _ERRIFC2W { w: self } + #[inline(always)] + pub fn errifc2(&mut self) -> ERRIFC2_W { + ERRIFC2_W { w: self } } #[doc = "Bit 12 - Clear global interrupt flag of channel 3"] - #[inline] - pub fn gifc3(&mut self) -> _GIFC3W { - _GIFC3W { w: self } + #[inline(always)] + pub fn gifc3(&mut self) -> GIFC3_W { + GIFC3_W { w: self } } #[doc = "Bit 13 - Clear bit for full transfer finish flag of channel 3"] - #[inline] - pub fn ftfifc3(&mut self) -> _FTFIFC3W { - _FTFIFC3W { w: self } + #[inline(always)] + pub fn ftfifc3(&mut self) -> FTFIFC3_W { + FTFIFC3_W { w: self } } #[doc = "Bit 14 - Clear bit for half transfer finish flag of channel 3"] - #[inline] - pub fn htfifc3(&mut self) -> _HTFIFC3W { - _HTFIFC3W { w: self } + #[inline(always)] + pub fn htfifc3(&mut self) -> HTFIFC3_W { + HTFIFC3_W { w: self } } #[doc = "Bit 15 - Clear bit for error flag of channel 3"] - #[inline] - pub fn errifc3(&mut self) -> _ERRIFC3W { - _ERRIFC3W { w: self } + #[inline(always)] + pub fn errifc3(&mut self) -> ERRIFC3_W { + ERRIFC3_W { w: self } } #[doc = "Bit 16 - Clear global interrupt flag of channel 4"] - #[inline] - pub fn gifc4(&mut self) -> _GIFC4W { - _GIFC4W { w: self } + #[inline(always)] + pub fn gifc4(&mut self) -> GIFC4_W { + GIFC4_W { w: self } } #[doc = "Bit 17 - Clear bit for full transfer finish flag of channel 4"] - #[inline] - pub fn ftfifc4(&mut self) -> _FTFIFC4W { - _FTFIFC4W { w: self } + #[inline(always)] + pub fn ftfifc4(&mut self) -> FTFIFC4_W { + FTFIFC4_W { w: self } } #[doc = "Bit 18 - Clear bit for half transfer finish flag of channel 4"] - #[inline] - pub fn htfifc4(&mut self) -> _HTFIFC4W { - _HTFIFC4W { w: self } + #[inline(always)] + pub fn htfifc4(&mut self) -> HTFIFC4_W { + HTFIFC4_W { w: self } } #[doc = "Bit 19 - Clear bit for error flag of channel 4"] - #[inline] - pub fn errifc4(&mut self) -> _ERRIFC4W { - _ERRIFC4W { w: self } + #[inline(always)] + pub fn errifc4(&mut self) -> ERRIFC4_W { + ERRIFC4_W { w: self } } } diff --git a/src/dma1/intf.rs b/src/dma1/intf.rs index d7a9557429a86ee6354078f84ada9f46582e3d11..37a319cc43cbebed74c4239642a71b5aae10116e 100644 --- a/src/dma1/intf.rs +++ b/src/dma1/intf.rs @@ -1,640 +1,144 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::INTF { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct GIF0R { - bits: bool, -} -impl GIF0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIF0R { - bits: bool, -} -impl FTFIF0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIF0R { - bits: bool, -} -impl HTFIF0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIF0R { - bits: bool, -} -impl ERRIF0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GIF1R { - bits: bool, -} -impl GIF1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIF1R { - bits: bool, -} -impl FTFIF1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIF1R { - bits: bool, -} -impl HTFIF1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIF1R { - bits: bool, -} -impl ERRIF1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GIF2R { - bits: bool, -} -impl GIF2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIF2R { - bits: bool, -} -impl FTFIF2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIF2R { - bits: bool, -} -impl HTFIF2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIF2R { - bits: bool, -} -impl ERRIF2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GIF3R { - bits: bool, -} -impl GIF3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIF3R { - bits: bool, -} -impl FTFIF3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIF3R { - bits: bool, -} -impl HTFIF3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIF3R { - bits: bool, -} -impl ERRIF3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GIF4R { - bits: bool, -} -impl GIF4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTFIF4R { - bits: bool, -} -impl FTFIF4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HTFIF4R { - bits: bool, -} -impl HTFIF4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIF4R { - bits: bool, -} -impl ERRIF4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} +#[doc = "Reader of register INTF"] +pub type R = crate::R; +#[doc = "Reader of field `GIF0`"] +pub type GIF0_R = crate::R; +#[doc = "Reader of field `FTFIF0`"] +pub type FTFIF0_R = crate::R; +#[doc = "Reader of field `HTFIF0`"] +pub type HTFIF0_R = crate::R; +#[doc = "Reader of field `ERRIF0`"] +pub type ERRIF0_R = crate::R; +#[doc = "Reader of field `GIF1`"] +pub type GIF1_R = crate::R; +#[doc = "Reader of field `FTFIF1`"] +pub type FTFIF1_R = crate::R; +#[doc = "Reader of field `HTFIF1`"] +pub type HTFIF1_R = crate::R; +#[doc = "Reader of field `ERRIF1`"] +pub type ERRIF1_R = crate::R; +#[doc = "Reader of field `GIF2`"] +pub type GIF2_R = crate::R; +#[doc = "Reader of field `FTFIF2`"] +pub type FTFIF2_R = crate::R; +#[doc = "Reader of field `HTFIF2`"] +pub type HTFIF2_R = crate::R; +#[doc = "Reader of field `ERRIF2`"] +pub type ERRIF2_R = crate::R; +#[doc = "Reader of field `GIF3`"] +pub type GIF3_R = crate::R; +#[doc = "Reader of field `FTFIF3`"] +pub type FTFIF3_R = crate::R; +#[doc = "Reader of field `HTFIF3`"] +pub type HTFIF3_R = crate::R; +#[doc = "Reader of field `ERRIF3`"] +pub type ERRIF3_R = crate::R; +#[doc = "Reader of field `GIF4`"] +pub type GIF4_R = crate::R; +#[doc = "Reader of field `FTFIF4`"] +pub type FTFIF4_R = crate::R; +#[doc = "Reader of field `HTFIF4`"] +pub type HTFIF4_R = crate::R; +#[doc = "Reader of field `ERRIF4`"] +pub type ERRIF4_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Global interrupt flag of channel 0"] - #[inline] - pub fn gif0(&self) -> GIF0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GIF0R { bits } + #[inline(always)] + pub fn gif0(&self) -> GIF0_R { + GIF0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Full Transfer finish flag of channe 0"] - #[inline] - pub fn ftfif0(&self) -> FTFIF0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIF0R { bits } + #[inline(always)] + pub fn ftfif0(&self) -> FTFIF0_R { + FTFIF0_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Half transfer finish flag of channel 0"] - #[inline] - pub fn htfif0(&self) -> HTFIF0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIF0R { bits } + #[inline(always)] + pub fn htfif0(&self) -> HTFIF0_R { + HTFIF0_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Error flag of channel 0"] - #[inline] - pub fn errif0(&self) -> ERRIF0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIF0R { bits } + #[inline(always)] + pub fn errif0(&self) -> ERRIF0_R { + ERRIF0_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Global interrupt flag of channel 1"] - #[inline] - pub fn gif1(&self) -> GIF1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GIF1R { bits } + #[inline(always)] + pub fn gif1(&self) -> GIF1_R { + GIF1_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Full Transfer finish flag of channe 1"] - #[inline] - pub fn ftfif1(&self) -> FTFIF1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIF1R { bits } + #[inline(always)] + pub fn ftfif1(&self) -> FTFIF1_R { + FTFIF1_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Half transfer finish flag of channel 1"] - #[inline] - pub fn htfif1(&self) -> HTFIF1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIF1R { bits } + #[inline(always)] + pub fn htfif1(&self) -> HTFIF1_R { + HTFIF1_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Error flag of channel 1"] - #[inline] - pub fn errif1(&self) -> ERRIF1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIF1R { bits } + #[inline(always)] + pub fn errif1(&self) -> ERRIF1_R { + ERRIF1_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Global interrupt flag of channel 2"] - #[inline] - pub fn gif2(&self) -> GIF2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GIF2R { bits } + #[inline(always)] + pub fn gif2(&self) -> GIF2_R { + GIF2_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Full Transfer finish flag of channe 2"] - #[inline] - pub fn ftfif2(&self) -> FTFIF2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIF2R { bits } + #[inline(always)] + pub fn ftfif2(&self) -> FTFIF2_R { + FTFIF2_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Half transfer finish flag of channel 2"] - #[inline] - pub fn htfif2(&self) -> HTFIF2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIF2R { bits } + #[inline(always)] + pub fn htfif2(&self) -> HTFIF2_R { + HTFIF2_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Error flag of channel 2"] - #[inline] - pub fn errif2(&self) -> ERRIF2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIF2R { bits } + #[inline(always)] + pub fn errif2(&self) -> ERRIF2_R { + ERRIF2_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Global interrupt flag of channel 3"] - #[inline] - pub fn gif3(&self) -> GIF3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GIF3R { bits } + #[inline(always)] + pub fn gif3(&self) -> GIF3_R { + GIF3_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Full Transfer finish flag of channe 3"] - #[inline] - pub fn ftfif3(&self) -> FTFIF3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIF3R { bits } + #[inline(always)] + pub fn ftfif3(&self) -> FTFIF3_R { + FTFIF3_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Half transfer finish flag of channel 3"] - #[inline] - pub fn htfif3(&self) -> HTFIF3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIF3R { bits } + #[inline(always)] + pub fn htfif3(&self) -> HTFIF3_R { + HTFIF3_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Error flag of channel 3"] - #[inline] - pub fn errif3(&self) -> ERRIF3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIF3R { bits } + #[inline(always)] + pub fn errif3(&self) -> ERRIF3_R { + ERRIF3_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Global interrupt flag of channel 4"] - #[inline] - pub fn gif4(&self) -> GIF4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GIF4R { bits } + #[inline(always)] + pub fn gif4(&self) -> GIF4_R { + GIF4_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Full Transfer finish flag of channe 4"] - #[inline] - pub fn ftfif4(&self) -> FTFIF4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTFIF4R { bits } + #[inline(always)] + pub fn ftfif4(&self) -> FTFIF4_R { + FTFIF4_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Half transfer finish flag of channel 4"] - #[inline] - pub fn htfif4(&self) -> HTFIF4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HTFIF4R { bits } + #[inline(always)] + pub fn htfif4(&self) -> HTFIF4_R { + HTFIF4_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Error flag of channel 4"] - #[inline] - pub fn errif4(&self) -> ERRIF4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIF4R { bits } + #[inline(always)] + pub fn errif4(&self) -> ERRIF4_R { + ERRIF4_R::new(((self.bits >> 19) & 0x01) != 0) } } diff --git a/src/eclic.rs b/src/eclic.rs index 292861467690abfb6493db549764233bc034d319..12fc5011157e236f652a4f5877ffbb26ef2c0cc9 100644 --- a/src/eclic.rs +++ b/src/eclic.rs @@ -1,19 +1,19 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - cliccfg Register"] pub cliccfg: CLICCFG, - _reserved0: [u8; 3usize], + _reserved1: [u8; 3usize], #[doc = "0x04 - clicinfo Register"] pub clicinfo: CLICINFO, - _reserved1: [u8; 3usize], + _reserved2: [u8; 3usize], #[doc = "0x0b - MTH Register"] pub mth: MTH, - _reserved2: [u8; 4084usize], + _reserved3: [u8; 4084usize], #[doc = "0x1000 - Core-local Interrupt Controller Interrupt Registers"] - pub clicints: [CLICINTS; 86], + pub clicints: [CLICINTS; 87], } -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct CLICINTS { #[doc = "0x00 - clicintip Register"] @@ -25,24 +25,37 @@ pub struct CLICINTS { #[doc = "0x03 - clicintctl Register"] pub clicintctl: self::clicints::CLICINTCTL, } -#[doc = r" Register block"] +#[doc = r"Register block"] #[doc = "Core-local Interrupt Controller Interrupt Registers"] pub mod clicints; -#[doc = "cliccfg Register"] -pub struct CLICCFG { - register: ::vcell::VolatileCell, -} +#[doc = "cliccfg Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cliccfg](cliccfg) module"] +pub type CLICCFG = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CLICCFG; +#[doc = "`read()` method returns [cliccfg::R](cliccfg::R) reader structure"] +impl crate::Readable for CLICCFG {} +#[doc = "`write(|w| ..)` method takes [cliccfg::W](cliccfg::W) writer structure"] +impl crate::Writable for CLICCFG {} #[doc = "cliccfg Register"] pub mod cliccfg; -#[doc = "clicinfo Register"] -pub struct CLICINFO { - register: ::vcell::VolatileCell, -} +#[doc = "clicinfo Register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clicinfo](clicinfo) module"] +pub type CLICINFO = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CLICINFO; +#[doc = "`read()` method returns [clicinfo::R](clicinfo::R) reader structure"] +impl crate::Readable for CLICINFO {} #[doc = "clicinfo Register"] pub mod clicinfo; -#[doc = "MTH Register"] -pub struct MTH { - register: ::vcell::VolatileCell, -} +#[doc = "MTH Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [mth](mth) module"] +pub type MTH = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _MTH; +#[doc = "`read()` method returns [mth::R](mth::R) reader structure"] +impl crate::Readable for MTH {} +#[doc = "`write(|w| ..)` method takes [mth::W](mth::W) writer structure"] +impl crate::Writable for MTH {} #[doc = "MTH Register"] pub mod mth; diff --git a/src/eclic/cliccfg.rs b/src/eclic/cliccfg.rs index 4783ae02157b826d95416e0300e891406c687c0e..fec873167a39bba62156e53c80f4c20ec6a58940 100644 --- a/src/eclic/cliccfg.rs +++ b/src/eclic/cliccfg.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u8, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u8, -} -impl super::CLICCFG { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct NLBITSR { - bits: u8, -} -impl NLBITSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _NLBITSW<'a> { +#[doc = "Reader of register CLICCFG"] +pub type R = crate::R; +#[doc = "Writer for register CLICCFG"] +pub type W = crate::W; +#[doc = "Register CLICCFG `reset()`'s with value 0"] +impl crate::ResetValue for super::CLICCFG { + type Type = u8; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `NLBITS`"] +pub type NLBITS_R = crate::R; +#[doc = "Write proxy for field `NLBITS`"] +pub struct NLBITS_W<'a> { w: &'a mut W, } -impl<'a> _NLBITSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> NLBITS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u8) << OFFSET); - self.w.bits |= ((value & MASK) as u8) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 1)) | (((value as u8) & 0x0f) << 1); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } #[doc = "Bits 1:4 - NLBITS"] - #[inline] - pub fn nlbits(&self) -> NLBITSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u8) as u8 - }; - NLBITSR { bits } + #[inline(always)] + pub fn nlbits(&self) -> NLBITS_R { + NLBITS_R::new(((self.bits >> 1) & 0x0f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u8) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 1:4 - NLBITS"] - #[inline] - pub fn nlbits(&mut self) -> _NLBITSW { - _NLBITSW { w: self } + #[inline(always)] + pub fn nlbits(&mut self) -> NLBITS_W { + NLBITS_W { w: self } } } diff --git a/src/eclic/clicinfo.rs b/src/eclic/clicinfo.rs index 45788fabd3ab244a5e5cd4353ddda0552e34b2e7..c69c04d6f9b408f6eedd599c90334790756d0fc0 100644 --- a/src/eclic/clicinfo.rs +++ b/src/eclic/clicinfo.rs @@ -1,83 +1,25 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::CLICINFO { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct NUM_INTERRUPTR { - bits: u16, -} -impl NUM_INTERRUPTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct VERSIONR { - bits: u8, -} -impl VERSIONR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CLICINTCTLBITSR { - bits: u8, -} -impl CLICINTCTLBITSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} +#[doc = "Reader of register CLICINFO"] +pub type R = crate::R; +#[doc = "Reader of field `NUM_INTERRUPT`"] +pub type NUM_INTERRUPT_R = crate::R; +#[doc = "Reader of field `VERSION`"] +pub type VERSION_R = crate::R; +#[doc = "Reader of field `CLICINTCTLBITS`"] +pub type CLICINTCTLBITS_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:12 - NUM_INTERRUPT"] - #[inline] - pub fn num_interrupt(&self) -> NUM_INTERRUPTR { - let bits = { - const MASK: u16 = 0x1fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - NUM_INTERRUPTR { bits } + #[inline(always)] + pub fn num_interrupt(&self) -> NUM_INTERRUPT_R { + NUM_INTERRUPT_R::new((self.bits & 0x1fff) as u16) } #[doc = "Bits 13:20 - VERSION"] - #[inline] - pub fn version(&self) -> VERSIONR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - VERSIONR { bits } + #[inline(always)] + pub fn version(&self) -> VERSION_R { + VERSION_R::new(((self.bits >> 13) & 0xff) as u8) } #[doc = "Bits 21:24 - CLICINTCTLBITS"] - #[inline] - pub fn clicintctlbits(&self) -> CLICINTCTLBITSR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CLICINTCTLBITSR { bits } + #[inline(always)] + pub fn clicintctlbits(&self) -> CLICINTCTLBITS_R { + CLICINTCTLBITS_R::new(((self.bits >> 21) & 0x0f) as u8) } } diff --git a/src/eclic/clicints.rs b/src/eclic/clicints.rs index 91dd9a1800027165316e7bfe1838c41acd8e5c6e..fa7427a04a8cf53cdd83c5695eae9c3c296fa3fb 100644 --- a/src/eclic/clicints.rs +++ b/src/eclic/clicints.rs @@ -1,24 +1,44 @@ -#[doc = "clicintip Register"] -pub struct CLICINTIP { - register: ::vcell::VolatileCell, -} +#[doc = "clicintip Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clicintip](clicintip) module"] +pub type CLICINTIP = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CLICINTIP; +#[doc = "`read()` method returns [clicintip::R](clicintip::R) reader structure"] +impl crate::Readable for CLICINTIP {} +#[doc = "`write(|w| ..)` method takes [clicintip::W](clicintip::W) writer structure"] +impl crate::Writable for CLICINTIP {} #[doc = "clicintip Register"] pub mod clicintip; -#[doc = "clicintie Register"] -pub struct CLICINTIE { - register: ::vcell::VolatileCell, -} +#[doc = "clicintie Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clicintie](clicintie) module"] +pub type CLICINTIE = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CLICINTIE; +#[doc = "`read()` method returns [clicintie::R](clicintie::R) reader structure"] +impl crate::Readable for CLICINTIE {} +#[doc = "`write(|w| ..)` method takes [clicintie::W](clicintie::W) writer structure"] +impl crate::Writable for CLICINTIE {} #[doc = "clicintie Register"] pub mod clicintie; -#[doc = "clicintattr Register"] -pub struct CLICINTATTR { - register: ::vcell::VolatileCell, -} +#[doc = "clicintattr Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clicintattr](clicintattr) module"] +pub type CLICINTATTR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CLICINTATTR; +#[doc = "`read()` method returns [clicintattr::R](clicintattr::R) reader structure"] +impl crate::Readable for CLICINTATTR {} +#[doc = "`write(|w| ..)` method takes [clicintattr::W](clicintattr::W) writer structure"] +impl crate::Writable for CLICINTATTR {} #[doc = "clicintattr Register"] pub mod clicintattr; -#[doc = "clicintctl Register"] -pub struct CLICINTCTL { - register: ::vcell::VolatileCell, -} +#[doc = "clicintctl Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [clicintctl](clicintctl) module"] +pub type CLICINTCTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CLICINTCTL; +#[doc = "`read()` method returns [clicintctl::R](clicintctl::R) reader structure"] +impl crate::Readable for CLICINTCTL {} +#[doc = "`write(|w| ..)` method takes [clicintctl::W](clicintctl::W) writer structure"] +impl crate::Writable for CLICINTCTL {} #[doc = "clicintctl Register"] pub mod clicintctl; diff --git a/src/eclic/clicints/clicintattr.rs b/src/eclic/clicints/clicintattr.rs index c9ef1d590b88b6dffcc7904981174281f8ae57ce..501199611e437e67a56f39a14c9fee25c57bc1f2 100644 --- a/src/eclic/clicints/clicintattr.rs +++ b/src/eclic/clicints/clicintattr.rs @@ -1,164 +1,74 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u8, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u8, -} -impl super::CLICINTATTR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SHVR { - bits: bool, -} -impl SHVR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TRIGR { - bits: u8, -} -impl TRIGR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits +#[doc = "Reader of register CLICINTATTR"] +pub type R = crate::R; +#[doc = "Writer for register CLICINTATTR"] +pub type W = crate::W; +#[doc = "Register CLICINTATTR `reset()`'s with value 0"] +impl crate::ResetValue for super::CLICINTATTR { + type Type = u8; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _SHVW<'a> { +#[doc = "Reader of field `SHV`"] +pub type SHV_R = crate::R; +#[doc = "Write proxy for field `SHV`"] +pub struct SHV_W<'a> { w: &'a mut W, } -impl<'a> _SHVW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SHV_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u8) << OFFSET); - self.w.bits |= ((value & MASK) as u8) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u8) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _TRIGW<'a> { +#[doc = "Reader of field `TRIG`"] +pub type TRIG_R = crate::R; +#[doc = "Write proxy for field `TRIG`"] +pub struct TRIG_W<'a> { w: &'a mut W, } -impl<'a> _TRIGW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TRIG_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u8) << OFFSET); - self.w.bits |= ((value & MASK) as u8) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 1)) | (((value as u8) & 0x03) << 1); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } #[doc = "Bit 0 - SHV"] - #[inline] - pub fn shv(&self) -> SHVR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u8) != 0 - }; - SHVR { bits } + #[inline(always)] + pub fn shv(&self) -> SHV_R { + SHV_R::new((self.bits & 0x01) != 0) } #[doc = "Bits 1:2 - TRIG"] - #[inline] - pub fn trig(&self) -> TRIGR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u8) as u8 - }; - TRIGR { bits } + #[inline(always)] + pub fn trig(&self) -> TRIG_R { + TRIG_R::new(((self.bits >> 1) & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u8) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - SHV"] - #[inline] - pub fn shv(&mut self) -> _SHVW { - _SHVW { w: self } + #[inline(always)] + pub fn shv(&mut self) -> SHV_W { + SHV_W { w: self } } #[doc = "Bits 1:2 - TRIG"] - #[inline] - pub fn trig(&mut self) -> _TRIGW { - _TRIGW { w: self } + #[inline(always)] + pub fn trig(&mut self) -> TRIG_W { + TRIG_W { w: self } } } diff --git a/src/eclic/clicints/clicintctl.rs b/src/eclic/clicints/clicintctl.rs index 3dc6d9d779b06956693c395bc5c590f4609641dd..f8784b5e10115a982b4115f8966c1dfb33b9cf09 100644 --- a/src/eclic/clicints/clicintctl.rs +++ b/src/eclic/clicints/clicintctl.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u8, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u8, -} -impl super::CLICINTCTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct LEVEL_PRIORITYR { - bits: u8, -} -impl LEVEL_PRIORITYR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _LEVEL_PRIORITYW<'a> { +#[doc = "Reader of register CLICINTCTL"] +pub type R = crate::R; +#[doc = "Writer for register CLICINTCTL"] +pub type W = crate::W; +#[doc = "Register CLICINTCTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CLICINTCTL { + type Type = u8; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `LEVEL_PRIORITY`"] +pub type LEVEL_PRIORITY_R = crate::R; +#[doc = "Write proxy for field `LEVEL_PRIORITY`"] +pub struct LEVEL_PRIORITY_W<'a> { w: &'a mut W, } -impl<'a> _LEVEL_PRIORITYW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> LEVEL_PRIORITY_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u8) << OFFSET); - self.w.bits |= ((value & MASK) as u8) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u8) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } #[doc = "Bits 0:7 - LEVEL_PRIORITY"] - #[inline] - pub fn level_priority(&self) -> LEVEL_PRIORITYR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u8) as u8 - }; - LEVEL_PRIORITYR { bits } + #[inline(always)] + pub fn level_priority(&self) -> LEVEL_PRIORITY_R { + LEVEL_PRIORITY_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u8) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:7 - LEVEL_PRIORITY"] - #[inline] - pub fn level_priority(&mut self) -> _LEVEL_PRIORITYW { - _LEVEL_PRIORITYW { w: self } + #[inline(always)] + pub fn level_priority(&mut self) -> LEVEL_PRIORITY_W { + LEVEL_PRIORITY_W { w: self } } } diff --git a/src/eclic/clicints/clicintie.rs b/src/eclic/clicints/clicintie.rs index 96e5475b1113f0f44951aa9bc5f422197dccf5ac..6aa5c11ea3c0216cc35c63d4e5fad7dbb9529a71 100644 --- a/src/eclic/clicints/clicintie.rs +++ b/src/eclic/clicints/clicintie.rs @@ -1,123 +1,50 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u8, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u8, -} -impl super::CLICINTIE { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IER { - bits: bool, -} -impl IER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _IEW<'a> { +#[doc = "Reader of register CLICINTIE"] +pub type R = crate::R; +#[doc = "Writer for register CLICINTIE"] +pub type W = crate::W; +#[doc = "Register CLICINTIE `reset()`'s with value 0"] +impl crate::ResetValue for super::CLICINTIE { + type Type = u8; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `IE`"] +pub type IE_R = crate::R; +#[doc = "Write proxy for field `IE`"] +pub struct IE_W<'a> { w: &'a mut W, } -impl<'a> _IEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u8) << OFFSET); - self.w.bits |= ((value & MASK) as u8) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u8) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } #[doc = "Bit 0 - IE"] - #[inline] - pub fn ie(&self) -> IER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u8) != 0 - }; - IER { bits } + #[inline(always)] + pub fn ie(&self) -> IE_R { + IE_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u8) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - IE"] - #[inline] - pub fn ie(&mut self) -> _IEW { - _IEW { w: self } + #[inline(always)] + pub fn ie(&mut self) -> IE_W { + IE_W { w: self } } } diff --git a/src/eclic/clicints/clicintip.rs b/src/eclic/clicints/clicintip.rs index 194cd258407ec9e5bdfb6c5b8af2e3f12a20c74b..a4f086a62e88f10e3a31a08143ff7377aac090cb 100644 --- a/src/eclic/clicints/clicintip.rs +++ b/src/eclic/clicints/clicintip.rs @@ -1,123 +1,50 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u8, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u8, -} -impl super::CLICINTIP { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IPR { - bits: bool, -} -impl IPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _IPW<'a> { +#[doc = "Reader of register CLICINTIP"] +pub type R = crate::R; +#[doc = "Writer for register CLICINTIP"] +pub type W = crate::W; +#[doc = "Register CLICINTIP `reset()`'s with value 0"] +impl crate::ResetValue for super::CLICINTIP { + type Type = u8; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `IP`"] +pub type IP_R = crate::R; +#[doc = "Write proxy for field `IP`"] +pub struct IP_W<'a> { w: &'a mut W, } -impl<'a> _IPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u8) << OFFSET); - self.w.bits |= ((value & MASK) as u8) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u8) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } #[doc = "Bit 0 - IP"] - #[inline] - pub fn ip(&self) -> IPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u8) != 0 - }; - IPR { bits } + #[inline(always)] + pub fn ip(&self) -> IP_R { + IP_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u8) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - IP"] - #[inline] - pub fn ip(&mut self) -> _IPW { - _IPW { w: self } + #[inline(always)] + pub fn ip(&mut self) -> IP_W { + IP_W { w: self } } } diff --git a/src/eclic/mth.rs b/src/eclic/mth.rs index bf48bb1ce9cd4b9bc6661f0abce25c68ed748ab2..0d9347f7ea28169929e3fc88fc9e84612908472a 100644 --- a/src/eclic/mth.rs +++ b/src/eclic/mth.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u8, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u8, -} -impl super::MTH { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MTHR { - bits: u8, -} -impl MTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MTHW<'a> { +#[doc = "Reader of register MTH"] +pub type R = crate::R; +#[doc = "Writer for register MTH"] +pub type W = crate::W; +#[doc = "Register MTH `reset()`'s with value 0"] +impl crate::ResetValue for super::MTH { + type Type = u8; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MTH`"] +pub type MTH_R = crate::R; +#[doc = "Write proxy for field `MTH`"] +pub struct MTH_W<'a> { w: &'a mut W, } -impl<'a> _MTHW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MTH_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u8) << OFFSET); - self.w.bits |= ((value & MASK) as u8) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u8) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } #[doc = "Bits 0:7 - MTH"] - #[inline] - pub fn mth(&self) -> MTHR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u8) as u8 - }; - MTHR { bits } + #[inline(always)] + pub fn mth(&self) -> MTH_R { + MTH_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u8) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:7 - MTH"] - #[inline] - pub fn mth(&mut self) -> _MTHW { - _MTHW { w: self } + #[inline(always)] + pub fn mth(&mut self) -> MTH_W { + MTH_W { w: self } } } diff --git a/src/exmc.rs b/src/exmc.rs index dc73297eca36e626ed2e0c122e0bd3cf4992026c..84e16529e2595ca894ce13042e42498d17259dc9 100644 --- a/src/exmc.rs +++ b/src/exmc.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - SRAM/NOR flash control register 0"] @@ -8,21 +8,36 @@ pub struct RegisterBlock { #[doc = "0x08 - SRAM/NOR flash control register 1"] pub snctl1: SNCTL1, } -#[doc = "SRAM/NOR flash control register 0"] -pub struct SNCTL0 { - register: ::vcell::VolatileCell, -} +#[doc = "SRAM/NOR flash control register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [snctl0](snctl0) module"] +pub type SNCTL0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _SNCTL0; +#[doc = "`read()` method returns [snctl0::R](snctl0::R) reader structure"] +impl crate::Readable for SNCTL0 {} +#[doc = "`write(|w| ..)` method takes [snctl0::W](snctl0::W) writer structure"] +impl crate::Writable for SNCTL0 {} #[doc = "SRAM/NOR flash control register 0"] pub mod snctl0; -#[doc = "SRAM/NOR flash timing configuration register 0"] -pub struct SNTCFG0 { - register: ::vcell::VolatileCell, -} +#[doc = "SRAM/NOR flash timing configuration register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [sntcfg0](sntcfg0) module"] +pub type SNTCFG0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _SNTCFG0; +#[doc = "`read()` method returns [sntcfg0::R](sntcfg0::R) reader structure"] +impl crate::Readable for SNTCFG0 {} +#[doc = "`write(|w| ..)` method takes [sntcfg0::W](sntcfg0::W) writer structure"] +impl crate::Writable for SNTCFG0 {} #[doc = "SRAM/NOR flash timing configuration register 0"] pub mod sntcfg0; -#[doc = "SRAM/NOR flash control register 1"] -pub struct SNCTL1 { - register: ::vcell::VolatileCell, -} +#[doc = "SRAM/NOR flash control register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [snctl1](snctl1) module"] +pub type SNCTL1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _SNCTL1; +#[doc = "`read()` method returns [snctl1::R](snctl1::R) reader structure"] +impl crate::Readable for SNCTL1 {} +#[doc = "`write(|w| ..)` method takes [snctl1::W](snctl1::W) writer structure"] +impl crate::Writable for SNCTL1 {} #[doc = "SRAM/NOR flash control register 1"] pub mod snctl1; diff --git a/src/exmc/snctl0.rs b/src/exmc/snctl0.rs index daa4aa32f07db9b43c3ed90024b0452af2dcb482..22a6fcf7483d0c271d0eaf790332873df5e30c57 100644 --- a/src/exmc/snctl0.rs +++ b/src/exmc/snctl0.rs @@ -1,559 +1,302 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::SNCTL0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct ASYNCWAITR { - bits: bool, -} -impl ASYNCWAITR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NRWTENR { - bits: bool, -} -impl NRWTENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WRENR { - bits: bool, -} -impl WRENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NRWTPOLR { - bits: bool, -} -impl NRWTPOLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NRENR { - bits: bool, -} -impl NRENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NRWR { - bits: u8, -} -impl NRWR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct NRTPR { - bits: u8, -} -impl NRTPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct NRMUXR { - bits: bool, -} -impl NRMUXR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NRBKENR { - bits: bool, -} -impl NRBKENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _ASYNCWAITW<'a> { +#[doc = "Reader of register SNCTL0"] +pub type R = crate::R; +#[doc = "Writer for register SNCTL0"] +pub type W = crate::W; +#[doc = "Register SNCTL0 `reset()`'s with value 0x30da"] +impl crate::ResetValue for super::SNCTL0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x30da + } +} +#[doc = "Reader of field `ASYNCWAIT`"] +pub type ASYNCWAIT_R = crate::R; +#[doc = "Write proxy for field `ASYNCWAIT`"] +pub struct ASYNCWAIT_W<'a> { w: &'a mut W, } -impl<'a> _ASYNCWAITW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ASYNCWAIT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _NRWTENW<'a> { +#[doc = "Reader of field `NRWTEN`"] +pub type NRWTEN_R = crate::R; +#[doc = "Write proxy for field `NRWTEN`"] +pub struct NRWTEN_W<'a> { w: &'a mut W, } -impl<'a> _NRWTENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NRWTEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _WRENW<'a> { +#[doc = "Reader of field `WREN`"] +pub type WREN_R = crate::R; +#[doc = "Write proxy for field `WREN`"] +pub struct WREN_W<'a> { w: &'a mut W, } -impl<'a> _WRENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WREN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _NRWTPOLW<'a> { +#[doc = "Reader of field `NRWTPOL`"] +pub type NRWTPOL_R = crate::R; +#[doc = "Write proxy for field `NRWTPOL`"] +pub struct NRWTPOL_W<'a> { w: &'a mut W, } -impl<'a> _NRWTPOLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NRWTPOL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _NRENW<'a> { +#[doc = "Reader of field `NREN`"] +pub type NREN_R = crate::R; +#[doc = "Write proxy for field `NREN`"] +pub struct NREN_W<'a> { w: &'a mut W, } -impl<'a> _NRENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NREN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _NRWW<'a> { +#[doc = "Reader of field `NRW`"] +pub type NRW_R = crate::R; +#[doc = "Write proxy for field `NRW`"] +pub struct NRW_W<'a> { w: &'a mut W, } -impl<'a> _NRWW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> NRW_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 4)) | (((value as u32) & 0x03) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _NRTPW<'a> { +#[doc = "Reader of field `NRTP`"] +pub type NRTP_R = crate::R; +#[doc = "Write proxy for field `NRTP`"] +pub struct NRTP_W<'a> { w: &'a mut W, } -impl<'a> _NRTPW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> NRTP_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 2)) | (((value as u32) & 0x03) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _NRMUXW<'a> { +#[doc = "Reader of field `NRMUX`"] +pub type NRMUX_R = crate::R; +#[doc = "Write proxy for field `NRMUX`"] +pub struct NRMUX_W<'a> { w: &'a mut W, } -impl<'a> _NRMUXW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NRMUX_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _NRBKENW<'a> { +#[doc = "Reader of field `NRBKEN`"] +pub type NRBKEN_R = crate::R; +#[doc = "Write proxy for field `NRBKEN`"] +pub struct NRBKEN_W<'a> { w: &'a mut W, } -impl<'a> _NRBKENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NRBKEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 15 - Asynchronous wait"] - #[inline] - pub fn asyncwait(&self) -> ASYNCWAITR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ASYNCWAITR { bits } + #[inline(always)] + pub fn asyncwait(&self) -> ASYNCWAIT_R { + ASYNCWAIT_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 13 - NWAIT signal enable"] - #[inline] - pub fn nrwten(&self) -> NRWTENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NRWTENR { bits } + #[inline(always)] + pub fn nrwten(&self) -> NRWTEN_R { + NRWTEN_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - Write enable"] - #[inline] - pub fn wren(&self) -> WRENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WRENR { bits } + #[inline(always)] + pub fn wren(&self) -> WREN_R { + WREN_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 9 - NWAIT signal polarity"] - #[inline] - pub fn nrwtpol(&self) -> NRWTPOLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NRWTPOLR { bits } + #[inline(always)] + pub fn nrwtpol(&self) -> NRWTPOL_R { + NRWTPOL_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 6 - NOR Flash access enable"] - #[inline] - pub fn nren(&self) -> NRENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NRENR { bits } + #[inline(always)] + pub fn nren(&self) -> NREN_R { + NREN_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bits 4:5 - NOR bank memory data bus width"] - #[inline] - pub fn nrw(&self) -> NRWR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - NRWR { bits } + #[inline(always)] + pub fn nrw(&self) -> NRW_R { + NRW_R::new(((self.bits >> 4) & 0x03) as u8) } #[doc = "Bits 2:3 - NOR bank memory type"] - #[inline] - pub fn nrtp(&self) -> NRTPR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - NRTPR { bits } + #[inline(always)] + pub fn nrtp(&self) -> NRTP_R { + NRTP_R::new(((self.bits >> 2) & 0x03) as u8) } #[doc = "Bit 1 - NOR bank memory address/data multiplexing"] - #[inline] - pub fn nrmux(&self) -> NRMUXR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NRMUXR { bits } + #[inline(always)] + pub fn nrmux(&self) -> NRMUX_R { + NRMUX_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - NOR bank enable"] - #[inline] - pub fn nrbken(&self) -> NRBKENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NRBKENR { bits } + #[inline(always)] + pub fn nrbken(&self) -> NRBKEN_R { + NRBKEN_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x30da } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 15 - Asynchronous wait"] - #[inline] - pub fn asyncwait(&mut self) -> _ASYNCWAITW { - _ASYNCWAITW { w: self } + #[inline(always)] + pub fn asyncwait(&mut self) -> ASYNCWAIT_W { + ASYNCWAIT_W { w: self } } #[doc = "Bit 13 - NWAIT signal enable"] - #[inline] - pub fn nrwten(&mut self) -> _NRWTENW { - _NRWTENW { w: self } + #[inline(always)] + pub fn nrwten(&mut self) -> NRWTEN_W { + NRWTEN_W { w: self } } #[doc = "Bit 12 - Write enable"] - #[inline] - pub fn wren(&mut self) -> _WRENW { - _WRENW { w: self } + #[inline(always)] + pub fn wren(&mut self) -> WREN_W { + WREN_W { w: self } } #[doc = "Bit 9 - NWAIT signal polarity"] - #[inline] - pub fn nrwtpol(&mut self) -> _NRWTPOLW { - _NRWTPOLW { w: self } + #[inline(always)] + pub fn nrwtpol(&mut self) -> NRWTPOL_W { + NRWTPOL_W { w: self } } #[doc = "Bit 6 - NOR Flash access enable"] - #[inline] - pub fn nren(&mut self) -> _NRENW { - _NRENW { w: self } + #[inline(always)] + pub fn nren(&mut self) -> NREN_W { + NREN_W { w: self } } #[doc = "Bits 4:5 - NOR bank memory data bus width"] - #[inline] - pub fn nrw(&mut self) -> _NRWW { - _NRWW { w: self } + #[inline(always)] + pub fn nrw(&mut self) -> NRW_W { + NRW_W { w: self } } #[doc = "Bits 2:3 - NOR bank memory type"] - #[inline] - pub fn nrtp(&mut self) -> _NRTPW { - _NRTPW { w: self } + #[inline(always)] + pub fn nrtp(&mut self) -> NRTP_W { + NRTP_W { w: self } } #[doc = "Bit 1 - NOR bank memory address/data multiplexing"] - #[inline] - pub fn nrmux(&mut self) -> _NRMUXW { - _NRMUXW { w: self } + #[inline(always)] + pub fn nrmux(&mut self) -> NRMUX_W { + NRMUX_W { w: self } } #[doc = "Bit 0 - NOR bank enable"] - #[inline] - pub fn nrbken(&mut self) -> _NRBKENW { - _NRBKENW { w: self } + #[inline(always)] + pub fn nrbken(&mut self) -> NRBKEN_W { + NRBKEN_W { w: self } } } diff --git a/src/exmc/snctl1.rs b/src/exmc/snctl1.rs index 5de414c42eed9ae2c8767ec17beafd5018ef7b47..ed91d7225e3d6e8c723eeceb89a2f4e08c9a5c3d 100644 --- a/src/exmc/snctl1.rs +++ b/src/exmc/snctl1.rs @@ -1,559 +1,302 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::SNCTL1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct ASYNCWAITR { - bits: bool, -} -impl ASYNCWAITR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NRWTENR { - bits: bool, -} -impl NRWTENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WRENR { - bits: bool, -} -impl WRENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NRWTPOLR { - bits: bool, -} -impl NRWTPOLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NRENR { - bits: bool, -} -impl NRENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NRWR { - bits: u8, -} -impl NRWR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct NRTPR { - bits: u8, -} -impl NRTPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct NRMUXR { - bits: bool, -} -impl NRMUXR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NRBKENR { - bits: bool, -} -impl NRBKENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _ASYNCWAITW<'a> { +#[doc = "Reader of register SNCTL1"] +pub type R = crate::R; +#[doc = "Writer for register SNCTL1"] +pub type W = crate::W; +#[doc = "Register SNCTL1 `reset()`'s with value 0x30da"] +impl crate::ResetValue for super::SNCTL1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x30da + } +} +#[doc = "Reader of field `ASYNCWAIT`"] +pub type ASYNCWAIT_R = crate::R; +#[doc = "Write proxy for field `ASYNCWAIT`"] +pub struct ASYNCWAIT_W<'a> { w: &'a mut W, } -impl<'a> _ASYNCWAITW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ASYNCWAIT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _NRWTENW<'a> { +#[doc = "Reader of field `NRWTEN`"] +pub type NRWTEN_R = crate::R; +#[doc = "Write proxy for field `NRWTEN`"] +pub struct NRWTEN_W<'a> { w: &'a mut W, } -impl<'a> _NRWTENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NRWTEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _WRENW<'a> { +#[doc = "Reader of field `WREN`"] +pub type WREN_R = crate::R; +#[doc = "Write proxy for field `WREN`"] +pub struct WREN_W<'a> { w: &'a mut W, } -impl<'a> _WRENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WREN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _NRWTPOLW<'a> { +#[doc = "Reader of field `NRWTPOL`"] +pub type NRWTPOL_R = crate::R; +#[doc = "Write proxy for field `NRWTPOL`"] +pub struct NRWTPOL_W<'a> { w: &'a mut W, } -impl<'a> _NRWTPOLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NRWTPOL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _NRENW<'a> { +#[doc = "Reader of field `NREN`"] +pub type NREN_R = crate::R; +#[doc = "Write proxy for field `NREN`"] +pub struct NREN_W<'a> { w: &'a mut W, } -impl<'a> _NRENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NREN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _NRWW<'a> { +#[doc = "Reader of field `NRW`"] +pub type NRW_R = crate::R; +#[doc = "Write proxy for field `NRW`"] +pub struct NRW_W<'a> { w: &'a mut W, } -impl<'a> _NRWW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> NRW_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 4)) | (((value as u32) & 0x03) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _NRTPW<'a> { +#[doc = "Reader of field `NRTP`"] +pub type NRTP_R = crate::R; +#[doc = "Write proxy for field `NRTP`"] +pub struct NRTP_W<'a> { w: &'a mut W, } -impl<'a> _NRTPW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> NRTP_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 2)) | (((value as u32) & 0x03) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _NRMUXW<'a> { +#[doc = "Reader of field `NRMUX`"] +pub type NRMUX_R = crate::R; +#[doc = "Write proxy for field `NRMUX`"] +pub struct NRMUX_W<'a> { w: &'a mut W, } -impl<'a> _NRMUXW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NRMUX_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _NRBKENW<'a> { +#[doc = "Reader of field `NRBKEN`"] +pub type NRBKEN_R = crate::R; +#[doc = "Write proxy for field `NRBKEN`"] +pub struct NRBKEN_W<'a> { w: &'a mut W, } -impl<'a> _NRBKENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NRBKEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 15 - Asynchronous wait"] - #[inline] - pub fn asyncwait(&self) -> ASYNCWAITR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ASYNCWAITR { bits } + #[inline(always)] + pub fn asyncwait(&self) -> ASYNCWAIT_R { + ASYNCWAIT_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 13 - NWAIT signal enable"] - #[inline] - pub fn nrwten(&self) -> NRWTENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NRWTENR { bits } + #[inline(always)] + pub fn nrwten(&self) -> NRWTEN_R { + NRWTEN_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - Write enable"] - #[inline] - pub fn wren(&self) -> WRENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WRENR { bits } + #[inline(always)] + pub fn wren(&self) -> WREN_R { + WREN_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 9 - NWAIT signal polarity"] - #[inline] - pub fn nrwtpol(&self) -> NRWTPOLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NRWTPOLR { bits } + #[inline(always)] + pub fn nrwtpol(&self) -> NRWTPOL_R { + NRWTPOL_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 6 - NOR Flash access enable"] - #[inline] - pub fn nren(&self) -> NRENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NRENR { bits } + #[inline(always)] + pub fn nren(&self) -> NREN_R { + NREN_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bits 4:5 - NOR bank memory data bus width"] - #[inline] - pub fn nrw(&self) -> NRWR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - NRWR { bits } + #[inline(always)] + pub fn nrw(&self) -> NRW_R { + NRW_R::new(((self.bits >> 4) & 0x03) as u8) } #[doc = "Bits 2:3 - NOR bank memory type"] - #[inline] - pub fn nrtp(&self) -> NRTPR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - NRTPR { bits } + #[inline(always)] + pub fn nrtp(&self) -> NRTP_R { + NRTP_R::new(((self.bits >> 2) & 0x03) as u8) } #[doc = "Bit 1 - NOR bank memory address/data multiplexing"] - #[inline] - pub fn nrmux(&self) -> NRMUXR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NRMUXR { bits } + #[inline(always)] + pub fn nrmux(&self) -> NRMUX_R { + NRMUX_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - NOR bank enable"] - #[inline] - pub fn nrbken(&self) -> NRBKENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NRBKENR { bits } + #[inline(always)] + pub fn nrbken(&self) -> NRBKEN_R { + NRBKEN_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x30da } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 15 - Asynchronous wait"] - #[inline] - pub fn asyncwait(&mut self) -> _ASYNCWAITW { - _ASYNCWAITW { w: self } + #[inline(always)] + pub fn asyncwait(&mut self) -> ASYNCWAIT_W { + ASYNCWAIT_W { w: self } } #[doc = "Bit 13 - NWAIT signal enable"] - #[inline] - pub fn nrwten(&mut self) -> _NRWTENW { - _NRWTENW { w: self } + #[inline(always)] + pub fn nrwten(&mut self) -> NRWTEN_W { + NRWTEN_W { w: self } } #[doc = "Bit 12 - Write enable"] - #[inline] - pub fn wren(&mut self) -> _WRENW { - _WRENW { w: self } + #[inline(always)] + pub fn wren(&mut self) -> WREN_W { + WREN_W { w: self } } #[doc = "Bit 9 - NWAIT signal polarity"] - #[inline] - pub fn nrwtpol(&mut self) -> _NRWTPOLW { - _NRWTPOLW { w: self } + #[inline(always)] + pub fn nrwtpol(&mut self) -> NRWTPOL_W { + NRWTPOL_W { w: self } } #[doc = "Bit 6 - NOR Flash access enable"] - #[inline] - pub fn nren(&mut self) -> _NRENW { - _NRENW { w: self } + #[inline(always)] + pub fn nren(&mut self) -> NREN_W { + NREN_W { w: self } } #[doc = "Bits 4:5 - NOR bank memory data bus width"] - #[inline] - pub fn nrw(&mut self) -> _NRWW { - _NRWW { w: self } + #[inline(always)] + pub fn nrw(&mut self) -> NRW_W { + NRW_W { w: self } } #[doc = "Bits 2:3 - NOR bank memory type"] - #[inline] - pub fn nrtp(&mut self) -> _NRTPW { - _NRTPW { w: self } + #[inline(always)] + pub fn nrtp(&mut self) -> NRTP_W { + NRTP_W { w: self } } #[doc = "Bit 1 - NOR bank memory address/data multiplexing"] - #[inline] - pub fn nrmux(&mut self) -> _NRMUXW { - _NRMUXW { w: self } + #[inline(always)] + pub fn nrmux(&mut self) -> NRMUX_W { + NRMUX_W { w: self } } #[doc = "Bit 0 - NOR bank enable"] - #[inline] - pub fn nrbken(&mut self) -> _NRBKENW { - _NRBKENW { w: self } + #[inline(always)] + pub fn nrbken(&mut self) -> NRBKEN_W { + NRBKEN_W { w: self } } } diff --git a/src/exmc/sntcfg0.rs b/src/exmc/sntcfg0.rs index 07656112a6a35ad76b303b45968a66d15d9e146e..c42f67c6c1d39913ae0f189a5a2c0550be6726dd 100644 --- a/src/exmc/sntcfg0.rs +++ b/src/exmc/sntcfg0.rs @@ -1,228 +1,112 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::SNTCFG0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct BUSLATR { - bits: u8, -} -impl BUSLATR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DSETR { - bits: u8, -} -impl DSETR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct AHLDR { - bits: u8, -} -impl AHLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ASETR { - bits: u8, -} -impl ASETR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _BUSLATW<'a> { +#[doc = "Reader of register SNTCFG0"] +pub type R = crate::R; +#[doc = "Writer for register SNTCFG0"] +pub type W = crate::W; +#[doc = "Register SNTCFG0 `reset()`'s with value 0x0fff_ffff"] +impl crate::ResetValue for super::SNTCFG0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0fff_ffff + } +} +#[doc = "Reader of field `BUSLAT`"] +pub type BUSLAT_R = crate::R; +#[doc = "Write proxy for field `BUSLAT`"] +pub struct BUSLAT_W<'a> { w: &'a mut W, } -impl<'a> _BUSLATW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> BUSLAT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 16)) | (((value as u32) & 0x0f) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _DSETW<'a> { +#[doc = "Reader of field `DSET`"] +pub type DSET_R = crate::R; +#[doc = "Write proxy for field `DSET`"] +pub struct DSET_W<'a> { w: &'a mut W, } -impl<'a> _DSETW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DSET_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _AHLDW<'a> { +#[doc = "Reader of field `AHLD`"] +pub type AHLD_R = crate::R; +#[doc = "Write proxy for field `AHLD`"] +pub struct AHLD_W<'a> { w: &'a mut W, } -impl<'a> _AHLDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> AHLD_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 4)) | (((value as u32) & 0x0f) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ASETW<'a> { +#[doc = "Reader of field `ASET`"] +pub type ASET_R = crate::R; +#[doc = "Write proxy for field `ASET`"] +pub struct ASET_W<'a> { w: &'a mut W, } -impl<'a> _ASETW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ASET_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 16:19 - Bus latency"] - #[inline] - pub fn buslat(&self) -> BUSLATR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - BUSLATR { bits } + #[inline(always)] + pub fn buslat(&self) -> BUSLAT_R { + BUSLAT_R::new(((self.bits >> 16) & 0x0f) as u8) } #[doc = "Bits 8:15 - Data setup time"] - #[inline] - pub fn dset(&self) -> DSETR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DSETR { bits } + #[inline(always)] + pub fn dset(&self) -> DSET_R { + DSET_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 4:7 - Address hold time"] - #[inline] - pub fn ahld(&self) -> AHLDR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - AHLDR { bits } + #[inline(always)] + pub fn ahld(&self) -> AHLD_R { + AHLD_R::new(((self.bits >> 4) & 0x0f) as u8) } #[doc = "Bits 0:3 - Address setup time"] - #[inline] - pub fn aset(&self) -> ASETR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ASETR { bits } + #[inline(always)] + pub fn aset(&self) -> ASET_R { + ASET_R::new((self.bits & 0x0f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0fff_ffff } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 16:19 - Bus latency"] - #[inline] - pub fn buslat(&mut self) -> _BUSLATW { - _BUSLATW { w: self } + #[inline(always)] + pub fn buslat(&mut self) -> BUSLAT_W { + BUSLAT_W { w: self } } #[doc = "Bits 8:15 - Data setup time"] - #[inline] - pub fn dset(&mut self) -> _DSETW { - _DSETW { w: self } + #[inline(always)] + pub fn dset(&mut self) -> DSET_W { + DSET_W { w: self } } #[doc = "Bits 4:7 - Address hold time"] - #[inline] - pub fn ahld(&mut self) -> _AHLDW { - _AHLDW { w: self } + #[inline(always)] + pub fn ahld(&mut self) -> AHLD_W { + AHLD_W { w: self } } #[doc = "Bits 0:3 - Address setup time"] - #[inline] - pub fn aset(&mut self) -> _ASETW { - _ASETW { w: self } + #[inline(always)] + pub fn aset(&mut self) -> ASET_W { + ASET_W { w: self } } } diff --git a/src/exti.rs b/src/exti.rs index d8642203d2dd5a338d03439fa71d315805fb3bb7..02fe17aeecea7b1bf1f3ecbf3e89564ff65614d6 100644 --- a/src/exti.rs +++ b/src/exti.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Interrupt enable register (EXTI_INTEN)"] @@ -14,39 +14,69 @@ pub struct RegisterBlock { #[doc = "0x14 - Pending register (EXTI_PD)"] pub pd: PD, } -#[doc = "Interrupt enable register (EXTI_INTEN)"] -pub struct INTEN { - register: ::vcell::VolatileCell, -} +#[doc = "Interrupt enable register (EXTI_INTEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [inten](inten) module"] +pub type INTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _INTEN; +#[doc = "`read()` method returns [inten::R](inten::R) reader structure"] +impl crate::Readable for INTEN {} +#[doc = "`write(|w| ..)` method takes [inten::W](inten::W) writer structure"] +impl crate::Writable for INTEN {} #[doc = "Interrupt enable register (EXTI_INTEN)"] pub mod inten; -#[doc = "Event enable register (EXTI_EVEN)"] -pub struct EVEN { - register: ::vcell::VolatileCell, -} +#[doc = "Event enable register (EXTI_EVEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [even](even) module"] +pub type EVEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _EVEN; +#[doc = "`read()` method returns [even::R](even::R) reader structure"] +impl crate::Readable for EVEN {} +#[doc = "`write(|w| ..)` method takes [even::W](even::W) writer structure"] +impl crate::Writable for EVEN {} #[doc = "Event enable register (EXTI_EVEN)"] pub mod even; -#[doc = "Rising Edge Trigger Enable register (EXTI_RTEN)"] -pub struct RTEN { - register: ::vcell::VolatileCell, -} +#[doc = "Rising Edge Trigger Enable register (EXTI_RTEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rten](rten) module"] +pub type RTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RTEN; +#[doc = "`read()` method returns [rten::R](rten::R) reader structure"] +impl crate::Readable for RTEN {} +#[doc = "`write(|w| ..)` method takes [rten::W](rten::W) writer structure"] +impl crate::Writable for RTEN {} #[doc = "Rising Edge Trigger Enable register (EXTI_RTEN)"] pub mod rten; -#[doc = "Falling Egde Trigger Enable register (EXTI_FTEN)"] -pub struct FTEN { - register: ::vcell::VolatileCell, -} +#[doc = "Falling Egde Trigger Enable register (EXTI_FTEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ften](ften) module"] +pub type FTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _FTEN; +#[doc = "`read()` method returns [ften::R](ften::R) reader structure"] +impl crate::Readable for FTEN {} +#[doc = "`write(|w| ..)` method takes [ften::W](ften::W) writer structure"] +impl crate::Writable for FTEN {} #[doc = "Falling Egde Trigger Enable register (EXTI_FTEN)"] pub mod ften; -#[doc = "Software interrupt event register (EXTI_SWIEV)"] -pub struct SWIEV { - register: ::vcell::VolatileCell, -} +#[doc = "Software interrupt event register (EXTI_SWIEV)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [swiev](swiev) module"] +pub type SWIEV = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _SWIEV; +#[doc = "`read()` method returns [swiev::R](swiev::R) reader structure"] +impl crate::Readable for SWIEV {} +#[doc = "`write(|w| ..)` method takes [swiev::W](swiev::W) writer structure"] +impl crate::Writable for SWIEV {} #[doc = "Software interrupt event register (EXTI_SWIEV)"] pub mod swiev; -#[doc = "Pending register (EXTI_PD)"] -pub struct PD { - register: ::vcell::VolatileCell, -} +#[doc = "Pending register (EXTI_PD)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pd](pd) module"] +pub type PD = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _PD; +#[doc = "`read()` method returns [pd::R](pd::R) reader structure"] +impl crate::Readable for PD {} +#[doc = "`write(|w| ..)` method takes [pd::W](pd::W) writer structure"] +impl crate::Writable for PD {} #[doc = "Pending register (EXTI_PD)"] pub mod pd; diff --git a/src/exti/even.rs b/src/exti/even.rs index 4b90abeee8b5cc67b74478a623f726f23a46b341..5357485fc1a79d041f3fc21c6deb67fe63a28303 100644 --- a/src/exti/even.rs +++ b/src/exti/even.rs @@ -1,1185 +1,662 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::EVEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct EVEN0R { - bits: bool, -} -impl EVEN0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN1R { - bits: bool, -} -impl EVEN1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN2R { - bits: bool, -} -impl EVEN2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN3R { - bits: bool, -} -impl EVEN3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN4R { - bits: bool, -} -impl EVEN4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN5R { - bits: bool, -} -impl EVEN5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN6R { - bits: bool, -} -impl EVEN6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN7R { - bits: bool, -} -impl EVEN7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN8R { - bits: bool, -} -impl EVEN8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN9R { - bits: bool, -} -impl EVEN9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN10R { - bits: bool, -} -impl EVEN10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN11R { - bits: bool, -} -impl EVEN11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN12R { - bits: bool, -} -impl EVEN12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN13R { - bits: bool, -} -impl EVEN13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN14R { - bits: bool, -} -impl EVEN14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN15R { - bits: bool, -} -impl EVEN15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN16R { - bits: bool, -} -impl EVEN16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN17R { - bits: bool, -} -impl EVEN17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVEN18R { - bits: bool, -} -impl EVEN18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _EVEN0W<'a> { +#[doc = "Reader of register EVEN"] +pub type R = crate::R; +#[doc = "Writer for register EVEN"] +pub type W = crate::W; +#[doc = "Register EVEN `reset()`'s with value 0"] +impl crate::ResetValue for super::EVEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `EVEN0`"] +pub type EVEN0_R = crate::R; +#[doc = "Write proxy for field `EVEN0`"] +pub struct EVEN0_W<'a> { w: &'a mut W, } -impl<'a> _EVEN0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN1W<'a> { +#[doc = "Reader of field `EVEN1`"] +pub type EVEN1_R = crate::R; +#[doc = "Write proxy for field `EVEN1`"] +pub struct EVEN1_W<'a> { w: &'a mut W, } -impl<'a> _EVEN1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN2W<'a> { +#[doc = "Reader of field `EVEN2`"] +pub type EVEN2_R = crate::R; +#[doc = "Write proxy for field `EVEN2`"] +pub struct EVEN2_W<'a> { w: &'a mut W, } -impl<'a> _EVEN2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN3W<'a> { +#[doc = "Reader of field `EVEN3`"] +pub type EVEN3_R = crate::R; +#[doc = "Write proxy for field `EVEN3`"] +pub struct EVEN3_W<'a> { w: &'a mut W, } -impl<'a> _EVEN3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN4W<'a> { +#[doc = "Reader of field `EVEN4`"] +pub type EVEN4_R = crate::R; +#[doc = "Write proxy for field `EVEN4`"] +pub struct EVEN4_W<'a> { w: &'a mut W, } -impl<'a> _EVEN4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN5W<'a> { +#[doc = "Reader of field `EVEN5`"] +pub type EVEN5_R = crate::R; +#[doc = "Write proxy for field `EVEN5`"] +pub struct EVEN5_W<'a> { w: &'a mut W, } -impl<'a> _EVEN5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN6W<'a> { +#[doc = "Reader of field `EVEN6`"] +pub type EVEN6_R = crate::R; +#[doc = "Write proxy for field `EVEN6`"] +pub struct EVEN6_W<'a> { w: &'a mut W, } -impl<'a> _EVEN6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN7W<'a> { +#[doc = "Reader of field `EVEN7`"] +pub type EVEN7_R = crate::R; +#[doc = "Write proxy for field `EVEN7`"] +pub struct EVEN7_W<'a> { w: &'a mut W, } -impl<'a> _EVEN7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN8W<'a> { +#[doc = "Reader of field `EVEN8`"] +pub type EVEN8_R = crate::R; +#[doc = "Write proxy for field `EVEN8`"] +pub struct EVEN8_W<'a> { w: &'a mut W, } -impl<'a> _EVEN8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN9W<'a> { +#[doc = "Reader of field `EVEN9`"] +pub type EVEN9_R = crate::R; +#[doc = "Write proxy for field `EVEN9`"] +pub struct EVEN9_W<'a> { w: &'a mut W, } -impl<'a> _EVEN9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN10W<'a> { +#[doc = "Reader of field `EVEN10`"] +pub type EVEN10_R = crate::R; +#[doc = "Write proxy for field `EVEN10`"] +pub struct EVEN10_W<'a> { w: &'a mut W, } -impl<'a> _EVEN10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN11W<'a> { +#[doc = "Reader of field `EVEN11`"] +pub type EVEN11_R = crate::R; +#[doc = "Write proxy for field `EVEN11`"] +pub struct EVEN11_W<'a> { w: &'a mut W, } -impl<'a> _EVEN11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN12W<'a> { +#[doc = "Reader of field `EVEN12`"] +pub type EVEN12_R = crate::R; +#[doc = "Write proxy for field `EVEN12`"] +pub struct EVEN12_W<'a> { w: &'a mut W, } -impl<'a> _EVEN12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN13W<'a> { +#[doc = "Reader of field `EVEN13`"] +pub type EVEN13_R = crate::R; +#[doc = "Write proxy for field `EVEN13`"] +pub struct EVEN13_W<'a> { w: &'a mut W, } -impl<'a> _EVEN13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN14W<'a> { +#[doc = "Reader of field `EVEN14`"] +pub type EVEN14_R = crate::R; +#[doc = "Write proxy for field `EVEN14`"] +pub struct EVEN14_W<'a> { w: &'a mut W, } -impl<'a> _EVEN14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN15W<'a> { +#[doc = "Reader of field `EVEN15`"] +pub type EVEN15_R = crate::R; +#[doc = "Write proxy for field `EVEN15`"] +pub struct EVEN15_W<'a> { w: &'a mut W, } -impl<'a> _EVEN15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN16W<'a> { +#[doc = "Reader of field `EVEN16`"] +pub type EVEN16_R = crate::R; +#[doc = "Write proxy for field `EVEN16`"] +pub struct EVEN16_W<'a> { w: &'a mut W, } -impl<'a> _EVEN16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN17W<'a> { +#[doc = "Reader of field `EVEN17`"] +pub type EVEN17_R = crate::R; +#[doc = "Write proxy for field `EVEN17`"] +pub struct EVEN17_W<'a> { w: &'a mut W, } -impl<'a> _EVEN17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _EVEN18W<'a> { +#[doc = "Reader of field `EVEN18`"] +pub type EVEN18_R = crate::R; +#[doc = "Write proxy for field `EVEN18`"] +pub struct EVEN18_W<'a> { w: &'a mut W, } -impl<'a> _EVEN18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVEN18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Enable Event on line 0"] - #[inline] - pub fn even0(&self) -> EVEN0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN0R { bits } + #[inline(always)] + pub fn even0(&self) -> EVEN0_R { + EVEN0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Enable Event on line 1"] - #[inline] - pub fn even1(&self) -> EVEN1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN1R { bits } + #[inline(always)] + pub fn even1(&self) -> EVEN1_R { + EVEN1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Enable Event on line 2"] - #[inline] - pub fn even2(&self) -> EVEN2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN2R { bits } + #[inline(always)] + pub fn even2(&self) -> EVEN2_R { + EVEN2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Enable Event on line 3"] - #[inline] - pub fn even3(&self) -> EVEN3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN3R { bits } + #[inline(always)] + pub fn even3(&self) -> EVEN3_R { + EVEN3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Enable Event on line 4"] - #[inline] - pub fn even4(&self) -> EVEN4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN4R { bits } + #[inline(always)] + pub fn even4(&self) -> EVEN4_R { + EVEN4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Enable Event on line 5"] - #[inline] - pub fn even5(&self) -> EVEN5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN5R { bits } + #[inline(always)] + pub fn even5(&self) -> EVEN5_R { + EVEN5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Enable Event on line 6"] - #[inline] - pub fn even6(&self) -> EVEN6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN6R { bits } + #[inline(always)] + pub fn even6(&self) -> EVEN6_R { + EVEN6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Enable Event on line 7"] - #[inline] - pub fn even7(&self) -> EVEN7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN7R { bits } + #[inline(always)] + pub fn even7(&self) -> EVEN7_R { + EVEN7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Enable Event on line 8"] - #[inline] - pub fn even8(&self) -> EVEN8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN8R { bits } + #[inline(always)] + pub fn even8(&self) -> EVEN8_R { + EVEN8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Enable Event on line 9"] - #[inline] - pub fn even9(&self) -> EVEN9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN9R { bits } + #[inline(always)] + pub fn even9(&self) -> EVEN9_R { + EVEN9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Enable Event on line 10"] - #[inline] - pub fn even10(&self) -> EVEN10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN10R { bits } + #[inline(always)] + pub fn even10(&self) -> EVEN10_R { + EVEN10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Enable Event on line 11"] - #[inline] - pub fn even11(&self) -> EVEN11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN11R { bits } + #[inline(always)] + pub fn even11(&self) -> EVEN11_R { + EVEN11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Enable Event on line 12"] - #[inline] - pub fn even12(&self) -> EVEN12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN12R { bits } + #[inline(always)] + pub fn even12(&self) -> EVEN12_R { + EVEN12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Enable Event on line 13"] - #[inline] - pub fn even13(&self) -> EVEN13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN13R { bits } + #[inline(always)] + pub fn even13(&self) -> EVEN13_R { + EVEN13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Enable Event on line 14"] - #[inline] - pub fn even14(&self) -> EVEN14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN14R { bits } + #[inline(always)] + pub fn even14(&self) -> EVEN14_R { + EVEN14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Enable Event on line 15"] - #[inline] - pub fn even15(&self) -> EVEN15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN15R { bits } + #[inline(always)] + pub fn even15(&self) -> EVEN15_R { + EVEN15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Enable Event on line 16"] - #[inline] - pub fn even16(&self) -> EVEN16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN16R { bits } + #[inline(always)] + pub fn even16(&self) -> EVEN16_R { + EVEN16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Enable Event on line 17"] - #[inline] - pub fn even17(&self) -> EVEN17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN17R { bits } + #[inline(always)] + pub fn even17(&self) -> EVEN17_R { + EVEN17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Enable Event on line 18"] - #[inline] - pub fn even18(&self) -> EVEN18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EVEN18R { bits } + #[inline(always)] + pub fn even18(&self) -> EVEN18_R { + EVEN18_R::new(((self.bits >> 18) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Enable Event on line 0"] - #[inline] - pub fn even0(&mut self) -> _EVEN0W { - _EVEN0W { w: self } + #[inline(always)] + pub fn even0(&mut self) -> EVEN0_W { + EVEN0_W { w: self } } #[doc = "Bit 1 - Enable Event on line 1"] - #[inline] - pub fn even1(&mut self) -> _EVEN1W { - _EVEN1W { w: self } + #[inline(always)] + pub fn even1(&mut self) -> EVEN1_W { + EVEN1_W { w: self } } #[doc = "Bit 2 - Enable Event on line 2"] - #[inline] - pub fn even2(&mut self) -> _EVEN2W { - _EVEN2W { w: self } + #[inline(always)] + pub fn even2(&mut self) -> EVEN2_W { + EVEN2_W { w: self } } #[doc = "Bit 3 - Enable Event on line 3"] - #[inline] - pub fn even3(&mut self) -> _EVEN3W { - _EVEN3W { w: self } + #[inline(always)] + pub fn even3(&mut self) -> EVEN3_W { + EVEN3_W { w: self } } #[doc = "Bit 4 - Enable Event on line 4"] - #[inline] - pub fn even4(&mut self) -> _EVEN4W { - _EVEN4W { w: self } + #[inline(always)] + pub fn even4(&mut self) -> EVEN4_W { + EVEN4_W { w: self } } #[doc = "Bit 5 - Enable Event on line 5"] - #[inline] - pub fn even5(&mut self) -> _EVEN5W { - _EVEN5W { w: self } + #[inline(always)] + pub fn even5(&mut self) -> EVEN5_W { + EVEN5_W { w: self } } #[doc = "Bit 6 - Enable Event on line 6"] - #[inline] - pub fn even6(&mut self) -> _EVEN6W { - _EVEN6W { w: self } + #[inline(always)] + pub fn even6(&mut self) -> EVEN6_W { + EVEN6_W { w: self } } #[doc = "Bit 7 - Enable Event on line 7"] - #[inline] - pub fn even7(&mut self) -> _EVEN7W { - _EVEN7W { w: self } + #[inline(always)] + pub fn even7(&mut self) -> EVEN7_W { + EVEN7_W { w: self } } #[doc = "Bit 8 - Enable Event on line 8"] - #[inline] - pub fn even8(&mut self) -> _EVEN8W { - _EVEN8W { w: self } + #[inline(always)] + pub fn even8(&mut self) -> EVEN8_W { + EVEN8_W { w: self } } #[doc = "Bit 9 - Enable Event on line 9"] - #[inline] - pub fn even9(&mut self) -> _EVEN9W { - _EVEN9W { w: self } + #[inline(always)] + pub fn even9(&mut self) -> EVEN9_W { + EVEN9_W { w: self } } #[doc = "Bit 10 - Enable Event on line 10"] - #[inline] - pub fn even10(&mut self) -> _EVEN10W { - _EVEN10W { w: self } + #[inline(always)] + pub fn even10(&mut self) -> EVEN10_W { + EVEN10_W { w: self } } #[doc = "Bit 11 - Enable Event on line 11"] - #[inline] - pub fn even11(&mut self) -> _EVEN11W { - _EVEN11W { w: self } + #[inline(always)] + pub fn even11(&mut self) -> EVEN11_W { + EVEN11_W { w: self } } #[doc = "Bit 12 - Enable Event on line 12"] - #[inline] - pub fn even12(&mut self) -> _EVEN12W { - _EVEN12W { w: self } + #[inline(always)] + pub fn even12(&mut self) -> EVEN12_W { + EVEN12_W { w: self } } #[doc = "Bit 13 - Enable Event on line 13"] - #[inline] - pub fn even13(&mut self) -> _EVEN13W { - _EVEN13W { w: self } + #[inline(always)] + pub fn even13(&mut self) -> EVEN13_W { + EVEN13_W { w: self } } #[doc = "Bit 14 - Enable Event on line 14"] - #[inline] - pub fn even14(&mut self) -> _EVEN14W { - _EVEN14W { w: self } + #[inline(always)] + pub fn even14(&mut self) -> EVEN14_W { + EVEN14_W { w: self } } #[doc = "Bit 15 - Enable Event on line 15"] - #[inline] - pub fn even15(&mut self) -> _EVEN15W { - _EVEN15W { w: self } + #[inline(always)] + pub fn even15(&mut self) -> EVEN15_W { + EVEN15_W { w: self } } #[doc = "Bit 16 - Enable Event on line 16"] - #[inline] - pub fn even16(&mut self) -> _EVEN16W { - _EVEN16W { w: self } + #[inline(always)] + pub fn even16(&mut self) -> EVEN16_W { + EVEN16_W { w: self } } #[doc = "Bit 17 - Enable Event on line 17"] - #[inline] - pub fn even17(&mut self) -> _EVEN17W { - _EVEN17W { w: self } + #[inline(always)] + pub fn even17(&mut self) -> EVEN17_W { + EVEN17_W { w: self } } #[doc = "Bit 18 - Enable Event on line 18"] - #[inline] - pub fn even18(&mut self) -> _EVEN18W { - _EVEN18W { w: self } + #[inline(always)] + pub fn even18(&mut self) -> EVEN18_W { + EVEN18_W { w: self } } } diff --git a/src/exti/ften.rs b/src/exti/ften.rs index 014358c6fdbd26927d9a77daebad27e21c0a5c5f..1f4993c90e8f288de20252bcadf2b21f87be0c9d 100644 --- a/src/exti/ften.rs +++ b/src/exti/ften.rs @@ -1,1185 +1,662 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::FTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FTEN0R { - bits: bool, -} -impl FTEN0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN1R { - bits: bool, -} -impl FTEN1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN2R { - bits: bool, -} -impl FTEN2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN3R { - bits: bool, -} -impl FTEN3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN4R { - bits: bool, -} -impl FTEN4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN5R { - bits: bool, -} -impl FTEN5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN6R { - bits: bool, -} -impl FTEN6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN7R { - bits: bool, -} -impl FTEN7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN8R { - bits: bool, -} -impl FTEN8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN9R { - bits: bool, -} -impl FTEN9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN10R { - bits: bool, -} -impl FTEN10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN11R { - bits: bool, -} -impl FTEN11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN12R { - bits: bool, -} -impl FTEN12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN13R { - bits: bool, -} -impl FTEN13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN14R { - bits: bool, -} -impl FTEN14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN15R { - bits: bool, -} -impl FTEN15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN16R { - bits: bool, -} -impl FTEN16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN17R { - bits: bool, -} -impl FTEN17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FTEN18R { - bits: bool, -} -impl FTEN18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _FTEN0W<'a> { +#[doc = "Reader of register FTEN"] +pub type R = crate::R; +#[doc = "Writer for register FTEN"] +pub type W = crate::W; +#[doc = "Register FTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::FTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FTEN0`"] +pub type FTEN0_R = crate::R; +#[doc = "Write proxy for field `FTEN0`"] +pub struct FTEN0_W<'a> { w: &'a mut W, } -impl<'a> _FTEN0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN1W<'a> { +#[doc = "Reader of field `FTEN1`"] +pub type FTEN1_R = crate::R; +#[doc = "Write proxy for field `FTEN1`"] +pub struct FTEN1_W<'a> { w: &'a mut W, } -impl<'a> _FTEN1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN2W<'a> { +#[doc = "Reader of field `FTEN2`"] +pub type FTEN2_R = crate::R; +#[doc = "Write proxy for field `FTEN2`"] +pub struct FTEN2_W<'a> { w: &'a mut W, } -impl<'a> _FTEN2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN3W<'a> { +#[doc = "Reader of field `FTEN3`"] +pub type FTEN3_R = crate::R; +#[doc = "Write proxy for field `FTEN3`"] +pub struct FTEN3_W<'a> { w: &'a mut W, } -impl<'a> _FTEN3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN4W<'a> { +#[doc = "Reader of field `FTEN4`"] +pub type FTEN4_R = crate::R; +#[doc = "Write proxy for field `FTEN4`"] +pub struct FTEN4_W<'a> { w: &'a mut W, } -impl<'a> _FTEN4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN5W<'a> { +#[doc = "Reader of field `FTEN5`"] +pub type FTEN5_R = crate::R; +#[doc = "Write proxy for field `FTEN5`"] +pub struct FTEN5_W<'a> { w: &'a mut W, } -impl<'a> _FTEN5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN6W<'a> { +#[doc = "Reader of field `FTEN6`"] +pub type FTEN6_R = crate::R; +#[doc = "Write proxy for field `FTEN6`"] +pub struct FTEN6_W<'a> { w: &'a mut W, } -impl<'a> _FTEN6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN7W<'a> { +#[doc = "Reader of field `FTEN7`"] +pub type FTEN7_R = crate::R; +#[doc = "Write proxy for field `FTEN7`"] +pub struct FTEN7_W<'a> { w: &'a mut W, } -impl<'a> _FTEN7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN8W<'a> { +#[doc = "Reader of field `FTEN8`"] +pub type FTEN8_R = crate::R; +#[doc = "Write proxy for field `FTEN8`"] +pub struct FTEN8_W<'a> { w: &'a mut W, } -impl<'a> _FTEN8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN9W<'a> { +#[doc = "Reader of field `FTEN9`"] +pub type FTEN9_R = crate::R; +#[doc = "Write proxy for field `FTEN9`"] +pub struct FTEN9_W<'a> { w: &'a mut W, } -impl<'a> _FTEN9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN10W<'a> { +#[doc = "Reader of field `FTEN10`"] +pub type FTEN10_R = crate::R; +#[doc = "Write proxy for field `FTEN10`"] +pub struct FTEN10_W<'a> { w: &'a mut W, } -impl<'a> _FTEN10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN11W<'a> { +#[doc = "Reader of field `FTEN11`"] +pub type FTEN11_R = crate::R; +#[doc = "Write proxy for field `FTEN11`"] +pub struct FTEN11_W<'a> { w: &'a mut W, } -impl<'a> _FTEN11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN12W<'a> { +#[doc = "Reader of field `FTEN12`"] +pub type FTEN12_R = crate::R; +#[doc = "Write proxy for field `FTEN12`"] +pub struct FTEN12_W<'a> { w: &'a mut W, } -impl<'a> _FTEN12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN13W<'a> { +#[doc = "Reader of field `FTEN13`"] +pub type FTEN13_R = crate::R; +#[doc = "Write proxy for field `FTEN13`"] +pub struct FTEN13_W<'a> { w: &'a mut W, } -impl<'a> _FTEN13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN14W<'a> { +#[doc = "Reader of field `FTEN14`"] +pub type FTEN14_R = crate::R; +#[doc = "Write proxy for field `FTEN14`"] +pub struct FTEN14_W<'a> { w: &'a mut W, } -impl<'a> _FTEN14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN15W<'a> { +#[doc = "Reader of field `FTEN15`"] +pub type FTEN15_R = crate::R; +#[doc = "Write proxy for field `FTEN15`"] +pub struct FTEN15_W<'a> { w: &'a mut W, } -impl<'a> _FTEN15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN16W<'a> { +#[doc = "Reader of field `FTEN16`"] +pub type FTEN16_R = crate::R; +#[doc = "Write proxy for field `FTEN16`"] +pub struct FTEN16_W<'a> { w: &'a mut W, } -impl<'a> _FTEN16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN17W<'a> { +#[doc = "Reader of field `FTEN17`"] +pub type FTEN17_R = crate::R; +#[doc = "Write proxy for field `FTEN17`"] +pub struct FTEN17_W<'a> { w: &'a mut W, } -impl<'a> _FTEN17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _FTEN18W<'a> { +#[doc = "Reader of field `FTEN18`"] +pub type FTEN18_R = crate::R; +#[doc = "Write proxy for field `FTEN18`"] +pub struct FTEN18_W<'a> { w: &'a mut W, } -impl<'a> _FTEN18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FTEN18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Falling edge trigger enable of line 0"] - #[inline] - pub fn ften0(&self) -> FTEN0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN0R { bits } + #[inline(always)] + pub fn ften0(&self) -> FTEN0_R { + FTEN0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Falling edge trigger enable of line 1"] - #[inline] - pub fn ften1(&self) -> FTEN1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN1R { bits } + #[inline(always)] + pub fn ften1(&self) -> FTEN1_R { + FTEN1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Falling edge trigger enable of line 2"] - #[inline] - pub fn ften2(&self) -> FTEN2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN2R { bits } + #[inline(always)] + pub fn ften2(&self) -> FTEN2_R { + FTEN2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Falling edge trigger enable of line 3"] - #[inline] - pub fn ften3(&self) -> FTEN3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN3R { bits } + #[inline(always)] + pub fn ften3(&self) -> FTEN3_R { + FTEN3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Falling edge trigger enable of line 4"] - #[inline] - pub fn ften4(&self) -> FTEN4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN4R { bits } + #[inline(always)] + pub fn ften4(&self) -> FTEN4_R { + FTEN4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Falling edge trigger enable of line 5"] - #[inline] - pub fn ften5(&self) -> FTEN5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN5R { bits } + #[inline(always)] + pub fn ften5(&self) -> FTEN5_R { + FTEN5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Falling edge trigger enable of line 6"] - #[inline] - pub fn ften6(&self) -> FTEN6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN6R { bits } + #[inline(always)] + pub fn ften6(&self) -> FTEN6_R { + FTEN6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Falling edge trigger enable of line 7"] - #[inline] - pub fn ften7(&self) -> FTEN7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN7R { bits } + #[inline(always)] + pub fn ften7(&self) -> FTEN7_R { + FTEN7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Falling edge trigger enable of line 8"] - #[inline] - pub fn ften8(&self) -> FTEN8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN8R { bits } + #[inline(always)] + pub fn ften8(&self) -> FTEN8_R { + FTEN8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Falling edge trigger enable of line 9"] - #[inline] - pub fn ften9(&self) -> FTEN9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN9R { bits } + #[inline(always)] + pub fn ften9(&self) -> FTEN9_R { + FTEN9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Falling edge trigger enable of line 10"] - #[inline] - pub fn ften10(&self) -> FTEN10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN10R { bits } + #[inline(always)] + pub fn ften10(&self) -> FTEN10_R { + FTEN10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Falling edge trigger enable of line 11"] - #[inline] - pub fn ften11(&self) -> FTEN11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN11R { bits } + #[inline(always)] + pub fn ften11(&self) -> FTEN11_R { + FTEN11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Falling edge trigger enable of line 12"] - #[inline] - pub fn ften12(&self) -> FTEN12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN12R { bits } + #[inline(always)] + pub fn ften12(&self) -> FTEN12_R { + FTEN12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Falling edge trigger enable of line 13"] - #[inline] - pub fn ften13(&self) -> FTEN13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN13R { bits } + #[inline(always)] + pub fn ften13(&self) -> FTEN13_R { + FTEN13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Falling edge trigger enable of line 14"] - #[inline] - pub fn ften14(&self) -> FTEN14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN14R { bits } + #[inline(always)] + pub fn ften14(&self) -> FTEN14_R { + FTEN14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Falling edge trigger enable of line 15"] - #[inline] - pub fn ften15(&self) -> FTEN15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN15R { bits } + #[inline(always)] + pub fn ften15(&self) -> FTEN15_R { + FTEN15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Falling edge trigger enable of line 16"] - #[inline] - pub fn ften16(&self) -> FTEN16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN16R { bits } + #[inline(always)] + pub fn ften16(&self) -> FTEN16_R { + FTEN16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Falling edge trigger enable of line 17"] - #[inline] - pub fn ften17(&self) -> FTEN17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN17R { bits } + #[inline(always)] + pub fn ften17(&self) -> FTEN17_R { + FTEN17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Falling edge trigger enable of line 18"] - #[inline] - pub fn ften18(&self) -> FTEN18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FTEN18R { bits } + #[inline(always)] + pub fn ften18(&self) -> FTEN18_R { + FTEN18_R::new(((self.bits >> 18) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Falling edge trigger enable of line 0"] - #[inline] - pub fn ften0(&mut self) -> _FTEN0W { - _FTEN0W { w: self } + #[inline(always)] + pub fn ften0(&mut self) -> FTEN0_W { + FTEN0_W { w: self } } #[doc = "Bit 1 - Falling edge trigger enable of line 1"] - #[inline] - pub fn ften1(&mut self) -> _FTEN1W { - _FTEN1W { w: self } + #[inline(always)] + pub fn ften1(&mut self) -> FTEN1_W { + FTEN1_W { w: self } } #[doc = "Bit 2 - Falling edge trigger enable of line 2"] - #[inline] - pub fn ften2(&mut self) -> _FTEN2W { - _FTEN2W { w: self } + #[inline(always)] + pub fn ften2(&mut self) -> FTEN2_W { + FTEN2_W { w: self } } #[doc = "Bit 3 - Falling edge trigger enable of line 3"] - #[inline] - pub fn ften3(&mut self) -> _FTEN3W { - _FTEN3W { w: self } + #[inline(always)] + pub fn ften3(&mut self) -> FTEN3_W { + FTEN3_W { w: self } } #[doc = "Bit 4 - Falling edge trigger enable of line 4"] - #[inline] - pub fn ften4(&mut self) -> _FTEN4W { - _FTEN4W { w: self } + #[inline(always)] + pub fn ften4(&mut self) -> FTEN4_W { + FTEN4_W { w: self } } #[doc = "Bit 5 - Falling edge trigger enable of line 5"] - #[inline] - pub fn ften5(&mut self) -> _FTEN5W { - _FTEN5W { w: self } + #[inline(always)] + pub fn ften5(&mut self) -> FTEN5_W { + FTEN5_W { w: self } } #[doc = "Bit 6 - Falling edge trigger enable of line 6"] - #[inline] - pub fn ften6(&mut self) -> _FTEN6W { - _FTEN6W { w: self } + #[inline(always)] + pub fn ften6(&mut self) -> FTEN6_W { + FTEN6_W { w: self } } #[doc = "Bit 7 - Falling edge trigger enable of line 7"] - #[inline] - pub fn ften7(&mut self) -> _FTEN7W { - _FTEN7W { w: self } + #[inline(always)] + pub fn ften7(&mut self) -> FTEN7_W { + FTEN7_W { w: self } } #[doc = "Bit 8 - Falling edge trigger enable of line 8"] - #[inline] - pub fn ften8(&mut self) -> _FTEN8W { - _FTEN8W { w: self } + #[inline(always)] + pub fn ften8(&mut self) -> FTEN8_W { + FTEN8_W { w: self } } #[doc = "Bit 9 - Falling edge trigger enable of line 9"] - #[inline] - pub fn ften9(&mut self) -> _FTEN9W { - _FTEN9W { w: self } + #[inline(always)] + pub fn ften9(&mut self) -> FTEN9_W { + FTEN9_W { w: self } } #[doc = "Bit 10 - Falling edge trigger enable of line 10"] - #[inline] - pub fn ften10(&mut self) -> _FTEN10W { - _FTEN10W { w: self } + #[inline(always)] + pub fn ften10(&mut self) -> FTEN10_W { + FTEN10_W { w: self } } #[doc = "Bit 11 - Falling edge trigger enable of line 11"] - #[inline] - pub fn ften11(&mut self) -> _FTEN11W { - _FTEN11W { w: self } + #[inline(always)] + pub fn ften11(&mut self) -> FTEN11_W { + FTEN11_W { w: self } } #[doc = "Bit 12 - Falling edge trigger enable of line 12"] - #[inline] - pub fn ften12(&mut self) -> _FTEN12W { - _FTEN12W { w: self } + #[inline(always)] + pub fn ften12(&mut self) -> FTEN12_W { + FTEN12_W { w: self } } #[doc = "Bit 13 - Falling edge trigger enable of line 13"] - #[inline] - pub fn ften13(&mut self) -> _FTEN13W { - _FTEN13W { w: self } + #[inline(always)] + pub fn ften13(&mut self) -> FTEN13_W { + FTEN13_W { w: self } } #[doc = "Bit 14 - Falling edge trigger enable of line 14"] - #[inline] - pub fn ften14(&mut self) -> _FTEN14W { - _FTEN14W { w: self } + #[inline(always)] + pub fn ften14(&mut self) -> FTEN14_W { + FTEN14_W { w: self } } #[doc = "Bit 15 - Falling edge trigger enable of line 15"] - #[inline] - pub fn ften15(&mut self) -> _FTEN15W { - _FTEN15W { w: self } + #[inline(always)] + pub fn ften15(&mut self) -> FTEN15_W { + FTEN15_W { w: self } } #[doc = "Bit 16 - Falling edge trigger enable of line 16"] - #[inline] - pub fn ften16(&mut self) -> _FTEN16W { - _FTEN16W { w: self } + #[inline(always)] + pub fn ften16(&mut self) -> FTEN16_W { + FTEN16_W { w: self } } #[doc = "Bit 17 - Falling edge trigger enable of line 17"] - #[inline] - pub fn ften17(&mut self) -> _FTEN17W { - _FTEN17W { w: self } + #[inline(always)] + pub fn ften17(&mut self) -> FTEN17_W { + FTEN17_W { w: self } } #[doc = "Bit 18 - Falling edge trigger enable of line 18"] - #[inline] - pub fn ften18(&mut self) -> _FTEN18W { - _FTEN18W { w: self } + #[inline(always)] + pub fn ften18(&mut self) -> FTEN18_W { + FTEN18_W { w: self } } } diff --git a/src/exti/inten.rs b/src/exti/inten.rs index cc56409c2131181cab5c0ea8d1bc5b5e9bdcaae4..36d23ea95291614e7cb678902fb8145a8c5393af 100644 --- a/src/exti/inten.rs +++ b/src/exti/inten.rs @@ -1,1185 +1,662 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::INTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct INTEN0R { - bits: bool, -} -impl INTEN0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN1R { - bits: bool, -} -impl INTEN1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN2R { - bits: bool, -} -impl INTEN2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN3R { - bits: bool, -} -impl INTEN3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN4R { - bits: bool, -} -impl INTEN4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN5R { - bits: bool, -} -impl INTEN5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN6R { - bits: bool, -} -impl INTEN6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN7R { - bits: bool, -} -impl INTEN7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN8R { - bits: bool, -} -impl INTEN8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN9R { - bits: bool, -} -impl INTEN9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN10R { - bits: bool, -} -impl INTEN10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN11R { - bits: bool, -} -impl INTEN11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN12R { - bits: bool, -} -impl INTEN12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN13R { - bits: bool, -} -impl INTEN13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN14R { - bits: bool, -} -impl INTEN14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN15R { - bits: bool, -} -impl INTEN15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN16R { - bits: bool, -} -impl INTEN16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN17R { - bits: bool, -} -impl INTEN17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct INTEN18R { - bits: bool, -} -impl INTEN18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _INTEN0W<'a> { +#[doc = "Reader of register INTEN"] +pub type R = crate::R; +#[doc = "Writer for register INTEN"] +pub type W = crate::W; +#[doc = "Register INTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::INTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `INTEN0`"] +pub type INTEN0_R = crate::R; +#[doc = "Write proxy for field `INTEN0`"] +pub struct INTEN0_W<'a> { w: &'a mut W, } -impl<'a> _INTEN0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN1W<'a> { +#[doc = "Reader of field `INTEN1`"] +pub type INTEN1_R = crate::R; +#[doc = "Write proxy for field `INTEN1`"] +pub struct INTEN1_W<'a> { w: &'a mut W, } -impl<'a> _INTEN1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN2W<'a> { +#[doc = "Reader of field `INTEN2`"] +pub type INTEN2_R = crate::R; +#[doc = "Write proxy for field `INTEN2`"] +pub struct INTEN2_W<'a> { w: &'a mut W, } -impl<'a> _INTEN2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN3W<'a> { +#[doc = "Reader of field `INTEN3`"] +pub type INTEN3_R = crate::R; +#[doc = "Write proxy for field `INTEN3`"] +pub struct INTEN3_W<'a> { w: &'a mut W, } -impl<'a> _INTEN3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN4W<'a> { +#[doc = "Reader of field `INTEN4`"] +pub type INTEN4_R = crate::R; +#[doc = "Write proxy for field `INTEN4`"] +pub struct INTEN4_W<'a> { w: &'a mut W, } -impl<'a> _INTEN4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN5W<'a> { +#[doc = "Reader of field `INTEN5`"] +pub type INTEN5_R = crate::R; +#[doc = "Write proxy for field `INTEN5`"] +pub struct INTEN5_W<'a> { w: &'a mut W, } -impl<'a> _INTEN5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN6W<'a> { +#[doc = "Reader of field `INTEN6`"] +pub type INTEN6_R = crate::R; +#[doc = "Write proxy for field `INTEN6`"] +pub struct INTEN6_W<'a> { w: &'a mut W, } -impl<'a> _INTEN6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN7W<'a> { +#[doc = "Reader of field `INTEN7`"] +pub type INTEN7_R = crate::R; +#[doc = "Write proxy for field `INTEN7`"] +pub struct INTEN7_W<'a> { w: &'a mut W, } -impl<'a> _INTEN7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN8W<'a> { +#[doc = "Reader of field `INTEN8`"] +pub type INTEN8_R = crate::R; +#[doc = "Write proxy for field `INTEN8`"] +pub struct INTEN8_W<'a> { w: &'a mut W, } -impl<'a> _INTEN8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN9W<'a> { +#[doc = "Reader of field `INTEN9`"] +pub type INTEN9_R = crate::R; +#[doc = "Write proxy for field `INTEN9`"] +pub struct INTEN9_W<'a> { w: &'a mut W, } -impl<'a> _INTEN9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN10W<'a> { +#[doc = "Reader of field `INTEN10`"] +pub type INTEN10_R = crate::R; +#[doc = "Write proxy for field `INTEN10`"] +pub struct INTEN10_W<'a> { w: &'a mut W, } -impl<'a> _INTEN10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN11W<'a> { +#[doc = "Reader of field `INTEN11`"] +pub type INTEN11_R = crate::R; +#[doc = "Write proxy for field `INTEN11`"] +pub struct INTEN11_W<'a> { w: &'a mut W, } -impl<'a> _INTEN11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN12W<'a> { +#[doc = "Reader of field `INTEN12`"] +pub type INTEN12_R = crate::R; +#[doc = "Write proxy for field `INTEN12`"] +pub struct INTEN12_W<'a> { w: &'a mut W, } -impl<'a> _INTEN12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN13W<'a> { +#[doc = "Reader of field `INTEN13`"] +pub type INTEN13_R = crate::R; +#[doc = "Write proxy for field `INTEN13`"] +pub struct INTEN13_W<'a> { w: &'a mut W, } -impl<'a> _INTEN13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN14W<'a> { +#[doc = "Reader of field `INTEN14`"] +pub type INTEN14_R = crate::R; +#[doc = "Write proxy for field `INTEN14`"] +pub struct INTEN14_W<'a> { w: &'a mut W, } -impl<'a> _INTEN14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN15W<'a> { +#[doc = "Reader of field `INTEN15`"] +pub type INTEN15_R = crate::R; +#[doc = "Write proxy for field `INTEN15`"] +pub struct INTEN15_W<'a> { w: &'a mut W, } -impl<'a> _INTEN15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN16W<'a> { +#[doc = "Reader of field `INTEN16`"] +pub type INTEN16_R = crate::R; +#[doc = "Write proxy for field `INTEN16`"] +pub struct INTEN16_W<'a> { w: &'a mut W, } -impl<'a> _INTEN16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN17W<'a> { +#[doc = "Reader of field `INTEN17`"] +pub type INTEN17_R = crate::R; +#[doc = "Write proxy for field `INTEN17`"] +pub struct INTEN17_W<'a> { w: &'a mut W, } -impl<'a> _INTEN17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _INTEN18W<'a> { +#[doc = "Reader of field `INTEN18`"] +pub type INTEN18_R = crate::R; +#[doc = "Write proxy for field `INTEN18`"] +pub struct INTEN18_W<'a> { w: &'a mut W, } -impl<'a> _INTEN18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> INTEN18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Enable Interrupt on line 0"] - #[inline] - pub fn inten0(&self) -> INTEN0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN0R { bits } + #[inline(always)] + pub fn inten0(&self) -> INTEN0_R { + INTEN0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Enable Interrupt on line 1"] - #[inline] - pub fn inten1(&self) -> INTEN1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN1R { bits } + #[inline(always)] + pub fn inten1(&self) -> INTEN1_R { + INTEN1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Enable Interrupt on line 2"] - #[inline] - pub fn inten2(&self) -> INTEN2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN2R { bits } + #[inline(always)] + pub fn inten2(&self) -> INTEN2_R { + INTEN2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Enable Interrupt on line 3"] - #[inline] - pub fn inten3(&self) -> INTEN3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN3R { bits } + #[inline(always)] + pub fn inten3(&self) -> INTEN3_R { + INTEN3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Enable Interrupt on line 4"] - #[inline] - pub fn inten4(&self) -> INTEN4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN4R { bits } + #[inline(always)] + pub fn inten4(&self) -> INTEN4_R { + INTEN4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Enable Interrupt on line 5"] - #[inline] - pub fn inten5(&self) -> INTEN5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN5R { bits } + #[inline(always)] + pub fn inten5(&self) -> INTEN5_R { + INTEN5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Enable Interrupt on line 6"] - #[inline] - pub fn inten6(&self) -> INTEN6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN6R { bits } + #[inline(always)] + pub fn inten6(&self) -> INTEN6_R { + INTEN6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Enable Interrupt on line 7"] - #[inline] - pub fn inten7(&self) -> INTEN7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN7R { bits } + #[inline(always)] + pub fn inten7(&self) -> INTEN7_R { + INTEN7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Enable Interrupt on line 8"] - #[inline] - pub fn inten8(&self) -> INTEN8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN8R { bits } + #[inline(always)] + pub fn inten8(&self) -> INTEN8_R { + INTEN8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Enable Interrupt on line 9"] - #[inline] - pub fn inten9(&self) -> INTEN9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN9R { bits } + #[inline(always)] + pub fn inten9(&self) -> INTEN9_R { + INTEN9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Enable Interrupt on line 10"] - #[inline] - pub fn inten10(&self) -> INTEN10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN10R { bits } + #[inline(always)] + pub fn inten10(&self) -> INTEN10_R { + INTEN10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Enable Interrupt on line 11"] - #[inline] - pub fn inten11(&self) -> INTEN11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN11R { bits } + #[inline(always)] + pub fn inten11(&self) -> INTEN11_R { + INTEN11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Enable Interrupt on line 12"] - #[inline] - pub fn inten12(&self) -> INTEN12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN12R { bits } + #[inline(always)] + pub fn inten12(&self) -> INTEN12_R { + INTEN12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Enable Interrupt on line 13"] - #[inline] - pub fn inten13(&self) -> INTEN13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN13R { bits } + #[inline(always)] + pub fn inten13(&self) -> INTEN13_R { + INTEN13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Enable Interrupt on line 14"] - #[inline] - pub fn inten14(&self) -> INTEN14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN14R { bits } + #[inline(always)] + pub fn inten14(&self) -> INTEN14_R { + INTEN14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Enable Interrupt on line 15"] - #[inline] - pub fn inten15(&self) -> INTEN15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN15R { bits } + #[inline(always)] + pub fn inten15(&self) -> INTEN15_R { + INTEN15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Enable Interrupt on line 16"] - #[inline] - pub fn inten16(&self) -> INTEN16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN16R { bits } + #[inline(always)] + pub fn inten16(&self) -> INTEN16_R { + INTEN16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Enable Interrupt on line 17"] - #[inline] - pub fn inten17(&self) -> INTEN17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN17R { bits } + #[inline(always)] + pub fn inten17(&self) -> INTEN17_R { + INTEN17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Enable Interrupt on line 18"] - #[inline] - pub fn inten18(&self) -> INTEN18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - INTEN18R { bits } + #[inline(always)] + pub fn inten18(&self) -> INTEN18_R { + INTEN18_R::new(((self.bits >> 18) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Enable Interrupt on line 0"] - #[inline] - pub fn inten0(&mut self) -> _INTEN0W { - _INTEN0W { w: self } + #[inline(always)] + pub fn inten0(&mut self) -> INTEN0_W { + INTEN0_W { w: self } } #[doc = "Bit 1 - Enable Interrupt on line 1"] - #[inline] - pub fn inten1(&mut self) -> _INTEN1W { - _INTEN1W { w: self } + #[inline(always)] + pub fn inten1(&mut self) -> INTEN1_W { + INTEN1_W { w: self } } #[doc = "Bit 2 - Enable Interrupt on line 2"] - #[inline] - pub fn inten2(&mut self) -> _INTEN2W { - _INTEN2W { w: self } + #[inline(always)] + pub fn inten2(&mut self) -> INTEN2_W { + INTEN2_W { w: self } } #[doc = "Bit 3 - Enable Interrupt on line 3"] - #[inline] - pub fn inten3(&mut self) -> _INTEN3W { - _INTEN3W { w: self } + #[inline(always)] + pub fn inten3(&mut self) -> INTEN3_W { + INTEN3_W { w: self } } #[doc = "Bit 4 - Enable Interrupt on line 4"] - #[inline] - pub fn inten4(&mut self) -> _INTEN4W { - _INTEN4W { w: self } + #[inline(always)] + pub fn inten4(&mut self) -> INTEN4_W { + INTEN4_W { w: self } } #[doc = "Bit 5 - Enable Interrupt on line 5"] - #[inline] - pub fn inten5(&mut self) -> _INTEN5W { - _INTEN5W { w: self } + #[inline(always)] + pub fn inten5(&mut self) -> INTEN5_W { + INTEN5_W { w: self } } #[doc = "Bit 6 - Enable Interrupt on line 6"] - #[inline] - pub fn inten6(&mut self) -> _INTEN6W { - _INTEN6W { w: self } + #[inline(always)] + pub fn inten6(&mut self) -> INTEN6_W { + INTEN6_W { w: self } } #[doc = "Bit 7 - Enable Interrupt on line 7"] - #[inline] - pub fn inten7(&mut self) -> _INTEN7W { - _INTEN7W { w: self } + #[inline(always)] + pub fn inten7(&mut self) -> INTEN7_W { + INTEN7_W { w: self } } #[doc = "Bit 8 - Enable Interrupt on line 8"] - #[inline] - pub fn inten8(&mut self) -> _INTEN8W { - _INTEN8W { w: self } + #[inline(always)] + pub fn inten8(&mut self) -> INTEN8_W { + INTEN8_W { w: self } } #[doc = "Bit 9 - Enable Interrupt on line 9"] - #[inline] - pub fn inten9(&mut self) -> _INTEN9W { - _INTEN9W { w: self } + #[inline(always)] + pub fn inten9(&mut self) -> INTEN9_W { + INTEN9_W { w: self } } #[doc = "Bit 10 - Enable Interrupt on line 10"] - #[inline] - pub fn inten10(&mut self) -> _INTEN10W { - _INTEN10W { w: self } + #[inline(always)] + pub fn inten10(&mut self) -> INTEN10_W { + INTEN10_W { w: self } } #[doc = "Bit 11 - Enable Interrupt on line 11"] - #[inline] - pub fn inten11(&mut self) -> _INTEN11W { - _INTEN11W { w: self } + #[inline(always)] + pub fn inten11(&mut self) -> INTEN11_W { + INTEN11_W { w: self } } #[doc = "Bit 12 - Enable Interrupt on line 12"] - #[inline] - pub fn inten12(&mut self) -> _INTEN12W { - _INTEN12W { w: self } + #[inline(always)] + pub fn inten12(&mut self) -> INTEN12_W { + INTEN12_W { w: self } } #[doc = "Bit 13 - Enable Interrupt on line 13"] - #[inline] - pub fn inten13(&mut self) -> _INTEN13W { - _INTEN13W { w: self } + #[inline(always)] + pub fn inten13(&mut self) -> INTEN13_W { + INTEN13_W { w: self } } #[doc = "Bit 14 - Enable Interrupt on line 14"] - #[inline] - pub fn inten14(&mut self) -> _INTEN14W { - _INTEN14W { w: self } + #[inline(always)] + pub fn inten14(&mut self) -> INTEN14_W { + INTEN14_W { w: self } } #[doc = "Bit 15 - Enable Interrupt on line 15"] - #[inline] - pub fn inten15(&mut self) -> _INTEN15W { - _INTEN15W { w: self } + #[inline(always)] + pub fn inten15(&mut self) -> INTEN15_W { + INTEN15_W { w: self } } #[doc = "Bit 16 - Enable Interrupt on line 16"] - #[inline] - pub fn inten16(&mut self) -> _INTEN16W { - _INTEN16W { w: self } + #[inline(always)] + pub fn inten16(&mut self) -> INTEN16_W { + INTEN16_W { w: self } } #[doc = "Bit 17 - Enable Interrupt on line 17"] - #[inline] - pub fn inten17(&mut self) -> _INTEN17W { - _INTEN17W { w: self } + #[inline(always)] + pub fn inten17(&mut self) -> INTEN17_W { + INTEN17_W { w: self } } #[doc = "Bit 18 - Enable Interrupt on line 18"] - #[inline] - pub fn inten18(&mut self) -> _INTEN18W { - _INTEN18W { w: self } + #[inline(always)] + pub fn inten18(&mut self) -> INTEN18_W { + INTEN18_W { w: self } } } diff --git a/src/exti/pd.rs b/src/exti/pd.rs index 62aa6ea7d6e01a6e99ac780836f08d95d91cfbb5..80a6e48d44a98987da1e1fa166f1534d30c33bbd 100644 --- a/src/exti/pd.rs +++ b/src/exti/pd.rs @@ -1,1185 +1,662 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::PD { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PD0R { - bits: bool, -} -impl PD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD1R { - bits: bool, -} -impl PD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD2R { - bits: bool, -} -impl PD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD3R { - bits: bool, -} -impl PD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD4R { - bits: bool, -} -impl PD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD5R { - bits: bool, -} -impl PD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD6R { - bits: bool, -} -impl PD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD7R { - bits: bool, -} -impl PD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD8R { - bits: bool, -} -impl PD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD9R { - bits: bool, -} -impl PD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD10R { - bits: bool, -} -impl PD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD11R { - bits: bool, -} -impl PD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD12R { - bits: bool, -} -impl PD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD13R { - bits: bool, -} -impl PD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD14R { - bits: bool, -} -impl PD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD15R { - bits: bool, -} -impl PD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD16R { - bits: bool, -} -impl PD16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD17R { - bits: bool, -} -impl PD17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PD18R { - bits: bool, -} -impl PD18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _PD0W<'a> { +#[doc = "Reader of register PD"] +pub type R = crate::R; +#[doc = "Writer for register PD"] +pub type W = crate::W; +#[doc = "Register PD `reset()`'s with value 0"] +impl crate::ResetValue for super::PD { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PD0`"] +pub type PD0_R = crate::R; +#[doc = "Write proxy for field `PD0`"] +pub struct PD0_W<'a> { w: &'a mut W, } -impl<'a> _PD0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _PD1W<'a> { +#[doc = "Reader of field `PD1`"] +pub type PD1_R = crate::R; +#[doc = "Write proxy for field `PD1`"] +pub struct PD1_W<'a> { w: &'a mut W, } -impl<'a> _PD1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _PD2W<'a> { +#[doc = "Reader of field `PD2`"] +pub type PD2_R = crate::R; +#[doc = "Write proxy for field `PD2`"] +pub struct PD2_W<'a> { w: &'a mut W, } -impl<'a> _PD2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _PD3W<'a> { +#[doc = "Reader of field `PD3`"] +pub type PD3_R = crate::R; +#[doc = "Write proxy for field `PD3`"] +pub struct PD3_W<'a> { w: &'a mut W, } -impl<'a> _PD3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _PD4W<'a> { +#[doc = "Reader of field `PD4`"] +pub type PD4_R = crate::R; +#[doc = "Write proxy for field `PD4`"] +pub struct PD4_W<'a> { w: &'a mut W, } -impl<'a> _PD4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _PD5W<'a> { +#[doc = "Reader of field `PD5`"] +pub type PD5_R = crate::R; +#[doc = "Write proxy for field `PD5`"] +pub struct PD5_W<'a> { w: &'a mut W, } -impl<'a> _PD5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _PD6W<'a> { +#[doc = "Reader of field `PD6`"] +pub type PD6_R = crate::R; +#[doc = "Write proxy for field `PD6`"] +pub struct PD6_W<'a> { w: &'a mut W, } -impl<'a> _PD6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _PD7W<'a> { +#[doc = "Reader of field `PD7`"] +pub type PD7_R = crate::R; +#[doc = "Write proxy for field `PD7`"] +pub struct PD7_W<'a> { w: &'a mut W, } -impl<'a> _PD7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _PD8W<'a> { +#[doc = "Reader of field `PD8`"] +pub type PD8_R = crate::R; +#[doc = "Write proxy for field `PD8`"] +pub struct PD8_W<'a> { w: &'a mut W, } -impl<'a> _PD8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _PD9W<'a> { +#[doc = "Reader of field `PD9`"] +pub type PD9_R = crate::R; +#[doc = "Write proxy for field `PD9`"] +pub struct PD9_W<'a> { w: &'a mut W, } -impl<'a> _PD9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _PD10W<'a> { +#[doc = "Reader of field `PD10`"] +pub type PD10_R = crate::R; +#[doc = "Write proxy for field `PD10`"] +pub struct PD10_W<'a> { w: &'a mut W, } -impl<'a> _PD10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PD11W<'a> { +#[doc = "Reader of field `PD11`"] +pub type PD11_R = crate::R; +#[doc = "Write proxy for field `PD11`"] +pub struct PD11_W<'a> { w: &'a mut W, } -impl<'a> _PD11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _PD12W<'a> { +#[doc = "Reader of field `PD12`"] +pub type PD12_R = crate::R; +#[doc = "Write proxy for field `PD12`"] +pub struct PD12_W<'a> { w: &'a mut W, } -impl<'a> _PD12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _PD13W<'a> { +#[doc = "Reader of field `PD13`"] +pub type PD13_R = crate::R; +#[doc = "Write proxy for field `PD13`"] +pub struct PD13_W<'a> { w: &'a mut W, } -impl<'a> _PD13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _PD14W<'a> { +#[doc = "Reader of field `PD14`"] +pub type PD14_R = crate::R; +#[doc = "Write proxy for field `PD14`"] +pub struct PD14_W<'a> { w: &'a mut W, } -impl<'a> _PD14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _PD15W<'a> { +#[doc = "Reader of field `PD15`"] +pub type PD15_R = crate::R; +#[doc = "Write proxy for field `PD15`"] +pub struct PD15_W<'a> { w: &'a mut W, } -impl<'a> _PD15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _PD16W<'a> { +#[doc = "Reader of field `PD16`"] +pub type PD16_R = crate::R; +#[doc = "Write proxy for field `PD16`"] +pub struct PD16_W<'a> { w: &'a mut W, } -impl<'a> _PD16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _PD17W<'a> { +#[doc = "Reader of field `PD17`"] +pub type PD17_R = crate::R; +#[doc = "Write proxy for field `PD17`"] +pub struct PD17_W<'a> { w: &'a mut W, } -impl<'a> _PD17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _PD18W<'a> { +#[doc = "Reader of field `PD18`"] +pub type PD18_R = crate::R; +#[doc = "Write proxy for field `PD18`"] +pub struct PD18_W<'a> { w: &'a mut W, } -impl<'a> _PD18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PD18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Interrupt pending status of line 0"] - #[inline] - pub fn pd0(&self) -> PD0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD0R { bits } + #[inline(always)] + pub fn pd0(&self) -> PD0_R { + PD0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Interrupt pending status of line 1"] - #[inline] - pub fn pd1(&self) -> PD1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD1R { bits } + #[inline(always)] + pub fn pd1(&self) -> PD1_R { + PD1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Interrupt pending status of line 2"] - #[inline] - pub fn pd2(&self) -> PD2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD2R { bits } + #[inline(always)] + pub fn pd2(&self) -> PD2_R { + PD2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Interrupt pending status of line 3"] - #[inline] - pub fn pd3(&self) -> PD3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD3R { bits } + #[inline(always)] + pub fn pd3(&self) -> PD3_R { + PD3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Interrupt pending status of line 4"] - #[inline] - pub fn pd4(&self) -> PD4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD4R { bits } + #[inline(always)] + pub fn pd4(&self) -> PD4_R { + PD4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Interrupt pending status of line 5"] - #[inline] - pub fn pd5(&self) -> PD5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD5R { bits } + #[inline(always)] + pub fn pd5(&self) -> PD5_R { + PD5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Interrupt pending status of line 6"] - #[inline] - pub fn pd6(&self) -> PD6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD6R { bits } + #[inline(always)] + pub fn pd6(&self) -> PD6_R { + PD6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Interrupt pending status of line 7"] - #[inline] - pub fn pd7(&self) -> PD7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD7R { bits } + #[inline(always)] + pub fn pd7(&self) -> PD7_R { + PD7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Interrupt pending status of line 8"] - #[inline] - pub fn pd8(&self) -> PD8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD8R { bits } + #[inline(always)] + pub fn pd8(&self) -> PD8_R { + PD8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Interrupt pending status of line 9"] - #[inline] - pub fn pd9(&self) -> PD9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD9R { bits } + #[inline(always)] + pub fn pd9(&self) -> PD9_R { + PD9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Interrupt pending status of line 10"] - #[inline] - pub fn pd10(&self) -> PD10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD10R { bits } + #[inline(always)] + pub fn pd10(&self) -> PD10_R { + PD10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Interrupt pending status of line 11"] - #[inline] - pub fn pd11(&self) -> PD11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD11R { bits } + #[inline(always)] + pub fn pd11(&self) -> PD11_R { + PD11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Interrupt pending status of line 12"] - #[inline] - pub fn pd12(&self) -> PD12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD12R { bits } + #[inline(always)] + pub fn pd12(&self) -> PD12_R { + PD12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Interrupt pending status of line 13"] - #[inline] - pub fn pd13(&self) -> PD13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD13R { bits } + #[inline(always)] + pub fn pd13(&self) -> PD13_R { + PD13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Interrupt pending status of line 14"] - #[inline] - pub fn pd14(&self) -> PD14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD14R { bits } + #[inline(always)] + pub fn pd14(&self) -> PD14_R { + PD14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Interrupt pending status of line 15"] - #[inline] - pub fn pd15(&self) -> PD15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD15R { bits } + #[inline(always)] + pub fn pd15(&self) -> PD15_R { + PD15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Interrupt pending status of line 16"] - #[inline] - pub fn pd16(&self) -> PD16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD16R { bits } + #[inline(always)] + pub fn pd16(&self) -> PD16_R { + PD16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Interrupt pending status of line 17"] - #[inline] - pub fn pd17(&self) -> PD17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD17R { bits } + #[inline(always)] + pub fn pd17(&self) -> PD17_R { + PD17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Interrupt pending status of line 18"] - #[inline] - pub fn pd18(&self) -> PD18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PD18R { bits } + #[inline(always)] + pub fn pd18(&self) -> PD18_R { + PD18_R::new(((self.bits >> 18) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Interrupt pending status of line 0"] - #[inline] - pub fn pd0(&mut self) -> _PD0W { - _PD0W { w: self } + #[inline(always)] + pub fn pd0(&mut self) -> PD0_W { + PD0_W { w: self } } #[doc = "Bit 1 - Interrupt pending status of line 1"] - #[inline] - pub fn pd1(&mut self) -> _PD1W { - _PD1W { w: self } + #[inline(always)] + pub fn pd1(&mut self) -> PD1_W { + PD1_W { w: self } } #[doc = "Bit 2 - Interrupt pending status of line 2"] - #[inline] - pub fn pd2(&mut self) -> _PD2W { - _PD2W { w: self } + #[inline(always)] + pub fn pd2(&mut self) -> PD2_W { + PD2_W { w: self } } #[doc = "Bit 3 - Interrupt pending status of line 3"] - #[inline] - pub fn pd3(&mut self) -> _PD3W { - _PD3W { w: self } + #[inline(always)] + pub fn pd3(&mut self) -> PD3_W { + PD3_W { w: self } } #[doc = "Bit 4 - Interrupt pending status of line 4"] - #[inline] - pub fn pd4(&mut self) -> _PD4W { - _PD4W { w: self } + #[inline(always)] + pub fn pd4(&mut self) -> PD4_W { + PD4_W { w: self } } #[doc = "Bit 5 - Interrupt pending status of line 5"] - #[inline] - pub fn pd5(&mut self) -> _PD5W { - _PD5W { w: self } + #[inline(always)] + pub fn pd5(&mut self) -> PD5_W { + PD5_W { w: self } } #[doc = "Bit 6 - Interrupt pending status of line 6"] - #[inline] - pub fn pd6(&mut self) -> _PD6W { - _PD6W { w: self } + #[inline(always)] + pub fn pd6(&mut self) -> PD6_W { + PD6_W { w: self } } #[doc = "Bit 7 - Interrupt pending status of line 7"] - #[inline] - pub fn pd7(&mut self) -> _PD7W { - _PD7W { w: self } + #[inline(always)] + pub fn pd7(&mut self) -> PD7_W { + PD7_W { w: self } } #[doc = "Bit 8 - Interrupt pending status of line 8"] - #[inline] - pub fn pd8(&mut self) -> _PD8W { - _PD8W { w: self } + #[inline(always)] + pub fn pd8(&mut self) -> PD8_W { + PD8_W { w: self } } #[doc = "Bit 9 - Interrupt pending status of line 9"] - #[inline] - pub fn pd9(&mut self) -> _PD9W { - _PD9W { w: self } + #[inline(always)] + pub fn pd9(&mut self) -> PD9_W { + PD9_W { w: self } } #[doc = "Bit 10 - Interrupt pending status of line 10"] - #[inline] - pub fn pd10(&mut self) -> _PD10W { - _PD10W { w: self } + #[inline(always)] + pub fn pd10(&mut self) -> PD10_W { + PD10_W { w: self } } #[doc = "Bit 11 - Interrupt pending status of line 11"] - #[inline] - pub fn pd11(&mut self) -> _PD11W { - _PD11W { w: self } + #[inline(always)] + pub fn pd11(&mut self) -> PD11_W { + PD11_W { w: self } } #[doc = "Bit 12 - Interrupt pending status of line 12"] - #[inline] - pub fn pd12(&mut self) -> _PD12W { - _PD12W { w: self } + #[inline(always)] + pub fn pd12(&mut self) -> PD12_W { + PD12_W { w: self } } #[doc = "Bit 13 - Interrupt pending status of line 13"] - #[inline] - pub fn pd13(&mut self) -> _PD13W { - _PD13W { w: self } + #[inline(always)] + pub fn pd13(&mut self) -> PD13_W { + PD13_W { w: self } } #[doc = "Bit 14 - Interrupt pending status of line 14"] - #[inline] - pub fn pd14(&mut self) -> _PD14W { - _PD14W { w: self } + #[inline(always)] + pub fn pd14(&mut self) -> PD14_W { + PD14_W { w: self } } #[doc = "Bit 15 - Interrupt pending status of line 15"] - #[inline] - pub fn pd15(&mut self) -> _PD15W { - _PD15W { w: self } + #[inline(always)] + pub fn pd15(&mut self) -> PD15_W { + PD15_W { w: self } } #[doc = "Bit 16 - Interrupt pending status of line 16"] - #[inline] - pub fn pd16(&mut self) -> _PD16W { - _PD16W { w: self } + #[inline(always)] + pub fn pd16(&mut self) -> PD16_W { + PD16_W { w: self } } #[doc = "Bit 17 - Interrupt pending status of line 17"] - #[inline] - pub fn pd17(&mut self) -> _PD17W { - _PD17W { w: self } + #[inline(always)] + pub fn pd17(&mut self) -> PD17_W { + PD17_W { w: self } } #[doc = "Bit 18 - Interrupt pending status of line 18"] - #[inline] - pub fn pd18(&mut self) -> _PD18W { - _PD18W { w: self } + #[inline(always)] + pub fn pd18(&mut self) -> PD18_W { + PD18_W { w: self } } } diff --git a/src/exti/rten.rs b/src/exti/rten.rs index 338619a3bdf912558f1cba2bdc0a08333364ee3e..63e2e8d27cf99db86a3323a8e2c96c7551d3b5d5 100644 --- a/src/exti/rten.rs +++ b/src/exti/rten.rs @@ -1,1185 +1,662 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::RTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RTEN0R { - bits: bool, -} -impl RTEN0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN1R { - bits: bool, -} -impl RTEN1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN2R { - bits: bool, -} -impl RTEN2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN3R { - bits: bool, -} -impl RTEN3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN4R { - bits: bool, -} -impl RTEN4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN5R { - bits: bool, -} -impl RTEN5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN6R { - bits: bool, -} -impl RTEN6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN7R { - bits: bool, -} -impl RTEN7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN8R { - bits: bool, -} -impl RTEN8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN9R { - bits: bool, -} -impl RTEN9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN10R { - bits: bool, -} -impl RTEN10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN11R { - bits: bool, -} -impl RTEN11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN12R { - bits: bool, -} -impl RTEN12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN13R { - bits: bool, -} -impl RTEN13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN14R { - bits: bool, -} -impl RTEN14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN15R { - bits: bool, -} -impl RTEN15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN16R { - bits: bool, -} -impl RTEN16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN17R { - bits: bool, -} -impl RTEN17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTEN18R { - bits: bool, -} -impl RTEN18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _RTEN0W<'a> { +#[doc = "Reader of register RTEN"] +pub type R = crate::R; +#[doc = "Writer for register RTEN"] +pub type W = crate::W; +#[doc = "Register RTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::RTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `RTEN0`"] +pub type RTEN0_R = crate::R; +#[doc = "Write proxy for field `RTEN0`"] +pub struct RTEN0_W<'a> { w: &'a mut W, } -impl<'a> _RTEN0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN1W<'a> { +#[doc = "Reader of field `RTEN1`"] +pub type RTEN1_R = crate::R; +#[doc = "Write proxy for field `RTEN1`"] +pub struct RTEN1_W<'a> { w: &'a mut W, } -impl<'a> _RTEN1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN2W<'a> { +#[doc = "Reader of field `RTEN2`"] +pub type RTEN2_R = crate::R; +#[doc = "Write proxy for field `RTEN2`"] +pub struct RTEN2_W<'a> { w: &'a mut W, } -impl<'a> _RTEN2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN3W<'a> { +#[doc = "Reader of field `RTEN3`"] +pub type RTEN3_R = crate::R; +#[doc = "Write proxy for field `RTEN3`"] +pub struct RTEN3_W<'a> { w: &'a mut W, } -impl<'a> _RTEN3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN4W<'a> { +#[doc = "Reader of field `RTEN4`"] +pub type RTEN4_R = crate::R; +#[doc = "Write proxy for field `RTEN4`"] +pub struct RTEN4_W<'a> { w: &'a mut W, } -impl<'a> _RTEN4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN5W<'a> { +#[doc = "Reader of field `RTEN5`"] +pub type RTEN5_R = crate::R; +#[doc = "Write proxy for field `RTEN5`"] +pub struct RTEN5_W<'a> { w: &'a mut W, } -impl<'a> _RTEN5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN6W<'a> { +#[doc = "Reader of field `RTEN6`"] +pub type RTEN6_R = crate::R; +#[doc = "Write proxy for field `RTEN6`"] +pub struct RTEN6_W<'a> { w: &'a mut W, } -impl<'a> _RTEN6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN7W<'a> { +#[doc = "Reader of field `RTEN7`"] +pub type RTEN7_R = crate::R; +#[doc = "Write proxy for field `RTEN7`"] +pub struct RTEN7_W<'a> { w: &'a mut W, } -impl<'a> _RTEN7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN8W<'a> { +#[doc = "Reader of field `RTEN8`"] +pub type RTEN8_R = crate::R; +#[doc = "Write proxy for field `RTEN8`"] +pub struct RTEN8_W<'a> { w: &'a mut W, } -impl<'a> _RTEN8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN9W<'a> { +#[doc = "Reader of field `RTEN9`"] +pub type RTEN9_R = crate::R; +#[doc = "Write proxy for field `RTEN9`"] +pub struct RTEN9_W<'a> { w: &'a mut W, } -impl<'a> _RTEN9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN10W<'a> { +#[doc = "Reader of field `RTEN10`"] +pub type RTEN10_R = crate::R; +#[doc = "Write proxy for field `RTEN10`"] +pub struct RTEN10_W<'a> { w: &'a mut W, } -impl<'a> _RTEN10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN11W<'a> { +#[doc = "Reader of field `RTEN11`"] +pub type RTEN11_R = crate::R; +#[doc = "Write proxy for field `RTEN11`"] +pub struct RTEN11_W<'a> { w: &'a mut W, } -impl<'a> _RTEN11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN12W<'a> { +#[doc = "Reader of field `RTEN12`"] +pub type RTEN12_R = crate::R; +#[doc = "Write proxy for field `RTEN12`"] +pub struct RTEN12_W<'a> { w: &'a mut W, } -impl<'a> _RTEN12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN13W<'a> { +#[doc = "Reader of field `RTEN13`"] +pub type RTEN13_R = crate::R; +#[doc = "Write proxy for field `RTEN13`"] +pub struct RTEN13_W<'a> { w: &'a mut W, } -impl<'a> _RTEN13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN14W<'a> { +#[doc = "Reader of field `RTEN14`"] +pub type RTEN14_R = crate::R; +#[doc = "Write proxy for field `RTEN14`"] +pub struct RTEN14_W<'a> { w: &'a mut W, } -impl<'a> _RTEN14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN15W<'a> { +#[doc = "Reader of field `RTEN15`"] +pub type RTEN15_R = crate::R; +#[doc = "Write proxy for field `RTEN15`"] +pub struct RTEN15_W<'a> { w: &'a mut W, } -impl<'a> _RTEN15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN16W<'a> { +#[doc = "Reader of field `RTEN16`"] +pub type RTEN16_R = crate::R; +#[doc = "Write proxy for field `RTEN16`"] +pub struct RTEN16_W<'a> { w: &'a mut W, } -impl<'a> _RTEN16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN17W<'a> { +#[doc = "Reader of field `RTEN17`"] +pub type RTEN17_R = crate::R; +#[doc = "Write proxy for field `RTEN17`"] +pub struct RTEN17_W<'a> { w: &'a mut W, } -impl<'a> _RTEN17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _RTEN18W<'a> { +#[doc = "Reader of field `RTEN18`"] +pub type RTEN18_R = crate::R; +#[doc = "Write proxy for field `RTEN18`"] +pub struct RTEN18_W<'a> { w: &'a mut W, } -impl<'a> _RTEN18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTEN18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Rising edge trigger enable of line 0"] - #[inline] - pub fn rten0(&self) -> RTEN0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN0R { bits } + #[inline(always)] + pub fn rten0(&self) -> RTEN0_R { + RTEN0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Rising edge trigger enable of line 1"] - #[inline] - pub fn rten1(&self) -> RTEN1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN1R { bits } + #[inline(always)] + pub fn rten1(&self) -> RTEN1_R { + RTEN1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Rising edge trigger enable of line 2"] - #[inline] - pub fn rten2(&self) -> RTEN2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN2R { bits } + #[inline(always)] + pub fn rten2(&self) -> RTEN2_R { + RTEN2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Rising edge trigger enable of line 3"] - #[inline] - pub fn rten3(&self) -> RTEN3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN3R { bits } + #[inline(always)] + pub fn rten3(&self) -> RTEN3_R { + RTEN3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Rising edge trigger enable of line 4"] - #[inline] - pub fn rten4(&self) -> RTEN4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN4R { bits } + #[inline(always)] + pub fn rten4(&self) -> RTEN4_R { + RTEN4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Rising edge trigger enable of line 5"] - #[inline] - pub fn rten5(&self) -> RTEN5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN5R { bits } + #[inline(always)] + pub fn rten5(&self) -> RTEN5_R { + RTEN5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Rising edge trigger enable of line 6"] - #[inline] - pub fn rten6(&self) -> RTEN6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN6R { bits } + #[inline(always)] + pub fn rten6(&self) -> RTEN6_R { + RTEN6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Rising edge trigger enable of line 7"] - #[inline] - pub fn rten7(&self) -> RTEN7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN7R { bits } + #[inline(always)] + pub fn rten7(&self) -> RTEN7_R { + RTEN7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Rising edge trigger enable of line 8"] - #[inline] - pub fn rten8(&self) -> RTEN8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN8R { bits } + #[inline(always)] + pub fn rten8(&self) -> RTEN8_R { + RTEN8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Rising edge trigger enable of line 9"] - #[inline] - pub fn rten9(&self) -> RTEN9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN9R { bits } + #[inline(always)] + pub fn rten9(&self) -> RTEN9_R { + RTEN9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Rising edge trigger enable of line 10"] - #[inline] - pub fn rten10(&self) -> RTEN10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN10R { bits } + #[inline(always)] + pub fn rten10(&self) -> RTEN10_R { + RTEN10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Rising edge trigger enable of line 11"] - #[inline] - pub fn rten11(&self) -> RTEN11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN11R { bits } + #[inline(always)] + pub fn rten11(&self) -> RTEN11_R { + RTEN11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Rising edge trigger enable of line 12"] - #[inline] - pub fn rten12(&self) -> RTEN12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN12R { bits } + #[inline(always)] + pub fn rten12(&self) -> RTEN12_R { + RTEN12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Rising edge trigger enable of line 13"] - #[inline] - pub fn rten13(&self) -> RTEN13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN13R { bits } + #[inline(always)] + pub fn rten13(&self) -> RTEN13_R { + RTEN13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Rising edge trigger enable of line 14"] - #[inline] - pub fn rten14(&self) -> RTEN14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN14R { bits } + #[inline(always)] + pub fn rten14(&self) -> RTEN14_R { + RTEN14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Rising edge trigger enable of line 15"] - #[inline] - pub fn rten15(&self) -> RTEN15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN15R { bits } + #[inline(always)] + pub fn rten15(&self) -> RTEN15_R { + RTEN15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Rising edge trigger enable of line 16"] - #[inline] - pub fn rten16(&self) -> RTEN16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN16R { bits } + #[inline(always)] + pub fn rten16(&self) -> RTEN16_R { + RTEN16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Rising edge trigger enable of line 17"] - #[inline] - pub fn rten17(&self) -> RTEN17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN17R { bits } + #[inline(always)] + pub fn rten17(&self) -> RTEN17_R { + RTEN17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Rising edge trigger enable of line 18"] - #[inline] - pub fn rten18(&self) -> RTEN18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTEN18R { bits } + #[inline(always)] + pub fn rten18(&self) -> RTEN18_R { + RTEN18_R::new(((self.bits >> 18) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Rising edge trigger enable of line 0"] - #[inline] - pub fn rten0(&mut self) -> _RTEN0W { - _RTEN0W { w: self } + #[inline(always)] + pub fn rten0(&mut self) -> RTEN0_W { + RTEN0_W { w: self } } #[doc = "Bit 1 - Rising edge trigger enable of line 1"] - #[inline] - pub fn rten1(&mut self) -> _RTEN1W { - _RTEN1W { w: self } + #[inline(always)] + pub fn rten1(&mut self) -> RTEN1_W { + RTEN1_W { w: self } } #[doc = "Bit 2 - Rising edge trigger enable of line 2"] - #[inline] - pub fn rten2(&mut self) -> _RTEN2W { - _RTEN2W { w: self } + #[inline(always)] + pub fn rten2(&mut self) -> RTEN2_W { + RTEN2_W { w: self } } #[doc = "Bit 3 - Rising edge trigger enable of line 3"] - #[inline] - pub fn rten3(&mut self) -> _RTEN3W { - _RTEN3W { w: self } + #[inline(always)] + pub fn rten3(&mut self) -> RTEN3_W { + RTEN3_W { w: self } } #[doc = "Bit 4 - Rising edge trigger enable of line 4"] - #[inline] - pub fn rten4(&mut self) -> _RTEN4W { - _RTEN4W { w: self } + #[inline(always)] + pub fn rten4(&mut self) -> RTEN4_W { + RTEN4_W { w: self } } #[doc = "Bit 5 - Rising edge trigger enable of line 5"] - #[inline] - pub fn rten5(&mut self) -> _RTEN5W { - _RTEN5W { w: self } + #[inline(always)] + pub fn rten5(&mut self) -> RTEN5_W { + RTEN5_W { w: self } } #[doc = "Bit 6 - Rising edge trigger enable of line 6"] - #[inline] - pub fn rten6(&mut self) -> _RTEN6W { - _RTEN6W { w: self } + #[inline(always)] + pub fn rten6(&mut self) -> RTEN6_W { + RTEN6_W { w: self } } #[doc = "Bit 7 - Rising edge trigger enable of line 7"] - #[inline] - pub fn rten7(&mut self) -> _RTEN7W { - _RTEN7W { w: self } + #[inline(always)] + pub fn rten7(&mut self) -> RTEN7_W { + RTEN7_W { w: self } } #[doc = "Bit 8 - Rising edge trigger enable of line 8"] - #[inline] - pub fn rten8(&mut self) -> _RTEN8W { - _RTEN8W { w: self } + #[inline(always)] + pub fn rten8(&mut self) -> RTEN8_W { + RTEN8_W { w: self } } #[doc = "Bit 9 - Rising edge trigger enable of line 9"] - #[inline] - pub fn rten9(&mut self) -> _RTEN9W { - _RTEN9W { w: self } + #[inline(always)] + pub fn rten9(&mut self) -> RTEN9_W { + RTEN9_W { w: self } } #[doc = "Bit 10 - Rising edge trigger enable of line 10"] - #[inline] - pub fn rten10(&mut self) -> _RTEN10W { - _RTEN10W { w: self } + #[inline(always)] + pub fn rten10(&mut self) -> RTEN10_W { + RTEN10_W { w: self } } #[doc = "Bit 11 - Rising edge trigger enable of line 11"] - #[inline] - pub fn rten11(&mut self) -> _RTEN11W { - _RTEN11W { w: self } + #[inline(always)] + pub fn rten11(&mut self) -> RTEN11_W { + RTEN11_W { w: self } } #[doc = "Bit 12 - Rising edge trigger enable of line 12"] - #[inline] - pub fn rten12(&mut self) -> _RTEN12W { - _RTEN12W { w: self } + #[inline(always)] + pub fn rten12(&mut self) -> RTEN12_W { + RTEN12_W { w: self } } #[doc = "Bit 13 - Rising edge trigger enable of line 13"] - #[inline] - pub fn rten13(&mut self) -> _RTEN13W { - _RTEN13W { w: self } + #[inline(always)] + pub fn rten13(&mut self) -> RTEN13_W { + RTEN13_W { w: self } } #[doc = "Bit 14 - Rising edge trigger enable of line 14"] - #[inline] - pub fn rten14(&mut self) -> _RTEN14W { - _RTEN14W { w: self } + #[inline(always)] + pub fn rten14(&mut self) -> RTEN14_W { + RTEN14_W { w: self } } #[doc = "Bit 15 - Rising edge trigger enable of line 15"] - #[inline] - pub fn rten15(&mut self) -> _RTEN15W { - _RTEN15W { w: self } + #[inline(always)] + pub fn rten15(&mut self) -> RTEN15_W { + RTEN15_W { w: self } } #[doc = "Bit 16 - Rising edge trigger enable of line 16"] - #[inline] - pub fn rten16(&mut self) -> _RTEN16W { - _RTEN16W { w: self } + #[inline(always)] + pub fn rten16(&mut self) -> RTEN16_W { + RTEN16_W { w: self } } #[doc = "Bit 17 - Rising edge trigger enable of line 17"] - #[inline] - pub fn rten17(&mut self) -> _RTEN17W { - _RTEN17W { w: self } + #[inline(always)] + pub fn rten17(&mut self) -> RTEN17_W { + RTEN17_W { w: self } } #[doc = "Bit 18 - Rising edge trigger enable of line 18"] - #[inline] - pub fn rten18(&mut self) -> _RTEN18W { - _RTEN18W { w: self } + #[inline(always)] + pub fn rten18(&mut self) -> RTEN18_W { + RTEN18_W { w: self } } } diff --git a/src/exti/swiev.rs b/src/exti/swiev.rs index ae560e9e88c83df43122f8456504497da9aec141..4806748a3fb2d991d37e47dff20234665eaa487c 100644 --- a/src/exti/swiev.rs +++ b/src/exti/swiev.rs @@ -1,1185 +1,662 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::SWIEV { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SWIEV0R { - bits: bool, -} -impl SWIEV0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV1R { - bits: bool, -} -impl SWIEV1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV2R { - bits: bool, -} -impl SWIEV2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV3R { - bits: bool, -} -impl SWIEV3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV4R { - bits: bool, -} -impl SWIEV4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV5R { - bits: bool, -} -impl SWIEV5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV6R { - bits: bool, -} -impl SWIEV6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV7R { - bits: bool, -} -impl SWIEV7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV8R { - bits: bool, -} -impl SWIEV8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV9R { - bits: bool, -} -impl SWIEV9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV10R { - bits: bool, -} -impl SWIEV10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV11R { - bits: bool, -} -impl SWIEV11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV12R { - bits: bool, -} -impl SWIEV12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV13R { - bits: bool, -} -impl SWIEV13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV14R { - bits: bool, -} -impl SWIEV14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV15R { - bits: bool, -} -impl SWIEV15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV16R { - bits: bool, -} -impl SWIEV16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV17R { - bits: bool, -} -impl SWIEV17R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWIEV18R { - bits: bool, -} -impl SWIEV18R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _SWIEV0W<'a> { +#[doc = "Reader of register SWIEV"] +pub type R = crate::R; +#[doc = "Writer for register SWIEV"] +pub type W = crate::W; +#[doc = "Register SWIEV `reset()`'s with value 0"] +impl crate::ResetValue for super::SWIEV { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `SWIEV0`"] +pub type SWIEV0_R = crate::R; +#[doc = "Write proxy for field `SWIEV0`"] +pub struct SWIEV0_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV1W<'a> { +#[doc = "Reader of field `SWIEV1`"] +pub type SWIEV1_R = crate::R; +#[doc = "Write proxy for field `SWIEV1`"] +pub struct SWIEV1_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV2W<'a> { +#[doc = "Reader of field `SWIEV2`"] +pub type SWIEV2_R = crate::R; +#[doc = "Write proxy for field `SWIEV2`"] +pub struct SWIEV2_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV3W<'a> { +#[doc = "Reader of field `SWIEV3`"] +pub type SWIEV3_R = crate::R; +#[doc = "Write proxy for field `SWIEV3`"] +pub struct SWIEV3_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV4W<'a> { +#[doc = "Reader of field `SWIEV4`"] +pub type SWIEV4_R = crate::R; +#[doc = "Write proxy for field `SWIEV4`"] +pub struct SWIEV4_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV5W<'a> { +#[doc = "Reader of field `SWIEV5`"] +pub type SWIEV5_R = crate::R; +#[doc = "Write proxy for field `SWIEV5`"] +pub struct SWIEV5_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV6W<'a> { +#[doc = "Reader of field `SWIEV6`"] +pub type SWIEV6_R = crate::R; +#[doc = "Write proxy for field `SWIEV6`"] +pub struct SWIEV6_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV7W<'a> { +#[doc = "Reader of field `SWIEV7`"] +pub type SWIEV7_R = crate::R; +#[doc = "Write proxy for field `SWIEV7`"] +pub struct SWIEV7_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV8W<'a> { +#[doc = "Reader of field `SWIEV8`"] +pub type SWIEV8_R = crate::R; +#[doc = "Write proxy for field `SWIEV8`"] +pub struct SWIEV8_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV9W<'a> { +#[doc = "Reader of field `SWIEV9`"] +pub type SWIEV9_R = crate::R; +#[doc = "Write proxy for field `SWIEV9`"] +pub struct SWIEV9_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV10W<'a> { +#[doc = "Reader of field `SWIEV10`"] +pub type SWIEV10_R = crate::R; +#[doc = "Write proxy for field `SWIEV10`"] +pub struct SWIEV10_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV11W<'a> { +#[doc = "Reader of field `SWIEV11`"] +pub type SWIEV11_R = crate::R; +#[doc = "Write proxy for field `SWIEV11`"] +pub struct SWIEV11_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV12W<'a> { +#[doc = "Reader of field `SWIEV12`"] +pub type SWIEV12_R = crate::R; +#[doc = "Write proxy for field `SWIEV12`"] +pub struct SWIEV12_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV13W<'a> { +#[doc = "Reader of field `SWIEV13`"] +pub type SWIEV13_R = crate::R; +#[doc = "Write proxy for field `SWIEV13`"] +pub struct SWIEV13_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV14W<'a> { +#[doc = "Reader of field `SWIEV14`"] +pub type SWIEV14_R = crate::R; +#[doc = "Write proxy for field `SWIEV14`"] +pub struct SWIEV14_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV15W<'a> { +#[doc = "Reader of field `SWIEV15`"] +pub type SWIEV15_R = crate::R; +#[doc = "Write proxy for field `SWIEV15`"] +pub struct SWIEV15_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV16W<'a> { +#[doc = "Reader of field `SWIEV16`"] +pub type SWIEV16_R = crate::R; +#[doc = "Write proxy for field `SWIEV16`"] +pub struct SWIEV16_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV17W<'a> { +#[doc = "Reader of field `SWIEV17`"] +pub type SWIEV17_R = crate::R; +#[doc = "Write proxy for field `SWIEV17`"] +pub struct SWIEV17_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV17W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV17_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _SWIEV18W<'a> { +#[doc = "Reader of field `SWIEV18`"] +pub type SWIEV18_R = crate::R; +#[doc = "Write proxy for field `SWIEV18`"] +pub struct SWIEV18_W<'a> { w: &'a mut W, } -impl<'a> _SWIEV18W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWIEV18_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Interrupt/Event software trigger on line 0"] - #[inline] - pub fn swiev0(&self) -> SWIEV0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV0R { bits } + #[inline(always)] + pub fn swiev0(&self) -> SWIEV0_R { + SWIEV0_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Interrupt/Event software trigger on line 1"] - #[inline] - pub fn swiev1(&self) -> SWIEV1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV1R { bits } + #[inline(always)] + pub fn swiev1(&self) -> SWIEV1_R { + SWIEV1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Interrupt/Event software trigger on line 2"] - #[inline] - pub fn swiev2(&self) -> SWIEV2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV2R { bits } + #[inline(always)] + pub fn swiev2(&self) -> SWIEV2_R { + SWIEV2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Interrupt/Event software trigger on line 3"] - #[inline] - pub fn swiev3(&self) -> SWIEV3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV3R { bits } + #[inline(always)] + pub fn swiev3(&self) -> SWIEV3_R { + SWIEV3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Interrupt/Event software trigger on line 4"] - #[inline] - pub fn swiev4(&self) -> SWIEV4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV4R { bits } + #[inline(always)] + pub fn swiev4(&self) -> SWIEV4_R { + SWIEV4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Interrupt/Event software trigger on line 5"] - #[inline] - pub fn swiev5(&self) -> SWIEV5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV5R { bits } + #[inline(always)] + pub fn swiev5(&self) -> SWIEV5_R { + SWIEV5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Interrupt/Event software trigger on line 6"] - #[inline] - pub fn swiev6(&self) -> SWIEV6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV6R { bits } + #[inline(always)] + pub fn swiev6(&self) -> SWIEV6_R { + SWIEV6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Interrupt/Event software trigger on line 7"] - #[inline] - pub fn swiev7(&self) -> SWIEV7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV7R { bits } + #[inline(always)] + pub fn swiev7(&self) -> SWIEV7_R { + SWIEV7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Interrupt/Event software trigger on line 8"] - #[inline] - pub fn swiev8(&self) -> SWIEV8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV8R { bits } + #[inline(always)] + pub fn swiev8(&self) -> SWIEV8_R { + SWIEV8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Interrupt/Event software trigger on line 9"] - #[inline] - pub fn swiev9(&self) -> SWIEV9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV9R { bits } + #[inline(always)] + pub fn swiev9(&self) -> SWIEV9_R { + SWIEV9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Interrupt/Event software trigger on line 10"] - #[inline] - pub fn swiev10(&self) -> SWIEV10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV10R { bits } + #[inline(always)] + pub fn swiev10(&self) -> SWIEV10_R { + SWIEV10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Interrupt/Event software trigger on line 11"] - #[inline] - pub fn swiev11(&self) -> SWIEV11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV11R { bits } + #[inline(always)] + pub fn swiev11(&self) -> SWIEV11_R { + SWIEV11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - Interrupt/Event software trigger on line 12"] - #[inline] - pub fn swiev12(&self) -> SWIEV12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV12R { bits } + #[inline(always)] + pub fn swiev12(&self) -> SWIEV12_R { + SWIEV12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Interrupt/Event software trigger on line 13"] - #[inline] - pub fn swiev13(&self) -> SWIEV13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV13R { bits } + #[inline(always)] + pub fn swiev13(&self) -> SWIEV13_R { + SWIEV13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Interrupt/Event software trigger on line 14"] - #[inline] - pub fn swiev14(&self) -> SWIEV14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV14R { bits } + #[inline(always)] + pub fn swiev14(&self) -> SWIEV14_R { + SWIEV14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - Interrupt/Event software trigger on line 15"] - #[inline] - pub fn swiev15(&self) -> SWIEV15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV15R { bits } + #[inline(always)] + pub fn swiev15(&self) -> SWIEV15_R { + SWIEV15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Interrupt/Event software trigger on line 16"] - #[inline] - pub fn swiev16(&self) -> SWIEV16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV16R { bits } + #[inline(always)] + pub fn swiev16(&self) -> SWIEV16_R { + SWIEV16_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Interrupt/Event software trigger on line 17"] - #[inline] - pub fn swiev17(&self) -> SWIEV17R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV17R { bits } + #[inline(always)] + pub fn swiev17(&self) -> SWIEV17_R { + SWIEV17_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - Interrupt/Event software trigger on line 18"] - #[inline] - pub fn swiev18(&self) -> SWIEV18R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWIEV18R { bits } + #[inline(always)] + pub fn swiev18(&self) -> SWIEV18_R { + SWIEV18_R::new(((self.bits >> 18) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Interrupt/Event software trigger on line 0"] - #[inline] - pub fn swiev0(&mut self) -> _SWIEV0W { - _SWIEV0W { w: self } + #[inline(always)] + pub fn swiev0(&mut self) -> SWIEV0_W { + SWIEV0_W { w: self } } #[doc = "Bit 1 - Interrupt/Event software trigger on line 1"] - #[inline] - pub fn swiev1(&mut self) -> _SWIEV1W { - _SWIEV1W { w: self } + #[inline(always)] + pub fn swiev1(&mut self) -> SWIEV1_W { + SWIEV1_W { w: self } } #[doc = "Bit 2 - Interrupt/Event software trigger on line 2"] - #[inline] - pub fn swiev2(&mut self) -> _SWIEV2W { - _SWIEV2W { w: self } + #[inline(always)] + pub fn swiev2(&mut self) -> SWIEV2_W { + SWIEV2_W { w: self } } #[doc = "Bit 3 - Interrupt/Event software trigger on line 3"] - #[inline] - pub fn swiev3(&mut self) -> _SWIEV3W { - _SWIEV3W { w: self } + #[inline(always)] + pub fn swiev3(&mut self) -> SWIEV3_W { + SWIEV3_W { w: self } } #[doc = "Bit 4 - Interrupt/Event software trigger on line 4"] - #[inline] - pub fn swiev4(&mut self) -> _SWIEV4W { - _SWIEV4W { w: self } + #[inline(always)] + pub fn swiev4(&mut self) -> SWIEV4_W { + SWIEV4_W { w: self } } #[doc = "Bit 5 - Interrupt/Event software trigger on line 5"] - #[inline] - pub fn swiev5(&mut self) -> _SWIEV5W { - _SWIEV5W { w: self } + #[inline(always)] + pub fn swiev5(&mut self) -> SWIEV5_W { + SWIEV5_W { w: self } } #[doc = "Bit 6 - Interrupt/Event software trigger on line 6"] - #[inline] - pub fn swiev6(&mut self) -> _SWIEV6W { - _SWIEV6W { w: self } + #[inline(always)] + pub fn swiev6(&mut self) -> SWIEV6_W { + SWIEV6_W { w: self } } #[doc = "Bit 7 - Interrupt/Event software trigger on line 7"] - #[inline] - pub fn swiev7(&mut self) -> _SWIEV7W { - _SWIEV7W { w: self } + #[inline(always)] + pub fn swiev7(&mut self) -> SWIEV7_W { + SWIEV7_W { w: self } } #[doc = "Bit 8 - Interrupt/Event software trigger on line 8"] - #[inline] - pub fn swiev8(&mut self) -> _SWIEV8W { - _SWIEV8W { w: self } + #[inline(always)] + pub fn swiev8(&mut self) -> SWIEV8_W { + SWIEV8_W { w: self } } #[doc = "Bit 9 - Interrupt/Event software trigger on line 9"] - #[inline] - pub fn swiev9(&mut self) -> _SWIEV9W { - _SWIEV9W { w: self } + #[inline(always)] + pub fn swiev9(&mut self) -> SWIEV9_W { + SWIEV9_W { w: self } } #[doc = "Bit 10 - Interrupt/Event software trigger on line 10"] - #[inline] - pub fn swiev10(&mut self) -> _SWIEV10W { - _SWIEV10W { w: self } + #[inline(always)] + pub fn swiev10(&mut self) -> SWIEV10_W { + SWIEV10_W { w: self } } #[doc = "Bit 11 - Interrupt/Event software trigger on line 11"] - #[inline] - pub fn swiev11(&mut self) -> _SWIEV11W { - _SWIEV11W { w: self } + #[inline(always)] + pub fn swiev11(&mut self) -> SWIEV11_W { + SWIEV11_W { w: self } } #[doc = "Bit 12 - Interrupt/Event software trigger on line 12"] - #[inline] - pub fn swiev12(&mut self) -> _SWIEV12W { - _SWIEV12W { w: self } + #[inline(always)] + pub fn swiev12(&mut self) -> SWIEV12_W { + SWIEV12_W { w: self } } #[doc = "Bit 13 - Interrupt/Event software trigger on line 13"] - #[inline] - pub fn swiev13(&mut self) -> _SWIEV13W { - _SWIEV13W { w: self } + #[inline(always)] + pub fn swiev13(&mut self) -> SWIEV13_W { + SWIEV13_W { w: self } } #[doc = "Bit 14 - Interrupt/Event software trigger on line 14"] - #[inline] - pub fn swiev14(&mut self) -> _SWIEV14W { - _SWIEV14W { w: self } + #[inline(always)] + pub fn swiev14(&mut self) -> SWIEV14_W { + SWIEV14_W { w: self } } #[doc = "Bit 15 - Interrupt/Event software trigger on line 15"] - #[inline] - pub fn swiev15(&mut self) -> _SWIEV15W { - _SWIEV15W { w: self } + #[inline(always)] + pub fn swiev15(&mut self) -> SWIEV15_W { + SWIEV15_W { w: self } } #[doc = "Bit 16 - Interrupt/Event software trigger on line 16"] - #[inline] - pub fn swiev16(&mut self) -> _SWIEV16W { - _SWIEV16W { w: self } + #[inline(always)] + pub fn swiev16(&mut self) -> SWIEV16_W { + SWIEV16_W { w: self } } #[doc = "Bit 17 - Interrupt/Event software trigger on line 17"] - #[inline] - pub fn swiev17(&mut self) -> _SWIEV17W { - _SWIEV17W { w: self } + #[inline(always)] + pub fn swiev17(&mut self) -> SWIEV17_W { + SWIEV17_W { w: self } } #[doc = "Bit 18 - Interrupt/Event software trigger on line 18"] - #[inline] - pub fn swiev18(&mut self) -> _SWIEV18W { - _SWIEV18W { w: self } + #[inline(always)] + pub fn swiev18(&mut self) -> SWIEV18_W { + SWIEV18_W { w: self } } } diff --git a/src/fmc.rs b/src/fmc.rs index 39a89143a1f8e1dc7ae10eb399818362a9e657ed..d11a03acfc865cbf968a5dd545197d788dd39ddf 100644 --- a/src/fmc.rs +++ b/src/fmc.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - wait state counter register"] @@ -13,66 +13,99 @@ pub struct RegisterBlock { pub ctl0: CTL0, #[doc = "0x14 - Address register 0"] pub addr0: ADDR0, - _reserved0: [u8; 4usize], + _reserved6: [u8; 4usize], #[doc = "0x1c - Option byte status register"] pub obstat: OBSTAT, #[doc = "0x20 - Erase/Program Protection register"] pub wp: WP, - _reserved1: [u8; 220usize], + _reserved8: [u8; 220usize], #[doc = "0x100 - Product ID register"] pub pid: PID, } -#[doc = "wait state counter register"] -pub struct WS { - register: ::vcell::VolatileCell, -} +#[doc = "wait state counter register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ws](ws) module"] +pub type WS = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _WS; +#[doc = "`read()` method returns [ws::R](ws::R) reader structure"] +impl crate::Readable for WS {} +#[doc = "`write(|w| ..)` method takes [ws::W](ws::W) writer structure"] +impl crate::Writable for WS {} #[doc = "wait state counter register"] pub mod ws; -#[doc = "Unlock key register 0"] -pub struct KEY0 { - register: ::vcell::VolatileCell, -} +#[doc = "Unlock key register 0\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [key0](key0) module"] +pub type KEY0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _KEY0; +#[doc = "`write(|w| ..)` method takes [key0::W](key0::W) writer structure"] +impl crate::Writable for KEY0 {} #[doc = "Unlock key register 0"] pub mod key0; -#[doc = "Option byte unlock key register"] -pub struct OBKEY { - register: ::vcell::VolatileCell, -} +#[doc = "Option byte unlock key register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [obkey](obkey) module"] +pub type OBKEY = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _OBKEY; +#[doc = "`write(|w| ..)` method takes [obkey::W](obkey::W) writer structure"] +impl crate::Writable for OBKEY {} #[doc = "Option byte unlock key register"] pub mod obkey; -#[doc = "Status register 0"] -pub struct STAT0 { - register: ::vcell::VolatileCell, -} +#[doc = "Status register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [stat0](stat0) module"] +pub type STAT0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _STAT0; +#[doc = "`read()` method returns [stat0::R](stat0::R) reader structure"] +impl crate::Readable for STAT0 {} +#[doc = "`write(|w| ..)` method takes [stat0::W](stat0::W) writer structure"] +impl crate::Writable for STAT0 {} #[doc = "Status register 0"] pub mod stat0; -#[doc = "Control register 0"] -pub struct CTL0 { - register: ::vcell::VolatileCell, -} +#[doc = "Control register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl0](ctl0) module"] +pub type CTL0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL0; +#[doc = "`read()` method returns [ctl0::R](ctl0::R) reader structure"] +impl crate::Readable for CTL0 {} +#[doc = "`write(|w| ..)` method takes [ctl0::W](ctl0::W) writer structure"] +impl crate::Writable for CTL0 {} #[doc = "Control register 0"] pub mod ctl0; -#[doc = "Address register 0"] -pub struct ADDR0 { - register: ::vcell::VolatileCell, -} +#[doc = "Address register 0\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [addr0](addr0) module"] +pub type ADDR0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _ADDR0; +#[doc = "`write(|w| ..)` method takes [addr0::W](addr0::W) writer structure"] +impl crate::Writable for ADDR0 {} #[doc = "Address register 0"] pub mod addr0; -#[doc = "Option byte status register"] -pub struct OBSTAT { - register: ::vcell::VolatileCell, -} +#[doc = "Option byte status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [obstat](obstat) module"] +pub type OBSTAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _OBSTAT; +#[doc = "`read()` method returns [obstat::R](obstat::R) reader structure"] +impl crate::Readable for OBSTAT {} #[doc = "Option byte status register"] pub mod obstat; -#[doc = "Erase/Program Protection register"] -pub struct WP { - register: ::vcell::VolatileCell, -} +#[doc = "Erase/Program Protection register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [wp](wp) module"] +pub type WP = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _WP; +#[doc = "`read()` method returns [wp::R](wp::R) reader structure"] +impl crate::Readable for WP {} #[doc = "Erase/Program Protection register"] pub mod wp; -#[doc = "Product ID register"] -pub struct PID { - register: ::vcell::VolatileCell, -} +#[doc = "Product ID register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pid](pid) module"] +pub type PID = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _PID; +#[doc = "`read()` method returns [pid::R](pid::R) reader structure"] +impl crate::Readable for PID {} #[doc = "Product ID register"] pub mod pid; diff --git a/src/fmc/addr0.rs b/src/fmc/addr0.rs index 70428eeabfb8c9095d69178da231a27ffb3b2e1e..63cb92ec2fe92041fa3e88ead4ce877f29d7a7c4 100644 --- a/src/fmc/addr0.rs +++ b/src/fmc/addr0.rs @@ -1,49 +1,29 @@ -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::ADDR0 { - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); +#[doc = "Writer for register ADDR0"] +pub type W = crate::W; +#[doc = "Register ADDR0 `reset()`'s with value 0"] +impl crate::ResetValue for super::ADDR0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _ADDRW<'a> { +#[doc = "Write proxy for field `ADDR`"] +pub struct ADDR_W<'a> { w: &'a mut W, } -impl<'a> _ADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Flash erase/program command address bits"] - #[inline] - pub fn addr(&mut self) -> _ADDRW { - _ADDRW { w: self } + #[inline(always)] + pub fn addr(&mut self) -> ADDR_W { + ADDR_W { w: self } } } diff --git a/src/fmc/ctl0.rs b/src/fmc/ctl0.rs index 1704c3a699029fa8811c7417efdbd5214b71899b..c4678f059b26080725fabc02a5badf9e2bdd1dfe 100644 --- a/src/fmc/ctl0.rs +++ b/src/fmc/ctl0.rs @@ -1,654 +1,356 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct ENDIER { - bits: bool, -} -impl ENDIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OBWENR { - bits: bool, -} -impl OBWENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LKR { - bits: bool, -} -impl LKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STARTR { - bits: bool, -} -impl STARTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OBERR { - bits: bool, -} -impl OBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OBPGR { - bits: bool, -} -impl OBPGR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MERR { - bits: bool, -} -impl MERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PERR { - bits: bool, -} -impl PERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PGR { - bits: bool, -} -impl PGR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _ENDIEW<'a> { +#[doc = "Reader of register CTL0"] +pub type R = crate::R; +#[doc = "Writer for register CTL0"] +pub type W = crate::W; +#[doc = "Register CTL0 `reset()`'s with value 0x80"] +impl crate::ResetValue for super::CTL0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x80 + } +} +#[doc = "Reader of field `ENDIE`"] +pub type ENDIE_R = crate::R; +#[doc = "Write proxy for field `ENDIE`"] +pub struct ENDIE_W<'a> { w: &'a mut W, } -impl<'a> _ENDIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ENDIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _OBWENW<'a> { +#[doc = "Reader of field `OBWEN`"] +pub type OBWEN_R = crate::R; +#[doc = "Write proxy for field `OBWEN`"] +pub struct OBWEN_W<'a> { w: &'a mut W, } -impl<'a> _OBWENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OBWEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _LKW<'a> { +#[doc = "Reader of field `LK`"] +pub type LK_R = crate::R; +#[doc = "Write proxy for field `LK`"] +pub struct LK_W<'a> { w: &'a mut W, } -impl<'a> _LKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _STARTW<'a> { +#[doc = "Reader of field `START`"] +pub type START_R = crate::R; +#[doc = "Write proxy for field `START`"] +pub struct START_W<'a> { w: &'a mut W, } -impl<'a> _STARTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> START_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _OBERW<'a> { +#[doc = "Reader of field `OBER`"] +pub type OBER_R = crate::R; +#[doc = "Write proxy for field `OBER`"] +pub struct OBER_W<'a> { w: &'a mut W, } -impl<'a> _OBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _OBPGW<'a> { +#[doc = "Reader of field `OBPG`"] +pub type OBPG_R = crate::R; +#[doc = "Write proxy for field `OBPG`"] +pub struct OBPG_W<'a> { w: &'a mut W, } -impl<'a> _OBPGW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OBPG_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _MERW<'a> { +#[doc = "Reader of field `MER`"] +pub type MER_R = crate::R; +#[doc = "Write proxy for field `MER`"] +pub struct MER_W<'a> { w: &'a mut W, } -impl<'a> _MERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _PERW<'a> { +#[doc = "Reader of field `PER`"] +pub type PER_R = crate::R; +#[doc = "Write proxy for field `PER`"] +pub struct PER_W<'a> { w: &'a mut W, } -impl<'a> _PERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _PGW<'a> { +#[doc = "Reader of field `PG`"] +pub type PG_R = crate::R; +#[doc = "Write proxy for field `PG`"] +pub struct PG_W<'a> { w: &'a mut W, } -impl<'a> _PGW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PG_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 12 - End of operation interrupt enable bit"] - #[inline] - pub fn endie(&self) -> ENDIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ENDIER { bits } + #[inline(always)] + pub fn endie(&self) -> ENDIE_R { + ENDIE_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 10 - Error interrupt enable bit"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Option byte erase/program enable bit"] - #[inline] - pub fn obwen(&self) -> OBWENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OBWENR { bits } + #[inline(always)] + pub fn obwen(&self) -> OBWEN_R { + OBWEN_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 7 - FMC_CTL0 lock bit"] - #[inline] - pub fn lk(&self) -> LKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LKR { bits } + #[inline(always)] + pub fn lk(&self) -> LK_R { + LK_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Send erase command to FMC bit"] - #[inline] - pub fn start(&self) -> STARTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STARTR { bits } + #[inline(always)] + pub fn start(&self) -> START_R { + START_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Option bytes erase command bit"] - #[inline] - pub fn ober(&self) -> OBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OBERR { bits } + #[inline(always)] + pub fn ober(&self) -> OBER_R { + OBER_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Option bytes program command bit"] - #[inline] - pub fn obpg(&self) -> OBPGR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OBPGR { bits } + #[inline(always)] + pub fn obpg(&self) -> OBPG_R { + OBPG_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 2 - Main flash mass erase for bank0 command bit"] - #[inline] - pub fn mer(&self) -> MERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MERR { bits } + #[inline(always)] + pub fn mer(&self) -> MER_R { + MER_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Main flash page erase for bank0 command bit"] - #[inline] - pub fn per(&self) -> PERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PERR { bits } + #[inline(always)] + pub fn per(&self) -> PER_R { + PER_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Main flash program for bank0 command bit"] - #[inline] - pub fn pg(&self) -> PGR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PGR { bits } + #[inline(always)] + pub fn pg(&self) -> PG_R { + PG_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x80 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 12 - End of operation interrupt enable bit"] - #[inline] - pub fn endie(&mut self) -> _ENDIEW { - _ENDIEW { w: self } + #[inline(always)] + pub fn endie(&mut self) -> ENDIE_W { + ENDIE_W { w: self } } #[doc = "Bit 10 - Error interrupt enable bit"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } #[doc = "Bit 9 - Option byte erase/program enable bit"] - #[inline] - pub fn obwen(&mut self) -> _OBWENW { - _OBWENW { w: self } + #[inline(always)] + pub fn obwen(&mut self) -> OBWEN_W { + OBWEN_W { w: self } } #[doc = "Bit 7 - FMC_CTL0 lock bit"] - #[inline] - pub fn lk(&mut self) -> _LKW { - _LKW { w: self } + #[inline(always)] + pub fn lk(&mut self) -> LK_W { + LK_W { w: self } } #[doc = "Bit 6 - Send erase command to FMC bit"] - #[inline] - pub fn start(&mut self) -> _STARTW { - _STARTW { w: self } + #[inline(always)] + pub fn start(&mut self) -> START_W { + START_W { w: self } } #[doc = "Bit 5 - Option bytes erase command bit"] - #[inline] - pub fn ober(&mut self) -> _OBERW { - _OBERW { w: self } + #[inline(always)] + pub fn ober(&mut self) -> OBER_W { + OBER_W { w: self } } #[doc = "Bit 4 - Option bytes program command bit"] - #[inline] - pub fn obpg(&mut self) -> _OBPGW { - _OBPGW { w: self } + #[inline(always)] + pub fn obpg(&mut self) -> OBPG_W { + OBPG_W { w: self } } #[doc = "Bit 2 - Main flash mass erase for bank0 command bit"] - #[inline] - pub fn mer(&mut self) -> _MERW { - _MERW { w: self } + #[inline(always)] + pub fn mer(&mut self) -> MER_W { + MER_W { w: self } } #[doc = "Bit 1 - Main flash page erase for bank0 command bit"] - #[inline] - pub fn per(&mut self) -> _PERW { - _PERW { w: self } + #[inline(always)] + pub fn per(&mut self) -> PER_W { + PER_W { w: self } } #[doc = "Bit 0 - Main flash program for bank0 command bit"] - #[inline] - pub fn pg(&mut self) -> _PGW { - _PGW { w: self } + #[inline(always)] + pub fn pg(&mut self) -> PG_W { + PG_W { w: self } } } diff --git a/src/fmc/key0.rs b/src/fmc/key0.rs index 493ab09c83b6d2aff937580bd50571129e65f897..c8113bf6850189064b4b077ae3096a693b782f3e 100644 --- a/src/fmc/key0.rs +++ b/src/fmc/key0.rs @@ -1,49 +1,29 @@ -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::KEY0 { - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); +#[doc = "Writer for register KEY0"] +pub type W = crate::W; +#[doc = "Register KEY0 `reset()`'s with value 0"] +impl crate::ResetValue for super::KEY0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _KEYW<'a> { +#[doc = "Write proxy for field `KEY`"] +pub struct KEY_W<'a> { w: &'a mut W, } -impl<'a> _KEYW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> KEY_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - FMC_CTL0 unlock key"] - #[inline] - pub fn key(&mut self) -> _KEYW { - _KEYW { w: self } + #[inline(always)] + pub fn key(&mut self) -> KEY_W { + KEY_W { w: self } } } diff --git a/src/fmc/obkey.rs b/src/fmc/obkey.rs index 652176d93293547ae37e3b25bef70bf3dddf7821..ce797a0218408769f40520dec75355fcca2a7eff 100644 --- a/src/fmc/obkey.rs +++ b/src/fmc/obkey.rs @@ -1,49 +1,29 @@ -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::OBKEY { - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); +#[doc = "Writer for register OBKEY"] +pub type W = crate::W; +#[doc = "Register OBKEY `reset()`'s with value 0"] +impl crate::ResetValue for super::OBKEY { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _OBKEYW<'a> { +#[doc = "Write proxy for field `OBKEY`"] +pub struct OBKEY_W<'a> { w: &'a mut W, } -impl<'a> _OBKEYW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> OBKEY_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - FMC_ CTL0 option byte operation unlock register"] - #[inline] - pub fn obkey(&mut self) -> _OBKEYW { - _OBKEYW { w: self } + #[inline(always)] + pub fn obkey(&mut self) -> OBKEY_W { + OBKEY_W { w: self } } } diff --git a/src/fmc/obstat.rs b/src/fmc/obstat.rs index 9221c73359413e6d3129c8ba235943544a0a084a..161cf89564d0a44d3ffc66af55b3cfbfffc8f9bf 100644 --- a/src/fmc/obstat.rs +++ b/src/fmc/obstat.rs @@ -1,124 +1,32 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::OBSTAT { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct OBERRR { - bits: bool, -} -impl OBERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SPCR { - bits: bool, -} -impl SPCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USERR { - bits: u8, -} -impl USERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register OBSTAT"] +pub type R = crate::R; +#[doc = "Reader of field `OBERR`"] +pub type OBERR_R = crate::R; +#[doc = "Reader of field `SPC`"] +pub type SPC_R = crate::R; +#[doc = "Reader of field `USER`"] +pub type USER_R = crate::R; +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Option bytes read error bit"] - #[inline] - pub fn oberr(&self) -> OBERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OBERRR { bits } + #[inline(always)] + pub fn oberr(&self) -> OBERR_R { + OBERR_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Option bytes security protection code"] - #[inline] - pub fn spc(&self) -> SPCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SPCR { bits } + #[inline(always)] + pub fn spc(&self) -> SPC_R { + SPC_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bits 2:9 - Store USER of option bytes block after system reset"] - #[inline] - pub fn user(&self) -> USERR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - USERR { bits } + #[inline(always)] + pub fn user(&self) -> USER_R { + USER_R::new(((self.bits >> 2) & 0xff) as u8) } #[doc = "Bits 10:25 - Store DATA\\[15:0\\] of option bytes block after system reset"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new(((self.bits >> 10) & 0xffff) as u16) } } diff --git a/src/fmc/pid.rs b/src/fmc/pid.rs index 71cf32fa3febca4c507b2bf278bdc98f99940cba..ad170cfdba9bb4457f1941cca67cbf530919c583 100644 --- a/src/fmc/pid.rs +++ b/src/fmc/pid.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::PID { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct PIDR { - bits: u32, -} -impl PIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} +#[doc = "Reader of register PID"] +pub type R = crate::R; +#[doc = "Reader of field `PID`"] +pub type PID_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Product reserved ID code register"] - #[inline] - pub fn pid(&self) -> PIDR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - PIDR { bits } + #[inline(always)] + pub fn pid(&self) -> PID_R { + PID_R::new((self.bits & 0xffff_ffff) as u32) } } diff --git a/src/fmc/stat0.rs b/src/fmc/stat0.rs index d396fc6a41b23b527f170ddcfebd12d2014a24cb..92ee4f5f277d5e85b31a13a306cfc91a081825d1 100644 --- a/src/fmc/stat0.rs +++ b/src/fmc/stat0.rs @@ -1,272 +1,125 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::STAT0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct ENDFR { - bits: bool, -} -impl ENDFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WPERRR { - bits: bool, -} -impl WPERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PGERRR { - bits: bool, -} -impl PGERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BUSYR { - bits: bool, -} -impl BUSYR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _ENDFW<'a> { +#[doc = "Reader of register STAT0"] +pub type R = crate::R; +#[doc = "Writer for register STAT0"] +pub type W = crate::W; +#[doc = "Register STAT0 `reset()`'s with value 0"] +impl crate::ResetValue for super::STAT0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `ENDF`"] +pub type ENDF_R = crate::R; +#[doc = "Write proxy for field `ENDF`"] +pub struct ENDF_W<'a> { w: &'a mut W, } -impl<'a> _ENDFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ENDF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _WPERRW<'a> { +#[doc = "Reader of field `WPERR`"] +pub type WPERR_R = crate::R; +#[doc = "Write proxy for field `WPERR`"] +pub struct WPERR_W<'a> { w: &'a mut W, } -impl<'a> _WPERRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WPERR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _PGERRW<'a> { +#[doc = "Reader of field `PGERR`"] +pub type PGERR_R = crate::R; +#[doc = "Write proxy for field `PGERR`"] +pub struct PGERR_W<'a> { w: &'a mut W, } -impl<'a> _PGERRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PGERR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } +#[doc = "Reader of field `BUSY`"] +pub type BUSY_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 5 - End of operation flag bit"] - #[inline] - pub fn endf(&self) -> ENDFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ENDFR { bits } + #[inline(always)] + pub fn endf(&self) -> ENDF_R { + ENDF_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Erase/Program protection error flag bit"] - #[inline] - pub fn wperr(&self) -> WPERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WPERRR { bits } + #[inline(always)] + pub fn wperr(&self) -> WPERR_R { + WPERR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 2 - Program error flag bit"] - #[inline] - pub fn pgerr(&self) -> PGERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PGERRR { bits } + #[inline(always)] + pub fn pgerr(&self) -> PGERR_R { + PGERR_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 0 - The flash is busy bit"] - #[inline] - pub fn busy(&self) -> BUSYR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BUSYR { bits } + #[inline(always)] + pub fn busy(&self) -> BUSY_R { + BUSY_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 5 - End of operation flag bit"] - #[inline] - pub fn endf(&mut self) -> _ENDFW { - _ENDFW { w: self } + #[inline(always)] + pub fn endf(&mut self) -> ENDF_W { + ENDF_W { w: self } } #[doc = "Bit 4 - Erase/Program protection error flag bit"] - #[inline] - pub fn wperr(&mut self) -> _WPERRW { - _WPERRW { w: self } + #[inline(always)] + pub fn wperr(&mut self) -> WPERR_W { + WPERR_W { w: self } } #[doc = "Bit 2 - Program error flag bit"] - #[inline] - pub fn pgerr(&mut self) -> _PGERRW { - _PGERRW { w: self } + #[inline(always)] + pub fn pgerr(&mut self) -> PGERR_W { + PGERR_W { w: self } } } diff --git a/src/fmc/wp.rs b/src/fmc/wp.rs index d1697dfdf83c7132ba95c464d51d0f25381f3386..25c39be5116d32e72a655cf01799ecac04399504 100644 --- a/src/fmc/wp.rs +++ b/src/fmc/wp.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::WP { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct WPR { - bits: u32, -} -impl WPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} +#[doc = "Reader of register WP"] +pub type R = crate::R; +#[doc = "Reader of field `WP`"] +pub type WP_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Store WP\\[31:0\\] of option bytes block after system reset"] - #[inline] - pub fn wp(&self) -> WPR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - WPR { bits } + #[inline(always)] + pub fn wp(&self) -> WP_R { + WP_R::new((self.bits & 0xffff_ffff) as u32) } } diff --git a/src/fmc/ws.rs b/src/fmc/ws.rs index d858891bee2f5507dcc457a66451c9450bb647c1..02b159a68af97ce619721a57cb33538cc032ac57 100644 --- a/src/fmc/ws.rs +++ b/src/fmc/ws.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::WS { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct WSCNTR { - bits: u8, -} -impl WSCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _WSCNTW<'a> { +#[doc = "Reader of register WS"] +pub type R = crate::R; +#[doc = "Writer for register WS"] +pub type W = crate::W; +#[doc = "Register WS `reset()`'s with value 0"] +impl crate::ResetValue for super::WS { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `WSCNT`"] +pub type WSCNT_R = crate::R; +#[doc = "Write proxy for field `WSCNT`"] +pub struct WSCNT_W<'a> { w: &'a mut W, } -impl<'a> _WSCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> WSCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07) | ((value as u32) & 0x07); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:2 - wait state counter register"] - #[inline] - pub fn wscnt(&self) -> WSCNTR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - WSCNTR { bits } + #[inline(always)] + pub fn wscnt(&self) -> WSCNT_R { + WSCNT_R::new((self.bits & 0x07) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:2 - wait state counter register"] - #[inline] - pub fn wscnt(&mut self) -> _WSCNTW { - _WSCNTW { w: self } + #[inline(always)] + pub fn wscnt(&mut self) -> WSCNT_W { + WSCNT_W { w: self } } } diff --git a/src/fwdgt.rs b/src/fwdgt.rs index 710647b84269ba0f4b8ce964d7a364c7052b945c..265c5ca816a78237fd602472b2ca69763c566d1f 100644 --- a/src/fwdgt.rs +++ b/src/fwdgt.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Control register"] @@ -10,27 +10,43 @@ pub struct RegisterBlock { #[doc = "0x0c - Status register"] pub stat: STAT, } -#[doc = "Control register"] -pub struct CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Control register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl](ctl) module"] +pub type CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL; +#[doc = "`write(|w| ..)` method takes [ctl::W](ctl::W) writer structure"] +impl crate::Writable for CTL {} #[doc = "Control register"] pub mod ctl; -#[doc = "Prescaler register"] -pub struct PSC { - register: ::vcell::VolatileCell, -} +#[doc = "Prescaler register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [psc](psc) module"] +pub type PSC = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _PSC; +#[doc = "`read()` method returns [psc::R](psc::R) reader structure"] +impl crate::Readable for PSC {} +#[doc = "`write(|w| ..)` method takes [psc::W](psc::W) writer structure"] +impl crate::Writable for PSC {} #[doc = "Prescaler register"] pub mod psc; -#[doc = "Reload register"] -pub struct RLD { - register: ::vcell::VolatileCell, -} +#[doc = "Reload register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rld](rld) module"] +pub type RLD = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RLD; +#[doc = "`read()` method returns [rld::R](rld::R) reader structure"] +impl crate::Readable for RLD {} +#[doc = "`write(|w| ..)` method takes [rld::W](rld::W) writer structure"] +impl crate::Writable for RLD {} #[doc = "Reload register"] pub mod rld; -#[doc = "Status register"] -pub struct STAT { - register: ::vcell::VolatileCell, -} +#[doc = "Status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [stat](stat) module"] +pub type STAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _STAT; +#[doc = "`read()` method returns [stat::R](stat::R) reader structure"] +impl crate::Readable for STAT {} #[doc = "Status register"] pub mod stat; diff --git a/src/fwdgt/ctl.rs b/src/fwdgt/ctl.rs index 8692e19dcad5671437b7cdd484b523e39e529602..ace75556d695e46e3bf4007aa592832803e5848a 100644 --- a/src/fwdgt/ctl.rs +++ b/src/fwdgt/ctl.rs @@ -1,49 +1,29 @@ -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL { - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); +#[doc = "Writer for register CTL"] +pub type W = crate::W; +#[doc = "Register CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _CMDW<'a> { +#[doc = "Write proxy for field `CMD`"] +pub struct CMD_W<'a> { w: &'a mut W, } -impl<'a> _CMDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CMD_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Key value"] - #[inline] - pub fn cmd(&mut self) -> _CMDW { - _CMDW { w: self } + #[inline(always)] + pub fn cmd(&mut self) -> CMD_W { + CMD_W { w: self } } } diff --git a/src/fwdgt/psc.rs b/src/fwdgt/psc.rs index 47ffac1d042458c534ff71f24e5d0bf6fd0fc5d0..5765f045fa15f29da8e0aa2765c22cf291956ea4 100644 --- a/src/fwdgt/psc.rs +++ b/src/fwdgt/psc.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::PSC { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PSCR { - bits: u8, -} -impl PSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PSCW<'a> { +#[doc = "Reader of register PSC"] +pub type R = crate::R; +#[doc = "Writer for register PSC"] +pub type W = crate::W; +#[doc = "Register PSC `reset()`'s with value 0"] +impl crate::ResetValue for super::PSC { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PSC`"] +pub type PSC_R = crate::R; +#[doc = "Write proxy for field `PSC`"] +pub struct PSC_W<'a> { w: &'a mut W, } -impl<'a> _PSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07) | ((value as u32) & 0x07); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:2 - Free watchdog timer prescaler selection"] - #[inline] - pub fn psc(&self) -> PSCR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PSCR { bits } + #[inline(always)] + pub fn psc(&self) -> PSC_R { + PSC_R::new((self.bits & 0x07) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:2 - Free watchdog timer prescaler selection"] - #[inline] - pub fn psc(&mut self) -> _PSCW { - _PSCW { w: self } + #[inline(always)] + pub fn psc(&mut self) -> PSC_W { + PSC_W { w: self } } } diff --git a/src/fwdgt/rld.rs b/src/fwdgt/rld.rs index af56711078e1f8431e39f52bcfad4fbc00154e68..cf5811cb98fc467e627c3dfb031e688a07a8640e 100644 --- a/src/fwdgt/rld.rs +++ b/src/fwdgt/rld.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::RLD { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RLDR { - bits: u16, -} -impl RLDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _RLDW<'a> { +#[doc = "Reader of register RLD"] +pub type R = crate::R; +#[doc = "Writer for register RLD"] +pub type W = crate::W; +#[doc = "Register RLD `reset()`'s with value 0x0fff"] +impl crate::ResetValue for super::RLD { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0fff + } +} +#[doc = "Reader of field `RLD`"] +pub type RLD_R = crate::R; +#[doc = "Write proxy for field `RLD`"] +pub struct RLD_W<'a> { w: &'a mut W, } -impl<'a> _RLDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RLD_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - Free watchdog timer counter reload value"] - #[inline] - pub fn rld(&self) -> RLDR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - RLDR { bits } + #[inline(always)] + pub fn rld(&self) -> RLD_R { + RLD_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0fff } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - Free watchdog timer counter reload value"] - #[inline] - pub fn rld(&mut self) -> _RLDW { - _RLDW { w: self } + #[inline(always)] + pub fn rld(&mut self) -> RLD_W { + RLD_W { w: self } } } diff --git a/src/fwdgt/stat.rs b/src/fwdgt/stat.rs index 14b44b6a792b0d8de615339c5e86c9e71b3f4189..5e621cabddc2c3086f9a75a7e096736be6aa000d 100644 --- a/src/fwdgt/stat.rs +++ b/src/fwdgt/stat.rs @@ -1,82 +1,18 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::STAT { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct PUDR { - bits: bool, -} -impl PUDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RUDR { - bits: bool, -} -impl RUDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} +#[doc = "Reader of register STAT"] +pub type R = crate::R; +#[doc = "Reader of field `PUD`"] +pub type PUD_R = crate::R; +#[doc = "Reader of field `RUD`"] +pub type RUD_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Free watchdog timer prescaler value update"] - #[inline] - pub fn pud(&self) -> PUDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PUDR { bits } + #[inline(always)] + pub fn pud(&self) -> PUD_R { + PUD_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Free watchdog timer counter reload value update"] - #[inline] - pub fn rud(&self) -> RUDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RUDR { bits } + #[inline(always)] + pub fn rud(&self) -> RUD_R { + RUD_R::new(((self.bits >> 1) & 0x01) != 0) } } diff --git a/src/generic.rs b/src/generic.rs new file mode 100644 index 0000000000000000000000000000000000000000..dd756f598621ae0c5eacc24b8d272f0dbf610a4b --- /dev/null +++ b/src/generic.rs @@ -0,0 +1,239 @@ +use core::marker; +#[doc = "This trait shows that register has `read` method"] +#[doc = ""] +#[doc = "Registers marked with `Writable` can be also `modify`'ed"] +pub trait Readable {} +#[doc = "This trait shows that register has `write`, `write_with_zero` and `reset` method"] +#[doc = ""] +#[doc = "Registers marked with `Readable` can be also `modify`'ed"] +pub trait Writable {} +#[doc = "Reset value of the register"] +#[doc = ""] +#[doc = "This value is initial value for `write` method."] +#[doc = "It can be also directly writed to register by `reset` method."] +pub trait ResetValue { + #[doc = "Register size"] + type Type; + #[doc = "Reset value of the register"] + fn reset_value() -> Self::Type; +} +#[doc = "This structure provides volatile access to register"] +pub struct Reg { + register: vcell::VolatileCell, + _marker: marker::PhantomData, +} +unsafe impl Send for Reg {} +impl Reg +where + Self: Readable, + U: Copy, +{ + #[doc = "Reads the contents of `Readable` register"] + #[doc = ""] + #[doc = "You can read the contents of a register in such way:"] + #[doc = "```ignore"] + #[doc = "let bits = periph.reg.read().bits();"] + #[doc = "```"] + #[doc = "or get the content of a particular field of a register."] + #[doc = "```ignore"] + #[doc = "let reader = periph.reg.read();"] + #[doc = "let bits = reader.field1().bits();"] + #[doc = "let flag = reader.field2().bit_is_set();"] + #[doc = "```"] + #[inline(always)] + pub fn read(&self) -> R { + R { + bits: self.register.get(), + _reg: marker::PhantomData, + } + } +} +impl Reg +where + Self: ResetValue + Writable, + U: Copy, +{ + #[doc = "Writes the reset value to `Writable` register"] + #[doc = ""] + #[doc = "Resets the register to its initial state"] + #[inline(always)] + pub fn reset(&self) { + self.register.set(Self::reset_value()) + } +} +impl Reg +where + Self: ResetValue + Writable, + U: Copy, +{ + #[doc = "Writes bits to `Writable` register"] + #[doc = ""] + #[doc = "You can write raw bits into a register:"] + #[doc = "```ignore"] + #[doc = "periph.reg.write(|w| unsafe { w.bits(rawbits) });"] + #[doc = "```"] + #[doc = "or write only the fields you need:"] + #[doc = "```ignore"] + #[doc = "periph.reg.write(|w| w"] + #[doc = " .field1().bits(newfield1bits)"] + #[doc = " .field2().set_bit()"] + #[doc = " .field3().variant(VARIANT)"] + #[doc = ");"] + #[doc = "```"] + #[doc = "Other fields will have reset value."] + #[inline(always)] + pub fn write(&self, f: F) + where + F: FnOnce(&mut W) -> &mut W, + { + self.register.set( + f(&mut W { + bits: Self::reset_value(), + _reg: marker::PhantomData, + }) + .bits, + ); + } +} +impl Reg +where + Self: Writable, + U: Copy + Default, +{ + #[doc = "Writes Zero to `Writable` register"] + #[doc = ""] + #[doc = "Similar to `write`, but unused bits will contain 0."] + #[inline(always)] + pub fn write_with_zero(&self, f: F) + where + F: FnOnce(&mut W) -> &mut W, + { + self.register.set( + f(&mut W { + bits: U::default(), + _reg: marker::PhantomData, + }) + .bits, + ); + } +} +impl Reg +where + Self: Readable + Writable, + U: Copy, +{ + #[doc = "Modifies the contents of the register"] + #[doc = ""] + #[doc = "E.g. to do a read-modify-write sequence to change parts of a register:"] + #[doc = "```ignore"] + #[doc = "periph.reg.modify(|r, w| unsafe { w.bits("] + #[doc = " r.bits() | 3"] + #[doc = ") });"] + #[doc = "```"] + #[doc = "or"] + #[doc = "```ignore"] + #[doc = "periph.reg.modify(|_, w| w"] + #[doc = " .field1().bits(newfield1bits)"] + #[doc = " .field2().set_bit()"] + #[doc = " .field3().variant(VARIANT)"] + #[doc = ");"] + #[doc = "```"] + #[doc = "Other fields will have value they had before call `modify`."] + #[inline(always)] + pub fn modify(&self, f: F) + where + for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, + { + let bits = self.register.get(); + self.register.set( + f( + &R { + bits, + _reg: marker::PhantomData, + }, + &mut W { + bits, + _reg: marker::PhantomData, + }, + ) + .bits, + ); + } +} +#[doc = "Register/field reader"] +#[doc = ""] +#[doc = "Result of the [`read`](Reg::read) method of a register."] +#[doc = "Also it can be used in the [`modify`](Reg::read) method"] +pub struct R { + pub(crate) bits: U, + _reg: marker::PhantomData, +} +impl R +where + U: Copy, +{ + #[doc = "Create new instance of reader"] + #[inline(always)] + pub(crate) fn new(bits: U) -> Self { + Self { + bits, + _reg: marker::PhantomData, + } + } + #[doc = "Read raw bits from register/field"] + #[inline(always)] + pub fn bits(&self) -> U { + self.bits + } +} +impl PartialEq for R +where + U: PartialEq, + FI: Copy + Into, +{ + #[inline(always)] + fn eq(&self, other: &FI) -> bool { + self.bits.eq(&(*other).into()) + } +} +impl R { + #[doc = "Value of the field as raw bits"] + #[inline(always)] + pub fn bit(&self) -> bool { + self.bits + } + #[doc = "Returns `true` if the bit is clear (0)"] + #[inline(always)] + pub fn bit_is_clear(&self) -> bool { + !self.bit() + } + #[doc = "Returns `true` if the bit is set (1)"] + #[inline(always)] + pub fn bit_is_set(&self) -> bool { + self.bit() + } +} +#[doc = "Register writer"] +#[doc = ""] +#[doc = "Used as an argument to the closures in the [`write`](Reg::write) and [`modify`](Reg::modify) methods of the register"] +pub struct W { + #[doc = "Writable bits"] + pub(crate) bits: U, + _reg: marker::PhantomData, +} +impl W { + #[doc = "Writes raw bits to the register"] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: U) -> &mut Self { + self.bits = bits; + self + } +} +#[doc = "Used if enumerated values cover not the whole range"] +#[derive(Clone, Copy, PartialEq)] +pub enum Variant { + #[doc = "Expected variant"] + Val(T), + #[doc = "Raw bits"] + Res(U), +} diff --git a/src/gpioa.rs b/src/gpioa.rs index b34c5641a4217388371eebfafd5a9fb96c18b62d..5627dcad8c037f1c51a2219d4cbba09faec6c851 100644 --- a/src/gpioa.rs +++ b/src/gpioa.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - port control register 0"] @@ -16,45 +16,74 @@ pub struct RegisterBlock { #[doc = "0x18 - GPIO port configuration lock register"] pub lock: LOCK, } -#[doc = "port control register 0"] -pub struct CTL0 { - register: ::vcell::VolatileCell, -} +#[doc = "port control register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl0](ctl0) module"] +pub type CTL0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL0; +#[doc = "`read()` method returns [ctl0::R](ctl0::R) reader structure"] +impl crate::Readable for CTL0 {} +#[doc = "`write(|w| ..)` method takes [ctl0::W](ctl0::W) writer structure"] +impl crate::Writable for CTL0 {} #[doc = "port control register 0"] pub mod ctl0; -#[doc = "port control register 1"] -pub struct CTL1 { - register: ::vcell::VolatileCell, -} +#[doc = "port control register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl1](ctl1) module"] +pub type CTL1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL1; +#[doc = "`read()` method returns [ctl1::R](ctl1::R) reader structure"] +impl crate::Readable for CTL1 {} +#[doc = "`write(|w| ..)` method takes [ctl1::W](ctl1::W) writer structure"] +impl crate::Writable for CTL1 {} #[doc = "port control register 1"] pub mod ctl1; -#[doc = "Port input status register"] -pub struct ISTAT { - register: ::vcell::VolatileCell, -} +#[doc = "Port input status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [istat](istat) module"] +pub type ISTAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _ISTAT; +#[doc = "`read()` method returns [istat::R](istat::R) reader structure"] +impl crate::Readable for ISTAT {} #[doc = "Port input status register"] pub mod istat; -#[doc = "Port output control register"] -pub struct OCTL { - register: ::vcell::VolatileCell, -} +#[doc = "Port output control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [octl](octl) module"] +pub type OCTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _OCTL; +#[doc = "`read()` method returns [octl::R](octl::R) reader structure"] +impl crate::Readable for OCTL {} +#[doc = "`write(|w| ..)` method takes [octl::W](octl::W) writer structure"] +impl crate::Writable for OCTL {} #[doc = "Port output control register"] pub mod octl; -#[doc = "Port bit operate register"] -pub struct BOP { - register: ::vcell::VolatileCell, -} +#[doc = "Port bit operate register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bop](bop) module"] +pub type BOP = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _BOP; +#[doc = "`write(|w| ..)` method takes [bop::W](bop::W) writer structure"] +impl crate::Writable for BOP {} #[doc = "Port bit operate register"] pub mod bop; -#[doc = "Port bit clear register"] -pub struct BC { - register: ::vcell::VolatileCell, -} +#[doc = "Port bit clear register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bc](bc) module"] +pub type BC = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _BC; +#[doc = "`write(|w| ..)` method takes [bc::W](bc::W) writer structure"] +impl crate::Writable for BC {} #[doc = "Port bit clear register"] pub mod bc; -#[doc = "GPIO port configuration lock register"] -pub struct LOCK { - register: ::vcell::VolatileCell, -} +#[doc = "GPIO port configuration lock register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [lock](lock) module"] +pub type LOCK = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _LOCK; +#[doc = "`read()` method returns [lock::R](lock::R) reader structure"] +impl crate::Readable for LOCK {} +#[doc = "`write(|w| ..)` method takes [lock::W](lock::W) writer structure"] +impl crate::Writable for LOCK {} #[doc = "GPIO port configuration lock register"] pub mod lock; diff --git a/src/gpioa/bc.rs b/src/gpioa/bc.rs index 3f3bc69e58fdc55aa0ff742566bec74eb03facb7..86b6c98f12cd7653d7269915b5c9473467636cdc 100644 --- a/src/gpioa/bc.rs +++ b/src/gpioa/bc.rs @@ -1,477 +1,444 @@ -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::BC { - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } -} -#[doc = r" Proxy"] -pub struct _CR15W<'a> { +#[doc = "Writer for register BC"] +pub type W = crate::W; +#[doc = "Register BC `reset()`'s with value 0"] +impl crate::ResetValue for super::BC { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Write proxy for field `CR15`"] +pub struct CR15_W<'a> { w: &'a mut W, } -impl<'a> _CR15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _CR14W<'a> { +#[doc = "Write proxy for field `CR14`"] +pub struct CR14_W<'a> { w: &'a mut W, } -impl<'a> _CR14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _CR13W<'a> { +#[doc = "Write proxy for field `CR13`"] +pub struct CR13_W<'a> { w: &'a mut W, } -impl<'a> _CR13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _CR12W<'a> { +#[doc = "Write proxy for field `CR12`"] +pub struct CR12_W<'a> { w: &'a mut W, } -impl<'a> _CR12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CR11W<'a> { +#[doc = "Write proxy for field `CR11`"] +pub struct CR11_W<'a> { w: &'a mut W, } -impl<'a> _CR11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _CR10W<'a> { +#[doc = "Write proxy for field `CR10`"] +pub struct CR10_W<'a> { w: &'a mut W, } -impl<'a> _CR10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _CR9W<'a> { +#[doc = "Write proxy for field `CR9`"] +pub struct CR9_W<'a> { w: &'a mut W, } -impl<'a> _CR9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _CR8W<'a> { +#[doc = "Write proxy for field `CR8`"] +pub struct CR8_W<'a> { w: &'a mut W, } -impl<'a> _CR8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _CR7W<'a> { +#[doc = "Write proxy for field `CR7`"] +pub struct CR7_W<'a> { w: &'a mut W, } -impl<'a> _CR7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _CR6W<'a> { +#[doc = "Write proxy for field `CR6`"] +pub struct CR6_W<'a> { w: &'a mut W, } -impl<'a> _CR6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _CR5W<'a> { +#[doc = "Write proxy for field `CR5`"] +pub struct CR5_W<'a> { w: &'a mut W, } -impl<'a> _CR5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _CR4W<'a> { +#[doc = "Write proxy for field `CR4`"] +pub struct CR4_W<'a> { w: &'a mut W, } -impl<'a> _CR4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CR3W<'a> { +#[doc = "Write proxy for field `CR3`"] +pub struct CR3_W<'a> { w: &'a mut W, } -impl<'a> _CR3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _CR2W<'a> { +#[doc = "Write proxy for field `CR2`"] +pub struct CR2_W<'a> { w: &'a mut W, } -impl<'a> _CR2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CR1W<'a> { +#[doc = "Write proxy for field `CR1`"] +pub struct CR1_W<'a> { w: &'a mut W, } -impl<'a> _CR1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _CR0W<'a> { +#[doc = "Write proxy for field `CR0`"] +pub struct CR0_W<'a> { w: &'a mut W, } -impl<'a> _CR0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 15 - Port 15 Clear bit"] - #[inline] - pub fn cr15(&mut self) -> _CR15W { - _CR15W { w: self } + #[inline(always)] + pub fn cr15(&mut self) -> CR15_W { + CR15_W { w: self } } #[doc = "Bit 14 - Port 14 Clear bit"] - #[inline] - pub fn cr14(&mut self) -> _CR14W { - _CR14W { w: self } + #[inline(always)] + pub fn cr14(&mut self) -> CR14_W { + CR14_W { w: self } } #[doc = "Bit 13 - Port 13 Clear bit"] - #[inline] - pub fn cr13(&mut self) -> _CR13W { - _CR13W { w: self } + #[inline(always)] + pub fn cr13(&mut self) -> CR13_W { + CR13_W { w: self } } #[doc = "Bit 12 - Port 12 Clear bit"] - #[inline] - pub fn cr12(&mut self) -> _CR12W { - _CR12W { w: self } + #[inline(always)] + pub fn cr12(&mut self) -> CR12_W { + CR12_W { w: self } } #[doc = "Bit 11 - Port 11 Clear bit"] - #[inline] - pub fn cr11(&mut self) -> _CR11W { - _CR11W { w: self } + #[inline(always)] + pub fn cr11(&mut self) -> CR11_W { + CR11_W { w: self } } #[doc = "Bit 10 - Port 10 Clear bit"] - #[inline] - pub fn cr10(&mut self) -> _CR10W { - _CR10W { w: self } + #[inline(always)] + pub fn cr10(&mut self) -> CR10_W { + CR10_W { w: self } } #[doc = "Bit 9 - Port 9 Clear bit"] - #[inline] - pub fn cr9(&mut self) -> _CR9W { - _CR9W { w: self } + #[inline(always)] + pub fn cr9(&mut self) -> CR9_W { + CR9_W { w: self } } #[doc = "Bit 8 - Port 8 Clear bit"] - #[inline] - pub fn cr8(&mut self) -> _CR8W { - _CR8W { w: self } + #[inline(always)] + pub fn cr8(&mut self) -> CR8_W { + CR8_W { w: self } } #[doc = "Bit 7 - Port 7 Clear bit"] - #[inline] - pub fn cr7(&mut self) -> _CR7W { - _CR7W { w: self } + #[inline(always)] + pub fn cr7(&mut self) -> CR7_W { + CR7_W { w: self } } #[doc = "Bit 6 - Port 6 Clear bit"] - #[inline] - pub fn cr6(&mut self) -> _CR6W { - _CR6W { w: self } + #[inline(always)] + pub fn cr6(&mut self) -> CR6_W { + CR6_W { w: self } } #[doc = "Bit 5 - Port 5 Clear bit"] - #[inline] - pub fn cr5(&mut self) -> _CR5W { - _CR5W { w: self } + #[inline(always)] + pub fn cr5(&mut self) -> CR5_W { + CR5_W { w: self } } #[doc = "Bit 4 - Port 4 Clear bit"] - #[inline] - pub fn cr4(&mut self) -> _CR4W { - _CR4W { w: self } + #[inline(always)] + pub fn cr4(&mut self) -> CR4_W { + CR4_W { w: self } } #[doc = "Bit 3 - Port 3 Clear bit"] - #[inline] - pub fn cr3(&mut self) -> _CR3W { - _CR3W { w: self } + #[inline(always)] + pub fn cr3(&mut self) -> CR3_W { + CR3_W { w: self } } #[doc = "Bit 2 - Port 2 Clear bit"] - #[inline] - pub fn cr2(&mut self) -> _CR2W { - _CR2W { w: self } + #[inline(always)] + pub fn cr2(&mut self) -> CR2_W { + CR2_W { w: self } } #[doc = "Bit 1 - Port 1 Clear bit"] - #[inline] - pub fn cr1(&mut self) -> _CR1W { - _CR1W { w: self } + #[inline(always)] + pub fn cr1(&mut self) -> CR1_W { + CR1_W { w: self } } #[doc = "Bit 0 - Port 0 Clear bit"] - #[inline] - pub fn cr0(&mut self) -> _CR0W { - _CR0W { w: self } + #[inline(always)] + pub fn cr0(&mut self) -> CR0_W { + CR0_W { w: self } } } diff --git a/src/gpioa/bop.rs b/src/gpioa/bop.rs index 2cd3373db56f9b3722e759c0ff26ddf36a855ca8..84cf198631dd810dc90a9f4329bcf8f0667adc45 100644 --- a/src/gpioa/bop.rs +++ b/src/gpioa/bop.rs @@ -1,925 +1,876 @@ -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::BOP { - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); +#[doc = "Writer for register BOP"] +pub type W = crate::W; +#[doc = "Register BOP `reset()`'s with value 0"] +impl crate::ResetValue for super::BOP { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _CR15W<'a> { +#[doc = "Write proxy for field `CR15`"] +pub struct CR15_W<'a> { w: &'a mut W, } -impl<'a> _CR15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } -#[doc = r" Proxy"] -pub struct _CR14W<'a> { +#[doc = "Write proxy for field `CR14`"] +pub struct CR14_W<'a> { w: &'a mut W, } -impl<'a> _CR14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _CR13W<'a> { +#[doc = "Write proxy for field `CR13`"] +pub struct CR13_W<'a> { w: &'a mut W, } -impl<'a> _CR13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _CR12W<'a> { +#[doc = "Write proxy for field `CR12`"] +pub struct CR12_W<'a> { w: &'a mut W, } -impl<'a> _CR12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _CR11W<'a> { +#[doc = "Write proxy for field `CR11`"] +pub struct CR11_W<'a> { w: &'a mut W, } -impl<'a> _CR11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _CR10W<'a> { +#[doc = "Write proxy for field `CR10`"] +pub struct CR10_W<'a> { w: &'a mut W, } -impl<'a> _CR10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _CR9W<'a> { +#[doc = "Write proxy for field `CR9`"] +pub struct CR9_W<'a> { w: &'a mut W, } -impl<'a> _CR9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _CR8W<'a> { +#[doc = "Write proxy for field `CR8`"] +pub struct CR8_W<'a> { w: &'a mut W, } -impl<'a> _CR8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _CR7W<'a> { +#[doc = "Write proxy for field `CR7`"] +pub struct CR7_W<'a> { w: &'a mut W, } -impl<'a> _CR7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } -#[doc = r" Proxy"] -pub struct _CR6W<'a> { +#[doc = "Write proxy for field `CR6`"] +pub struct CR6_W<'a> { w: &'a mut W, } -impl<'a> _CR6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _CR5W<'a> { +#[doc = "Write proxy for field `CR5`"] +pub struct CR5_W<'a> { w: &'a mut W, } -impl<'a> _CR5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _CR4W<'a> { +#[doc = "Write proxy for field `CR4`"] +pub struct CR4_W<'a> { w: &'a mut W, } -impl<'a> _CR4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _CR3W<'a> { +#[doc = "Write proxy for field `CR3`"] +pub struct CR3_W<'a> { w: &'a mut W, } -impl<'a> _CR3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _CR2W<'a> { +#[doc = "Write proxy for field `CR2`"] +pub struct CR2_W<'a> { w: &'a mut W, } -impl<'a> _CR2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _CR1W<'a> { +#[doc = "Write proxy for field `CR1`"] +pub struct CR1_W<'a> { w: &'a mut W, } -impl<'a> _CR1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _CR0W<'a> { +#[doc = "Write proxy for field `CR0`"] +pub struct CR0_W<'a> { w: &'a mut W, } -impl<'a> _CR0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CR0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _BOP15W<'a> { +#[doc = "Write proxy for field `BOP15`"] +pub struct BOP15_W<'a> { w: &'a mut W, } -impl<'a> _BOP15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOP15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _BOP14W<'a> { +#[doc = "Write proxy for field `BOP14`"] +pub struct BOP14_W<'a> { w: &'a mut W, } -impl<'a> _BOP14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOP14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _BOP13W<'a> { +#[doc = "Write proxy for field `BOP13`"] +pub struct BOP13_W<'a> { w: &'a mut W, } -impl<'a> _BOP13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOP13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _BOP12W<'a> { +#[doc = "Write proxy for field `BOP12`"] +pub struct BOP12_W<'a> { w: &'a mut W, } -impl<'a> _BOP12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOP12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _BOP11W<'a> { +#[doc = "Write proxy for field `BOP11`"] +pub struct BOP11_W<'a> { w: &'a mut W, } -impl<'a> _BOP11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOP11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _BOP10W<'a> { +#[doc = "Write proxy for field `BOP10`"] +pub struct BOP10_W<'a> { w: &'a mut W, } -impl<'a> _BOP10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOP10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _BOP9W<'a> { +#[doc = "Write proxy for field `BOP9`"] +pub struct BOP9_W<'a> { w: &'a mut W, } -impl<'a> _BOP9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOP9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _BOP8W<'a> { +#[doc = "Write proxy for field `BOP8`"] +pub struct BOP8_W<'a> { w: &'a mut W, } -impl<'a> _BOP8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOP8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _BOP7W<'a> { +#[doc = "Write proxy for field `BOP7`"] +pub struct BOP7_W<'a> { w: &'a mut W, } -impl<'a> _BOP7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOP7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BOP6W<'a> { +#[doc = "Write proxy for field `BOP6`"] +pub struct BOP6_W<'a> { w: &'a mut W, } -impl<'a> _BOP6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOP6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _BOP5W<'a> { +#[doc = "Write proxy for field `BOP5`"] +pub struct BOP5_W<'a> { w: &'a mut W, } -impl<'a> _BOP5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOP5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _BOP4W<'a> { +#[doc = "Write proxy for field `BOP4`"] +pub struct BOP4_W<'a> { w: &'a mut W, } -impl<'a> _BOP4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOP4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _BOP3W<'a> { +#[doc = "Write proxy for field `BOP3`"] +pub struct BOP3_W<'a> { w: &'a mut W, } -impl<'a> _BOP3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOP3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _BOP2W<'a> { +#[doc = "Write proxy for field `BOP2`"] +pub struct BOP2_W<'a> { w: &'a mut W, } -impl<'a> _BOP2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOP2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _BOP1W<'a> { +#[doc = "Write proxy for field `BOP1`"] +pub struct BOP1_W<'a> { w: &'a mut W, } -impl<'a> _BOP1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOP1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _BOP0W<'a> { +#[doc = "Write proxy for field `BOP0`"] +pub struct BOP0_W<'a> { w: &'a mut W, } -impl<'a> _BOP0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BOP0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 31 - Port 15 Clear bit"] - #[inline] - pub fn cr15(&mut self) -> _CR15W { - _CR15W { w: self } + #[inline(always)] + pub fn cr15(&mut self) -> CR15_W { + CR15_W { w: self } } #[doc = "Bit 30 - Port 14 Clear bit"] - #[inline] - pub fn cr14(&mut self) -> _CR14W { - _CR14W { w: self } + #[inline(always)] + pub fn cr14(&mut self) -> CR14_W { + CR14_W { w: self } } #[doc = "Bit 29 - Port 13 Clear bit"] - #[inline] - pub fn cr13(&mut self) -> _CR13W { - _CR13W { w: self } + #[inline(always)] + pub fn cr13(&mut self) -> CR13_W { + CR13_W { w: self } } #[doc = "Bit 28 - Port 12 Clear bit"] - #[inline] - pub fn cr12(&mut self) -> _CR12W { - _CR12W { w: self } + #[inline(always)] + pub fn cr12(&mut self) -> CR12_W { + CR12_W { w: self } } #[doc = "Bit 27 - Port 11 Clear bit"] - #[inline] - pub fn cr11(&mut self) -> _CR11W { - _CR11W { w: self } + #[inline(always)] + pub fn cr11(&mut self) -> CR11_W { + CR11_W { w: self } } #[doc = "Bit 26 - Port 10 Clear bit"] - #[inline] - pub fn cr10(&mut self) -> _CR10W { - _CR10W { w: self } + #[inline(always)] + pub fn cr10(&mut self) -> CR10_W { + CR10_W { w: self } } #[doc = "Bit 25 - Port 9 Clear bit"] - #[inline] - pub fn cr9(&mut self) -> _CR9W { - _CR9W { w: self } + #[inline(always)] + pub fn cr9(&mut self) -> CR9_W { + CR9_W { w: self } } #[doc = "Bit 24 - Port 8 Clear bit"] - #[inline] - pub fn cr8(&mut self) -> _CR8W { - _CR8W { w: self } + #[inline(always)] + pub fn cr8(&mut self) -> CR8_W { + CR8_W { w: self } } #[doc = "Bit 23 - Port 7 Clear bit"] - #[inline] - pub fn cr7(&mut self) -> _CR7W { - _CR7W { w: self } + #[inline(always)] + pub fn cr7(&mut self) -> CR7_W { + CR7_W { w: self } } #[doc = "Bit 22 - Port 6 Clear bit"] - #[inline] - pub fn cr6(&mut self) -> _CR6W { - _CR6W { w: self } + #[inline(always)] + pub fn cr6(&mut self) -> CR6_W { + CR6_W { w: self } } #[doc = "Bit 21 - Port 5 Clear bit"] - #[inline] - pub fn cr5(&mut self) -> _CR5W { - _CR5W { w: self } + #[inline(always)] + pub fn cr5(&mut self) -> CR5_W { + CR5_W { w: self } } #[doc = "Bit 20 - Port 4 Clear bit"] - #[inline] - pub fn cr4(&mut self) -> _CR4W { - _CR4W { w: self } + #[inline(always)] + pub fn cr4(&mut self) -> CR4_W { + CR4_W { w: self } } #[doc = "Bit 19 - Port 3 Clear bit"] - #[inline] - pub fn cr3(&mut self) -> _CR3W { - _CR3W { w: self } + #[inline(always)] + pub fn cr3(&mut self) -> CR3_W { + CR3_W { w: self } } #[doc = "Bit 18 - Port 2 Clear bit"] - #[inline] - pub fn cr2(&mut self) -> _CR2W { - _CR2W { w: self } + #[inline(always)] + pub fn cr2(&mut self) -> CR2_W { + CR2_W { w: self } } #[doc = "Bit 17 - Port 1 Clear bit"] - #[inline] - pub fn cr1(&mut self) -> _CR1W { - _CR1W { w: self } + #[inline(always)] + pub fn cr1(&mut self) -> CR1_W { + CR1_W { w: self } } #[doc = "Bit 16 - Port 0 Clear bit"] - #[inline] - pub fn cr0(&mut self) -> _CR0W { - _CR0W { w: self } + #[inline(always)] + pub fn cr0(&mut self) -> CR0_W { + CR0_W { w: self } } #[doc = "Bit 15 - Port 15 Set bit"] - #[inline] - pub fn bop15(&mut self) -> _BOP15W { - _BOP15W { w: self } + #[inline(always)] + pub fn bop15(&mut self) -> BOP15_W { + BOP15_W { w: self } } #[doc = "Bit 14 - Port 14 Set bit"] - #[inline] - pub fn bop14(&mut self) -> _BOP14W { - _BOP14W { w: self } + #[inline(always)] + pub fn bop14(&mut self) -> BOP14_W { + BOP14_W { w: self } } #[doc = "Bit 13 - Port 13 Set bit"] - #[inline] - pub fn bop13(&mut self) -> _BOP13W { - _BOP13W { w: self } + #[inline(always)] + pub fn bop13(&mut self) -> BOP13_W { + BOP13_W { w: self } } #[doc = "Bit 12 - Port 12 Set bit"] - #[inline] - pub fn bop12(&mut self) -> _BOP12W { - _BOP12W { w: self } + #[inline(always)] + pub fn bop12(&mut self) -> BOP12_W { + BOP12_W { w: self } } #[doc = "Bit 11 - Port 11 Set bit"] - #[inline] - pub fn bop11(&mut self) -> _BOP11W { - _BOP11W { w: self } + #[inline(always)] + pub fn bop11(&mut self) -> BOP11_W { + BOP11_W { w: self } } #[doc = "Bit 10 - Port 10 Set bit"] - #[inline] - pub fn bop10(&mut self) -> _BOP10W { - _BOP10W { w: self } + #[inline(always)] + pub fn bop10(&mut self) -> BOP10_W { + BOP10_W { w: self } } #[doc = "Bit 9 - Port 9 Set bit"] - #[inline] - pub fn bop9(&mut self) -> _BOP9W { - _BOP9W { w: self } + #[inline(always)] + pub fn bop9(&mut self) -> BOP9_W { + BOP9_W { w: self } } #[doc = "Bit 8 - Port 8 Set bit"] - #[inline] - pub fn bop8(&mut self) -> _BOP8W { - _BOP8W { w: self } + #[inline(always)] + pub fn bop8(&mut self) -> BOP8_W { + BOP8_W { w: self } } #[doc = "Bit 7 - Port 7 Set bit"] - #[inline] - pub fn bop7(&mut self) -> _BOP7W { - _BOP7W { w: self } + #[inline(always)] + pub fn bop7(&mut self) -> BOP7_W { + BOP7_W { w: self } } #[doc = "Bit 6 - Port 6 Set bit"] - #[inline] - pub fn bop6(&mut self) -> _BOP6W { - _BOP6W { w: self } + #[inline(always)] + pub fn bop6(&mut self) -> BOP6_W { + BOP6_W { w: self } } #[doc = "Bit 5 - Port 5 Set bit"] - #[inline] - pub fn bop5(&mut self) -> _BOP5W { - _BOP5W { w: self } + #[inline(always)] + pub fn bop5(&mut self) -> BOP5_W { + BOP5_W { w: self } } #[doc = "Bit 4 - Port 4 Set bit"] - #[inline] - pub fn bop4(&mut self) -> _BOP4W { - _BOP4W { w: self } + #[inline(always)] + pub fn bop4(&mut self) -> BOP4_W { + BOP4_W { w: self } } #[doc = "Bit 3 - Port 3 Set bit"] - #[inline] - pub fn bop3(&mut self) -> _BOP3W { - _BOP3W { w: self } + #[inline(always)] + pub fn bop3(&mut self) -> BOP3_W { + BOP3_W { w: self } } #[doc = "Bit 2 - Port 2 Set bit"] - #[inline] - pub fn bop2(&mut self) -> _BOP2W { - _BOP2W { w: self } + #[inline(always)] + pub fn bop2(&mut self) -> BOP2_W { + BOP2_W { w: self } } #[doc = "Bit 1 - Port 1 Set bit"] - #[inline] - pub fn bop1(&mut self) -> _BOP1W { - _BOP1W { w: self } + #[inline(always)] + pub fn bop1(&mut self) -> BOP1_W { + BOP1_W { w: self } } #[doc = "Bit 0 - Port 0 Set bit"] - #[inline] - pub fn bop0(&mut self) -> _BOP0W { - _BOP0W { w: self } + #[inline(always)] + pub fn bop0(&mut self) -> BOP0_W { + BOP0_W { w: self } } } diff --git a/src/gpioa/ctl0.rs b/src/gpioa/ctl0.rs index 1b88081e3db60408d74c4b94bd625034ef1cc1eb..233c3504db29fec95f347083d99d9a099e25ddc6 100644 --- a/src/gpioa/ctl0.rs +++ b/src/gpioa/ctl0.rs @@ -1,720 +1,400 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CTL7R { - bits: u8, -} -impl CTL7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MD7R { - bits: u8, -} -impl MD7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CTL6R { - bits: u8, -} -impl CTL6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MD6R { - bits: u8, -} -impl MD6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CTL5R { - bits: u8, -} -impl CTL5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MD5R { - bits: u8, -} -impl MD5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CTL4R { - bits: u8, -} -impl CTL4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MD4R { - bits: u8, -} -impl MD4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CTL3R { - bits: u8, -} -impl CTL3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MD3R { - bits: u8, -} -impl MD3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CTL2R { - bits: u8, -} -impl CTL2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MD2R { - bits: u8, -} -impl MD2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CTL1R { - bits: u8, -} -impl CTL1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MD1R { - bits: u8, -} -impl MD1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CTL0R { - bits: u8, -} -impl CTL0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MD0R { - bits: u8, -} -impl MD0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CTL7W<'a> { +#[doc = "Reader of register CTL0"] +pub type R = crate::R; +#[doc = "Writer for register CTL0"] +pub type W = crate::W; +#[doc = "Register CTL0 `reset()`'s with value 0x4444_4444"] +impl crate::ResetValue for super::CTL0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x4444_4444 + } +} +#[doc = "Reader of field `CTL7`"] +pub type CTL7_R = crate::R; +#[doc = "Write proxy for field `CTL7`"] +pub struct CTL7_W<'a> { w: &'a mut W, } -impl<'a> _CTL7W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CTL7_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 30)) | (((value as u32) & 0x03) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _MD7W<'a> { +#[doc = "Reader of field `MD7`"] +pub type MD7_R = crate::R; +#[doc = "Write proxy for field `MD7`"] +pub struct MD7_W<'a> { w: &'a mut W, } -impl<'a> _MD7W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MD7_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 28)) | (((value as u32) & 0x03) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _CTL6W<'a> { +#[doc = "Reader of field `CTL6`"] +pub type CTL6_R = crate::R; +#[doc = "Write proxy for field `CTL6`"] +pub struct CTL6_W<'a> { w: &'a mut W, } -impl<'a> _CTL6W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CTL6_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 26)) | (((value as u32) & 0x03) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _MD6W<'a> { +#[doc = "Reader of field `MD6`"] +pub type MD6_R = crate::R; +#[doc = "Write proxy for field `MD6`"] +pub struct MD6_W<'a> { w: &'a mut W, } -impl<'a> _MD6W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MD6_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 24)) | (((value as u32) & 0x03) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _CTL5W<'a> { +#[doc = "Reader of field `CTL5`"] +pub type CTL5_R = crate::R; +#[doc = "Write proxy for field `CTL5`"] +pub struct CTL5_W<'a> { w: &'a mut W, } -impl<'a> _CTL5W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CTL5_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 22)) | (((value as u32) & 0x03) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _MD5W<'a> { +#[doc = "Reader of field `MD5`"] +pub type MD5_R = crate::R; +#[doc = "Write proxy for field `MD5`"] +pub struct MD5_W<'a> { w: &'a mut W, } -impl<'a> _MD5W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MD5_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 20)) | (((value as u32) & 0x03) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _CTL4W<'a> { +#[doc = "Reader of field `CTL4`"] +pub type CTL4_R = crate::R; +#[doc = "Write proxy for field `CTL4`"] +pub struct CTL4_W<'a> { w: &'a mut W, } -impl<'a> _CTL4W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CTL4_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _MD4W<'a> { +#[doc = "Reader of field `MD4`"] +pub type MD4_R = crate::R; +#[doc = "Write proxy for field `MD4`"] +pub struct MD4_W<'a> { w: &'a mut W, } -impl<'a> _MD4W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MD4_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 16)) | (((value as u32) & 0x03) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _CTL3W<'a> { +#[doc = "Reader of field `CTL3`"] +pub type CTL3_R = crate::R; +#[doc = "Write proxy for field `CTL3`"] +pub struct CTL3_W<'a> { w: &'a mut W, } -impl<'a> _CTL3W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CTL3_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 14)) | (((value as u32) & 0x03) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _MD3W<'a> { +#[doc = "Reader of field `MD3`"] +pub type MD3_R = crate::R; +#[doc = "Write proxy for field `MD3`"] +pub struct MD3_W<'a> { w: &'a mut W, } -impl<'a> _MD3W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MD3_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CTL2W<'a> { +#[doc = "Reader of field `CTL2`"] +pub type CTL2_R = crate::R; +#[doc = "Write proxy for field `CTL2`"] +pub struct CTL2_W<'a> { w: &'a mut W, } -impl<'a> _CTL2W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CTL2_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _MD2W<'a> { +#[doc = "Reader of field `MD2`"] +pub type MD2_R = crate::R; +#[doc = "Write proxy for field `MD2`"] +pub struct MD2_W<'a> { w: &'a mut W, } -impl<'a> _MD2W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MD2_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _CTL1W<'a> { +#[doc = "Reader of field `CTL1`"] +pub type CTL1_R = crate::R; +#[doc = "Write proxy for field `CTL1`"] +pub struct CTL1_W<'a> { w: &'a mut W, } -impl<'a> _CTL1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CTL1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 6)) | (((value as u32) & 0x03) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _MD1W<'a> { +#[doc = "Reader of field `MD1`"] +pub type MD1_R = crate::R; +#[doc = "Write proxy for field `MD1`"] +pub struct MD1_W<'a> { w: &'a mut W, } -impl<'a> _MD1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MD1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 4)) | (((value as u32) & 0x03) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CTL0W<'a> { +#[doc = "Reader of field `CTL0`"] +pub type CTL0_R = crate::R; +#[doc = "Write proxy for field `CTL0`"] +pub struct CTL0_W<'a> { w: &'a mut W, } -impl<'a> _CTL0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CTL0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 2)) | (((value as u32) & 0x03) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _MD0W<'a> { +#[doc = "Reader of field `MD0`"] +pub type MD0_R = crate::R; +#[doc = "Write proxy for field `MD0`"] +pub struct MD0_W<'a> { w: &'a mut W, } -impl<'a> _MD0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MD0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x03) | ((value as u32) & 0x03); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 30:31 - Port x configuration bits (x = 7)"] - #[inline] - pub fn ctl7(&self) -> CTL7R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CTL7R { bits } + #[inline(always)] + pub fn ctl7(&self) -> CTL7_R { + CTL7_R::new(((self.bits >> 30) & 0x03) as u8) } #[doc = "Bits 28:29 - Port x mode bits (x = 7)"] - #[inline] - pub fn md7(&self) -> MD7R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MD7R { bits } + #[inline(always)] + pub fn md7(&self) -> MD7_R { + MD7_R::new(((self.bits >> 28) & 0x03) as u8) } #[doc = "Bits 26:27 - Port x configuration bits (x = 6)"] - #[inline] - pub fn ctl6(&self) -> CTL6R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CTL6R { bits } + #[inline(always)] + pub fn ctl6(&self) -> CTL6_R { + CTL6_R::new(((self.bits >> 26) & 0x03) as u8) } #[doc = "Bits 24:25 - Port x mode bits (x = 6)"] - #[inline] - pub fn md6(&self) -> MD6R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MD6R { bits } + #[inline(always)] + pub fn md6(&self) -> MD6_R { + MD6_R::new(((self.bits >> 24) & 0x03) as u8) } #[doc = "Bits 22:23 - Port x configuration bits (x = 5)"] - #[inline] - pub fn ctl5(&self) -> CTL5R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CTL5R { bits } + #[inline(always)] + pub fn ctl5(&self) -> CTL5_R { + CTL5_R::new(((self.bits >> 22) & 0x03) as u8) } #[doc = "Bits 20:21 - Port x mode bits (x = 5)"] - #[inline] - pub fn md5(&self) -> MD5R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MD5R { bits } + #[inline(always)] + pub fn md5(&self) -> MD5_R { + MD5_R::new(((self.bits >> 20) & 0x03) as u8) } #[doc = "Bits 18:19 - Port x configuration bits (x = 4)"] - #[inline] - pub fn ctl4(&self) -> CTL4R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CTL4R { bits } + #[inline(always)] + pub fn ctl4(&self) -> CTL4_R { + CTL4_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bits 16:17 - Port x mode bits (x = 4)"] - #[inline] - pub fn md4(&self) -> MD4R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MD4R { bits } + #[inline(always)] + pub fn md4(&self) -> MD4_R { + MD4_R::new(((self.bits >> 16) & 0x03) as u8) } #[doc = "Bits 14:15 - Port x configuration bits (x = 3)"] - #[inline] - pub fn ctl3(&self) -> CTL3R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CTL3R { bits } + #[inline(always)] + pub fn ctl3(&self) -> CTL3_R { + CTL3_R::new(((self.bits >> 14) & 0x03) as u8) } #[doc = "Bits 12:13 - Port x mode bits (x = 3 )"] - #[inline] - pub fn md3(&self) -> MD3R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MD3R { bits } + #[inline(always)] + pub fn md3(&self) -> MD3_R { + MD3_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bits 10:11 - Port x configuration bits (x = 2)"] - #[inline] - pub fn ctl2(&self) -> CTL2R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CTL2R { bits } + #[inline(always)] + pub fn ctl2(&self) -> CTL2_R { + CTL2_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 8:9 - Port x mode bits (x = 2 )"] - #[inline] - pub fn md2(&self) -> MD2R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MD2R { bits } + #[inline(always)] + pub fn md2(&self) -> MD2_R { + MD2_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 6:7 - Port x configuration bits (x = 1)"] - #[inline] - pub fn ctl1(&self) -> CTL1R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CTL1R { bits } + #[inline(always)] + pub fn ctl1(&self) -> CTL1_R { + CTL1_R::new(((self.bits >> 6) & 0x03) as u8) } #[doc = "Bits 4:5 - Port x mode bits (x = 1)"] - #[inline] - pub fn md1(&self) -> MD1R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MD1R { bits } + #[inline(always)] + pub fn md1(&self) -> MD1_R { + MD1_R::new(((self.bits >> 4) & 0x03) as u8) } #[doc = "Bits 2:3 - Port x configuration bits (x = 0)"] - #[inline] - pub fn ctl0(&self) -> CTL0R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CTL0R { bits } + #[inline(always)] + pub fn ctl0(&self) -> CTL0_R { + CTL0_R::new(((self.bits >> 2) & 0x03) as u8) } #[doc = "Bits 0:1 - Port x mode bits (x = 0)"] - #[inline] - pub fn md0(&self) -> MD0R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MD0R { bits } + #[inline(always)] + pub fn md0(&self) -> MD0_R { + MD0_R::new((self.bits & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x4444_4444 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 30:31 - Port x configuration bits (x = 7)"] - #[inline] - pub fn ctl7(&mut self) -> _CTL7W { - _CTL7W { w: self } + #[inline(always)] + pub fn ctl7(&mut self) -> CTL7_W { + CTL7_W { w: self } } #[doc = "Bits 28:29 - Port x mode bits (x = 7)"] - #[inline] - pub fn md7(&mut self) -> _MD7W { - _MD7W { w: self } + #[inline(always)] + pub fn md7(&mut self) -> MD7_W { + MD7_W { w: self } } #[doc = "Bits 26:27 - Port x configuration bits (x = 6)"] - #[inline] - pub fn ctl6(&mut self) -> _CTL6W { - _CTL6W { w: self } + #[inline(always)] + pub fn ctl6(&mut self) -> CTL6_W { + CTL6_W { w: self } } #[doc = "Bits 24:25 - Port x mode bits (x = 6)"] - #[inline] - pub fn md6(&mut self) -> _MD6W { - _MD6W { w: self } + #[inline(always)] + pub fn md6(&mut self) -> MD6_W { + MD6_W { w: self } } #[doc = "Bits 22:23 - Port x configuration bits (x = 5)"] - #[inline] - pub fn ctl5(&mut self) -> _CTL5W { - _CTL5W { w: self } + #[inline(always)] + pub fn ctl5(&mut self) -> CTL5_W { + CTL5_W { w: self } } #[doc = "Bits 20:21 - Port x mode bits (x = 5)"] - #[inline] - pub fn md5(&mut self) -> _MD5W { - _MD5W { w: self } + #[inline(always)] + pub fn md5(&mut self) -> MD5_W { + MD5_W { w: self } } #[doc = "Bits 18:19 - Port x configuration bits (x = 4)"] - #[inline] - pub fn ctl4(&mut self) -> _CTL4W { - _CTL4W { w: self } + #[inline(always)] + pub fn ctl4(&mut self) -> CTL4_W { + CTL4_W { w: self } } #[doc = "Bits 16:17 - Port x mode bits (x = 4)"] - #[inline] - pub fn md4(&mut self) -> _MD4W { - _MD4W { w: self } + #[inline(always)] + pub fn md4(&mut self) -> MD4_W { + MD4_W { w: self } } #[doc = "Bits 14:15 - Port x configuration bits (x = 3)"] - #[inline] - pub fn ctl3(&mut self) -> _CTL3W { - _CTL3W { w: self } + #[inline(always)] + pub fn ctl3(&mut self) -> CTL3_W { + CTL3_W { w: self } } #[doc = "Bits 12:13 - Port x mode bits (x = 3 )"] - #[inline] - pub fn md3(&mut self) -> _MD3W { - _MD3W { w: self } + #[inline(always)] + pub fn md3(&mut self) -> MD3_W { + MD3_W { w: self } } #[doc = "Bits 10:11 - Port x configuration bits (x = 2)"] - #[inline] - pub fn ctl2(&mut self) -> _CTL2W { - _CTL2W { w: self } + #[inline(always)] + pub fn ctl2(&mut self) -> CTL2_W { + CTL2_W { w: self } } #[doc = "Bits 8:9 - Port x mode bits (x = 2 )"] - #[inline] - pub fn md2(&mut self) -> _MD2W { - _MD2W { w: self } + #[inline(always)] + pub fn md2(&mut self) -> MD2_W { + MD2_W { w: self } } #[doc = "Bits 6:7 - Port x configuration bits (x = 1)"] - #[inline] - pub fn ctl1(&mut self) -> _CTL1W { - _CTL1W { w: self } + #[inline(always)] + pub fn ctl1(&mut self) -> CTL1_W { + CTL1_W { w: self } } #[doc = "Bits 4:5 - Port x mode bits (x = 1)"] - #[inline] - pub fn md1(&mut self) -> _MD1W { - _MD1W { w: self } + #[inline(always)] + pub fn md1(&mut self) -> MD1_W { + MD1_W { w: self } } #[doc = "Bits 2:3 - Port x configuration bits (x = 0)"] - #[inline] - pub fn ctl0(&mut self) -> _CTL0W { - _CTL0W { w: self } + #[inline(always)] + pub fn ctl0(&mut self) -> CTL0_W { + CTL0_W { w: self } } #[doc = "Bits 0:1 - Port x mode bits (x = 0)"] - #[inline] - pub fn md0(&mut self) -> _MD0W { - _MD0W { w: self } + #[inline(always)] + pub fn md0(&mut self) -> MD0_W { + MD0_W { w: self } } } diff --git a/src/gpioa/ctl1.rs b/src/gpioa/ctl1.rs index 95c2e684ae0cd926c14797d8cff3a1bc54b20747..cba359305696b5e674d18577c54e2f8090e4acbd 100644 --- a/src/gpioa/ctl1.rs +++ b/src/gpioa/ctl1.rs @@ -1,720 +1,400 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CTL15R { - bits: u8, -} -impl CTL15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MD15R { - bits: u8, -} -impl MD15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CTL14R { - bits: u8, -} -impl CTL14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MD14R { - bits: u8, -} -impl MD14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CTL13R { - bits: u8, -} -impl CTL13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MD13R { - bits: u8, -} -impl MD13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CTL12R { - bits: u8, -} -impl CTL12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MD12R { - bits: u8, -} -impl MD12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CTL11R { - bits: u8, -} -impl CTL11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MD11R { - bits: u8, -} -impl MD11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CTL10R { - bits: u8, -} -impl CTL10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MD10R { - bits: u8, -} -impl MD10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CTL9R { - bits: u8, -} -impl CTL9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MD9R { - bits: u8, -} -impl MD9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CTL8R { - bits: u8, -} -impl CTL8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MD8R { - bits: u8, -} -impl MD8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CTL15W<'a> { +#[doc = "Reader of register CTL1"] +pub type R = crate::R; +#[doc = "Writer for register CTL1"] +pub type W = crate::W; +#[doc = "Register CTL1 `reset()`'s with value 0x4444_4444"] +impl crate::ResetValue for super::CTL1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x4444_4444 + } +} +#[doc = "Reader of field `CTL15`"] +pub type CTL15_R = crate::R; +#[doc = "Write proxy for field `CTL15`"] +pub struct CTL15_W<'a> { w: &'a mut W, } -impl<'a> _CTL15W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CTL15_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 30)) | (((value as u32) & 0x03) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _MD15W<'a> { +#[doc = "Reader of field `MD15`"] +pub type MD15_R = crate::R; +#[doc = "Write proxy for field `MD15`"] +pub struct MD15_W<'a> { w: &'a mut W, } -impl<'a> _MD15W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MD15_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 28)) | (((value as u32) & 0x03) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _CTL14W<'a> { +#[doc = "Reader of field `CTL14`"] +pub type CTL14_R = crate::R; +#[doc = "Write proxy for field `CTL14`"] +pub struct CTL14_W<'a> { w: &'a mut W, } -impl<'a> _CTL14W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CTL14_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 26)) | (((value as u32) & 0x03) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _MD14W<'a> { +#[doc = "Reader of field `MD14`"] +pub type MD14_R = crate::R; +#[doc = "Write proxy for field `MD14`"] +pub struct MD14_W<'a> { w: &'a mut W, } -impl<'a> _MD14W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MD14_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 24)) | (((value as u32) & 0x03) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _CTL13W<'a> { +#[doc = "Reader of field `CTL13`"] +pub type CTL13_R = crate::R; +#[doc = "Write proxy for field `CTL13`"] +pub struct CTL13_W<'a> { w: &'a mut W, } -impl<'a> _CTL13W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CTL13_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 22)) | (((value as u32) & 0x03) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _MD13W<'a> { +#[doc = "Reader of field `MD13`"] +pub type MD13_R = crate::R; +#[doc = "Write proxy for field `MD13`"] +pub struct MD13_W<'a> { w: &'a mut W, } -impl<'a> _MD13W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MD13_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 20)) | (((value as u32) & 0x03) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _CTL12W<'a> { +#[doc = "Reader of field `CTL12`"] +pub type CTL12_R = crate::R; +#[doc = "Write proxy for field `CTL12`"] +pub struct CTL12_W<'a> { w: &'a mut W, } -impl<'a> _CTL12W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CTL12_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _MD12W<'a> { +#[doc = "Reader of field `MD12`"] +pub type MD12_R = crate::R; +#[doc = "Write proxy for field `MD12`"] +pub struct MD12_W<'a> { w: &'a mut W, } -impl<'a> _MD12W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MD12_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 16)) | (((value as u32) & 0x03) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _CTL11W<'a> { +#[doc = "Reader of field `CTL11`"] +pub type CTL11_R = crate::R; +#[doc = "Write proxy for field `CTL11`"] +pub struct CTL11_W<'a> { w: &'a mut W, } -impl<'a> _CTL11W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CTL11_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 14)) | (((value as u32) & 0x03) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _MD11W<'a> { +#[doc = "Reader of field `MD11`"] +pub type MD11_R = crate::R; +#[doc = "Write proxy for field `MD11`"] +pub struct MD11_W<'a> { w: &'a mut W, } -impl<'a> _MD11W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MD11_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CTL10W<'a> { +#[doc = "Reader of field `CTL10`"] +pub type CTL10_R = crate::R; +#[doc = "Write proxy for field `CTL10`"] +pub struct CTL10_W<'a> { w: &'a mut W, } -impl<'a> _CTL10W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CTL10_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u32) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _MD10W<'a> { +#[doc = "Reader of field `MD10`"] +pub type MD10_R = crate::R; +#[doc = "Write proxy for field `MD10`"] +pub struct MD10_W<'a> { w: &'a mut W, } -impl<'a> _MD10W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MD10_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _CTL9W<'a> { +#[doc = "Reader of field `CTL9`"] +pub type CTL9_R = crate::R; +#[doc = "Write proxy for field `CTL9`"] +pub struct CTL9_W<'a> { w: &'a mut W, } -impl<'a> _CTL9W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CTL9_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 6)) | (((value as u32) & 0x03) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _MD9W<'a> { +#[doc = "Reader of field `MD9`"] +pub type MD9_R = crate::R; +#[doc = "Write proxy for field `MD9`"] +pub struct MD9_W<'a> { w: &'a mut W, } -impl<'a> _MD9W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MD9_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 4)) | (((value as u32) & 0x03) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CTL8W<'a> { +#[doc = "Reader of field `CTL8`"] +pub type CTL8_R = crate::R; +#[doc = "Write proxy for field `CTL8`"] +pub struct CTL8_W<'a> { w: &'a mut W, } -impl<'a> _CTL8W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CTL8_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 2)) | (((value as u32) & 0x03) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _MD8W<'a> { +#[doc = "Reader of field `MD8`"] +pub type MD8_R = crate::R; +#[doc = "Write proxy for field `MD8`"] +pub struct MD8_W<'a> { w: &'a mut W, } -impl<'a> _MD8W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MD8_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x03) | ((value as u32) & 0x03); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 30:31 - Port x configuration bits (x = 15)"] - #[inline] - pub fn ctl15(&self) -> CTL15R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CTL15R { bits } + #[inline(always)] + pub fn ctl15(&self) -> CTL15_R { + CTL15_R::new(((self.bits >> 30) & 0x03) as u8) } #[doc = "Bits 28:29 - Port x mode bits (x = 15)"] - #[inline] - pub fn md15(&self) -> MD15R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MD15R { bits } + #[inline(always)] + pub fn md15(&self) -> MD15_R { + MD15_R::new(((self.bits >> 28) & 0x03) as u8) } #[doc = "Bits 26:27 - Port x configuration bits (x = 14)"] - #[inline] - pub fn ctl14(&self) -> CTL14R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CTL14R { bits } + #[inline(always)] + pub fn ctl14(&self) -> CTL14_R { + CTL14_R::new(((self.bits >> 26) & 0x03) as u8) } #[doc = "Bits 24:25 - Port x mode bits (x = 14)"] - #[inline] - pub fn md14(&self) -> MD14R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MD14R { bits } + #[inline(always)] + pub fn md14(&self) -> MD14_R { + MD14_R::new(((self.bits >> 24) & 0x03) as u8) } #[doc = "Bits 22:23 - Port x configuration bits (x = 13)"] - #[inline] - pub fn ctl13(&self) -> CTL13R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CTL13R { bits } + #[inline(always)] + pub fn ctl13(&self) -> CTL13_R { + CTL13_R::new(((self.bits >> 22) & 0x03) as u8) } #[doc = "Bits 20:21 - Port x mode bits (x = 13)"] - #[inline] - pub fn md13(&self) -> MD13R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MD13R { bits } + #[inline(always)] + pub fn md13(&self) -> MD13_R { + MD13_R::new(((self.bits >> 20) & 0x03) as u8) } #[doc = "Bits 18:19 - Port x configuration bits (x = 12)"] - #[inline] - pub fn ctl12(&self) -> CTL12R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CTL12R { bits } + #[inline(always)] + pub fn ctl12(&self) -> CTL12_R { + CTL12_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bits 16:17 - Port x mode bits (x = 12)"] - #[inline] - pub fn md12(&self) -> MD12R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MD12R { bits } + #[inline(always)] + pub fn md12(&self) -> MD12_R { + MD12_R::new(((self.bits >> 16) & 0x03) as u8) } #[doc = "Bits 14:15 - Port x configuration bits (x = 11)"] - #[inline] - pub fn ctl11(&self) -> CTL11R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CTL11R { bits } + #[inline(always)] + pub fn ctl11(&self) -> CTL11_R { + CTL11_R::new(((self.bits >> 14) & 0x03) as u8) } #[doc = "Bits 12:13 - Port x mode bits (x = 11 )"] - #[inline] - pub fn md11(&self) -> MD11R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MD11R { bits } + #[inline(always)] + pub fn md11(&self) -> MD11_R { + MD11_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bits 10:11 - Port x configuration bits (x = 10)"] - #[inline] - pub fn ctl10(&self) -> CTL10R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CTL10R { bits } + #[inline(always)] + pub fn ctl10(&self) -> CTL10_R { + CTL10_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 8:9 - Port x mode bits (x = 10 )"] - #[inline] - pub fn md10(&self) -> MD10R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MD10R { bits } + #[inline(always)] + pub fn md10(&self) -> MD10_R { + MD10_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 6:7 - Port x configuration bits (x = 9)"] - #[inline] - pub fn ctl9(&self) -> CTL9R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CTL9R { bits } + #[inline(always)] + pub fn ctl9(&self) -> CTL9_R { + CTL9_R::new(((self.bits >> 6) & 0x03) as u8) } #[doc = "Bits 4:5 - Port x mode bits (x = 9)"] - #[inline] - pub fn md9(&self) -> MD9R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MD9R { bits } + #[inline(always)] + pub fn md9(&self) -> MD9_R { + MD9_R::new(((self.bits >> 4) & 0x03) as u8) } #[doc = "Bits 2:3 - Port x configuration bits (x = 8)"] - #[inline] - pub fn ctl8(&self) -> CTL8R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CTL8R { bits } + #[inline(always)] + pub fn ctl8(&self) -> CTL8_R { + CTL8_R::new(((self.bits >> 2) & 0x03) as u8) } #[doc = "Bits 0:1 - Port x mode bits (x = 8)"] - #[inline] - pub fn md8(&self) -> MD8R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MD8R { bits } + #[inline(always)] + pub fn md8(&self) -> MD8_R { + MD8_R::new((self.bits & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x4444_4444 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 30:31 - Port x configuration bits (x = 15)"] - #[inline] - pub fn ctl15(&mut self) -> _CTL15W { - _CTL15W { w: self } + #[inline(always)] + pub fn ctl15(&mut self) -> CTL15_W { + CTL15_W { w: self } } #[doc = "Bits 28:29 - Port x mode bits (x = 15)"] - #[inline] - pub fn md15(&mut self) -> _MD15W { - _MD15W { w: self } + #[inline(always)] + pub fn md15(&mut self) -> MD15_W { + MD15_W { w: self } } #[doc = "Bits 26:27 - Port x configuration bits (x = 14)"] - #[inline] - pub fn ctl14(&mut self) -> _CTL14W { - _CTL14W { w: self } + #[inline(always)] + pub fn ctl14(&mut self) -> CTL14_W { + CTL14_W { w: self } } #[doc = "Bits 24:25 - Port x mode bits (x = 14)"] - #[inline] - pub fn md14(&mut self) -> _MD14W { - _MD14W { w: self } + #[inline(always)] + pub fn md14(&mut self) -> MD14_W { + MD14_W { w: self } } #[doc = "Bits 22:23 - Port x configuration bits (x = 13)"] - #[inline] - pub fn ctl13(&mut self) -> _CTL13W { - _CTL13W { w: self } + #[inline(always)] + pub fn ctl13(&mut self) -> CTL13_W { + CTL13_W { w: self } } #[doc = "Bits 20:21 - Port x mode bits (x = 13)"] - #[inline] - pub fn md13(&mut self) -> _MD13W { - _MD13W { w: self } + #[inline(always)] + pub fn md13(&mut self) -> MD13_W { + MD13_W { w: self } } #[doc = "Bits 18:19 - Port x configuration bits (x = 12)"] - #[inline] - pub fn ctl12(&mut self) -> _CTL12W { - _CTL12W { w: self } + #[inline(always)] + pub fn ctl12(&mut self) -> CTL12_W { + CTL12_W { w: self } } #[doc = "Bits 16:17 - Port x mode bits (x = 12)"] - #[inline] - pub fn md12(&mut self) -> _MD12W { - _MD12W { w: self } + #[inline(always)] + pub fn md12(&mut self) -> MD12_W { + MD12_W { w: self } } #[doc = "Bits 14:15 - Port x configuration bits (x = 11)"] - #[inline] - pub fn ctl11(&mut self) -> _CTL11W { - _CTL11W { w: self } + #[inline(always)] + pub fn ctl11(&mut self) -> CTL11_W { + CTL11_W { w: self } } #[doc = "Bits 12:13 - Port x mode bits (x = 11 )"] - #[inline] - pub fn md11(&mut self) -> _MD11W { - _MD11W { w: self } + #[inline(always)] + pub fn md11(&mut self) -> MD11_W { + MD11_W { w: self } } #[doc = "Bits 10:11 - Port x configuration bits (x = 10)"] - #[inline] - pub fn ctl10(&mut self) -> _CTL10W { - _CTL10W { w: self } + #[inline(always)] + pub fn ctl10(&mut self) -> CTL10_W { + CTL10_W { w: self } } #[doc = "Bits 8:9 - Port x mode bits (x = 10 )"] - #[inline] - pub fn md10(&mut self) -> _MD10W { - _MD10W { w: self } + #[inline(always)] + pub fn md10(&mut self) -> MD10_W { + MD10_W { w: self } } #[doc = "Bits 6:7 - Port x configuration bits (x = 9)"] - #[inline] - pub fn ctl9(&mut self) -> _CTL9W { - _CTL9W { w: self } + #[inline(always)] + pub fn ctl9(&mut self) -> CTL9_W { + CTL9_W { w: self } } #[doc = "Bits 4:5 - Port x mode bits (x = 9)"] - #[inline] - pub fn md9(&mut self) -> _MD9W { - _MD9W { w: self } + #[inline(always)] + pub fn md9(&mut self) -> MD9_W { + MD9_W { w: self } } #[doc = "Bits 2:3 - Port x configuration bits (x = 8)"] - #[inline] - pub fn ctl8(&mut self) -> _CTL8W { - _CTL8W { w: self } + #[inline(always)] + pub fn ctl8(&mut self) -> CTL8_W { + CTL8_W { w: self } } #[doc = "Bits 0:1 - Port x mode bits (x = 8)"] - #[inline] - pub fn md8(&mut self) -> _MD8W { - _MD8W { w: self } + #[inline(always)] + pub fn md8(&mut self) -> MD8_W { + MD8_W { w: self } } } diff --git a/src/gpioa/istat.rs b/src/gpioa/istat.rs index e4f5ed816ba91e8986494449574935a8202d759e..9625eeb1cef9876a045eeb00632452b217f864b5 100644 --- a/src/gpioa/istat.rs +++ b/src/gpioa/istat.rs @@ -1,516 +1,116 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::ISTAT { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct ISTAT15R { - bits: bool, -} -impl ISTAT15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISTAT14R { - bits: bool, -} -impl ISTAT14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISTAT13R { - bits: bool, -} -impl ISTAT13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISTAT12R { - bits: bool, -} -impl ISTAT12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISTAT11R { - bits: bool, -} -impl ISTAT11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISTAT10R { - bits: bool, -} -impl ISTAT10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISTAT9R { - bits: bool, -} -impl ISTAT9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISTAT8R { - bits: bool, -} -impl ISTAT8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISTAT7R { - bits: bool, -} -impl ISTAT7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISTAT6R { - bits: bool, -} -impl ISTAT6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISTAT5R { - bits: bool, -} -impl ISTAT5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISTAT4R { - bits: bool, -} -impl ISTAT4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISTAT3R { - bits: bool, -} -impl ISTAT3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISTAT2R { - bits: bool, -} -impl ISTAT2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISTAT1R { - bits: bool, -} -impl ISTAT1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISTAT0R { - bits: bool, -} -impl ISTAT0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} +#[doc = "Reader of register ISTAT"] +pub type R = crate::R; +#[doc = "Reader of field `ISTAT15`"] +pub type ISTAT15_R = crate::R; +#[doc = "Reader of field `ISTAT14`"] +pub type ISTAT14_R = crate::R; +#[doc = "Reader of field `ISTAT13`"] +pub type ISTAT13_R = crate::R; +#[doc = "Reader of field `ISTAT12`"] +pub type ISTAT12_R = crate::R; +#[doc = "Reader of field `ISTAT11`"] +pub type ISTAT11_R = crate::R; +#[doc = "Reader of field `ISTAT10`"] +pub type ISTAT10_R = crate::R; +#[doc = "Reader of field `ISTAT9`"] +pub type ISTAT9_R = crate::R; +#[doc = "Reader of field `ISTAT8`"] +pub type ISTAT8_R = crate::R; +#[doc = "Reader of field `ISTAT7`"] +pub type ISTAT7_R = crate::R; +#[doc = "Reader of field `ISTAT6`"] +pub type ISTAT6_R = crate::R; +#[doc = "Reader of field `ISTAT5`"] +pub type ISTAT5_R = crate::R; +#[doc = "Reader of field `ISTAT4`"] +pub type ISTAT4_R = crate::R; +#[doc = "Reader of field `ISTAT3`"] +pub type ISTAT3_R = crate::R; +#[doc = "Reader of field `ISTAT2`"] +pub type ISTAT2_R = crate::R; +#[doc = "Reader of field `ISTAT1`"] +pub type ISTAT1_R = crate::R; +#[doc = "Reader of field `ISTAT0`"] +pub type ISTAT0_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 15 - Port input status"] - #[inline] - pub fn istat15(&self) -> ISTAT15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISTAT15R { bits } + #[inline(always)] + pub fn istat15(&self) -> ISTAT15_R { + ISTAT15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 14 - Port input status"] - #[inline] - pub fn istat14(&self) -> ISTAT14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISTAT14R { bits } + #[inline(always)] + pub fn istat14(&self) -> ISTAT14_R { + ISTAT14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 13 - Port input status"] - #[inline] - pub fn istat13(&self) -> ISTAT13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISTAT13R { bits } + #[inline(always)] + pub fn istat13(&self) -> ISTAT13_R { + ISTAT13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - Port input status"] - #[inline] - pub fn istat12(&self) -> ISTAT12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISTAT12R { bits } + #[inline(always)] + pub fn istat12(&self) -> ISTAT12_R { + ISTAT12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Port input status"] - #[inline] - pub fn istat11(&self) -> ISTAT11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISTAT11R { bits } + #[inline(always)] + pub fn istat11(&self) -> ISTAT11_R { + ISTAT11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Port input status"] - #[inline] - pub fn istat10(&self) -> ISTAT10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISTAT10R { bits } + #[inline(always)] + pub fn istat10(&self) -> ISTAT10_R { + ISTAT10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Port input status"] - #[inline] - pub fn istat9(&self) -> ISTAT9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISTAT9R { bits } + #[inline(always)] + pub fn istat9(&self) -> ISTAT9_R { + ISTAT9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Port input status"] - #[inline] - pub fn istat8(&self) -> ISTAT8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISTAT8R { bits } + #[inline(always)] + pub fn istat8(&self) -> ISTAT8_R { + ISTAT8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - Port input status"] - #[inline] - pub fn istat7(&self) -> ISTAT7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISTAT7R { bits } + #[inline(always)] + pub fn istat7(&self) -> ISTAT7_R { + ISTAT7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Port input status"] - #[inline] - pub fn istat6(&self) -> ISTAT6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISTAT6R { bits } + #[inline(always)] + pub fn istat6(&self) -> ISTAT6_R { + ISTAT6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Port input status"] - #[inline] - pub fn istat5(&self) -> ISTAT5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISTAT5R { bits } + #[inline(always)] + pub fn istat5(&self) -> ISTAT5_R { + ISTAT5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Port input status"] - #[inline] - pub fn istat4(&self) -> ISTAT4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISTAT4R { bits } + #[inline(always)] + pub fn istat4(&self) -> ISTAT4_R { + ISTAT4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Port input status"] - #[inline] - pub fn istat3(&self) -> ISTAT3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISTAT3R { bits } + #[inline(always)] + pub fn istat3(&self) -> ISTAT3_R { + ISTAT3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Port input status"] - #[inline] - pub fn istat2(&self) -> ISTAT2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISTAT2R { bits } + #[inline(always)] + pub fn istat2(&self) -> ISTAT2_R { + ISTAT2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Port input status"] - #[inline] - pub fn istat1(&self) -> ISTAT1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISTAT1R { bits } + #[inline(always)] + pub fn istat1(&self) -> ISTAT1_R { + ISTAT1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Port input status"] - #[inline] - pub fn istat0(&self) -> ISTAT0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISTAT0R { bits } + #[inline(always)] + pub fn istat0(&self) -> ISTAT0_R { + ISTAT0_R::new((self.bits & 0x01) != 0) } } diff --git a/src/gpioa/lock.rs b/src/gpioa/lock.rs index f370139bcb72e880e9d4070803a05177c312ec52..77a0549bbd9d594156cdba66c38a66265cfe2175 100644 --- a/src/gpioa/lock.rs +++ b/src/gpioa/lock.rs @@ -1,1067 +1,594 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::LOCK { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct LKKR { - bits: bool, -} -impl LKKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LK15R { - bits: bool, -} -impl LK15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LK14R { - bits: bool, -} -impl LK14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LK13R { - bits: bool, -} -impl LK13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LK12R { - bits: bool, -} -impl LK12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LK11R { - bits: bool, -} -impl LK11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LK10R { - bits: bool, -} -impl LK10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LK9R { - bits: bool, -} -impl LK9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LK8R { - bits: bool, -} -impl LK8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LK7R { - bits: bool, -} -impl LK7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LK6R { - bits: bool, -} -impl LK6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LK5R { - bits: bool, -} -impl LK5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LK4R { - bits: bool, -} -impl LK4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LK3R { - bits: bool, -} -impl LK3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LK2R { - bits: bool, -} -impl LK2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LK1R { - bits: bool, -} -impl LK1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LK0R { - bits: bool, -} -impl LK0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _LKKW<'a> { +#[doc = "Reader of register LOCK"] +pub type R = crate::R; +#[doc = "Writer for register LOCK"] +pub type W = crate::W; +#[doc = "Register LOCK `reset()`'s with value 0"] +impl crate::ResetValue for super::LOCK { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `LKK`"] +pub type LKK_R = crate::R; +#[doc = "Write proxy for field `LKK`"] +pub struct LKK_W<'a> { w: &'a mut W, } -impl<'a> _LKKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LKK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _LK15W<'a> { +#[doc = "Reader of field `LK15`"] +pub type LK15_R = crate::R; +#[doc = "Write proxy for field `LK15`"] +pub struct LK15_W<'a> { w: &'a mut W, } -impl<'a> _LK15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _LK14W<'a> { +#[doc = "Reader of field `LK14`"] +pub type LK14_R = crate::R; +#[doc = "Write proxy for field `LK14`"] +pub struct LK14_W<'a> { w: &'a mut W, } -impl<'a> _LK14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _LK13W<'a> { +#[doc = "Reader of field `LK13`"] +pub type LK13_R = crate::R; +#[doc = "Write proxy for field `LK13`"] +pub struct LK13_W<'a> { w: &'a mut W, } -impl<'a> _LK13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _LK12W<'a> { +#[doc = "Reader of field `LK12`"] +pub type LK12_R = crate::R; +#[doc = "Write proxy for field `LK12`"] +pub struct LK12_W<'a> { w: &'a mut W, } -impl<'a> _LK12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _LK11W<'a> { +#[doc = "Reader of field `LK11`"] +pub type LK11_R = crate::R; +#[doc = "Write proxy for field `LK11`"] +pub struct LK11_W<'a> { w: &'a mut W, } -impl<'a> _LK11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _LK10W<'a> { +#[doc = "Reader of field `LK10`"] +pub type LK10_R = crate::R; +#[doc = "Write proxy for field `LK10`"] +pub struct LK10_W<'a> { w: &'a mut W, } -impl<'a> _LK10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _LK9W<'a> { +#[doc = "Reader of field `LK9`"] +pub type LK9_R = crate::R; +#[doc = "Write proxy for field `LK9`"] +pub struct LK9_W<'a> { w: &'a mut W, } -impl<'a> _LK9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _LK8W<'a> { +#[doc = "Reader of field `LK8`"] +pub type LK8_R = crate::R; +#[doc = "Write proxy for field `LK8`"] +pub struct LK8_W<'a> { w: &'a mut W, } -impl<'a> _LK8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _LK7W<'a> { +#[doc = "Reader of field `LK7`"] +pub type LK7_R = crate::R; +#[doc = "Write proxy for field `LK7`"] +pub struct LK7_W<'a> { w: &'a mut W, } -impl<'a> _LK7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _LK6W<'a> { +#[doc = "Reader of field `LK6`"] +pub type LK6_R = crate::R; +#[doc = "Write proxy for field `LK6`"] +pub struct LK6_W<'a> { w: &'a mut W, } -impl<'a> _LK6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _LK5W<'a> { +#[doc = "Reader of field `LK5`"] +pub type LK5_R = crate::R; +#[doc = "Write proxy for field `LK5`"] +pub struct LK5_W<'a> { w: &'a mut W, } -impl<'a> _LK5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _LK4W<'a> { +#[doc = "Reader of field `LK4`"] +pub type LK4_R = crate::R; +#[doc = "Write proxy for field `LK4`"] +pub struct LK4_W<'a> { w: &'a mut W, } -impl<'a> _LK4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _LK3W<'a> { +#[doc = "Reader of field `LK3`"] +pub type LK3_R = crate::R; +#[doc = "Write proxy for field `LK3`"] +pub struct LK3_W<'a> { w: &'a mut W, } -impl<'a> _LK3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _LK2W<'a> { +#[doc = "Reader of field `LK2`"] +pub type LK2_R = crate::R; +#[doc = "Write proxy for field `LK2`"] +pub struct LK2_W<'a> { w: &'a mut W, } -impl<'a> _LK2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _LK1W<'a> { +#[doc = "Reader of field `LK1`"] +pub type LK1_R = crate::R; +#[doc = "Write proxy for field `LK1`"] +pub struct LK1_W<'a> { w: &'a mut W, } -impl<'a> _LK1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _LK0W<'a> { +#[doc = "Reader of field `LK0`"] +pub type LK0_R = crate::R; +#[doc = "Write proxy for field `LK0`"] +pub struct LK0_W<'a> { w: &'a mut W, } -impl<'a> _LK0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LK0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 16 - Lock sequence key"] - #[inline] - pub fn lkk(&self) -> LKKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LKKR { bits } + #[inline(always)] + pub fn lkk(&self) -> LKK_R { + LKK_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 15 - Port Lock bit 15"] - #[inline] - pub fn lk15(&self) -> LK15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LK15R { bits } + #[inline(always)] + pub fn lk15(&self) -> LK15_R { + LK15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 14 - Port Lock bit 14"] - #[inline] - pub fn lk14(&self) -> LK14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LK14R { bits } + #[inline(always)] + pub fn lk14(&self) -> LK14_R { + LK14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 13 - Port Lock bit 13"] - #[inline] - pub fn lk13(&self) -> LK13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LK13R { bits } + #[inline(always)] + pub fn lk13(&self) -> LK13_R { + LK13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - Port Lock bit 12"] - #[inline] - pub fn lk12(&self) -> LK12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LK12R { bits } + #[inline(always)] + pub fn lk12(&self) -> LK12_R { + LK12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Port Lock bit 11"] - #[inline] - pub fn lk11(&self) -> LK11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LK11R { bits } + #[inline(always)] + pub fn lk11(&self) -> LK11_R { + LK11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Port Lock bit 10"] - #[inline] - pub fn lk10(&self) -> LK10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LK10R { bits } + #[inline(always)] + pub fn lk10(&self) -> LK10_R { + LK10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Port Lock bit 9"] - #[inline] - pub fn lk9(&self) -> LK9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LK9R { bits } + #[inline(always)] + pub fn lk9(&self) -> LK9_R { + LK9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Port Lock bit 8"] - #[inline] - pub fn lk8(&self) -> LK8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LK8R { bits } + #[inline(always)] + pub fn lk8(&self) -> LK8_R { + LK8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - Port Lock bit 7"] - #[inline] - pub fn lk7(&self) -> LK7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LK7R { bits } + #[inline(always)] + pub fn lk7(&self) -> LK7_R { + LK7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Port Lock bit 6"] - #[inline] - pub fn lk6(&self) -> LK6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LK6R { bits } + #[inline(always)] + pub fn lk6(&self) -> LK6_R { + LK6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Port Lock bit 5"] - #[inline] - pub fn lk5(&self) -> LK5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LK5R { bits } + #[inline(always)] + pub fn lk5(&self) -> LK5_R { + LK5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Port Lock bit 4"] - #[inline] - pub fn lk4(&self) -> LK4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LK4R { bits } + #[inline(always)] + pub fn lk4(&self) -> LK4_R { + LK4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Port Lock bit 3"] - #[inline] - pub fn lk3(&self) -> LK3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LK3R { bits } + #[inline(always)] + pub fn lk3(&self) -> LK3_R { + LK3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Port Lock bit 2"] - #[inline] - pub fn lk2(&self) -> LK2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LK2R { bits } + #[inline(always)] + pub fn lk2(&self) -> LK2_R { + LK2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Port Lock bit 1"] - #[inline] - pub fn lk1(&self) -> LK1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LK1R { bits } + #[inline(always)] + pub fn lk1(&self) -> LK1_R { + LK1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Port Lock bit 0"] - #[inline] - pub fn lk0(&self) -> LK0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LK0R { bits } + #[inline(always)] + pub fn lk0(&self) -> LK0_R { + LK0_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 16 - Lock sequence key"] - #[inline] - pub fn lkk(&mut self) -> _LKKW { - _LKKW { w: self } + #[inline(always)] + pub fn lkk(&mut self) -> LKK_W { + LKK_W { w: self } } #[doc = "Bit 15 - Port Lock bit 15"] - #[inline] - pub fn lk15(&mut self) -> _LK15W { - _LK15W { w: self } + #[inline(always)] + pub fn lk15(&mut self) -> LK15_W { + LK15_W { w: self } } #[doc = "Bit 14 - Port Lock bit 14"] - #[inline] - pub fn lk14(&mut self) -> _LK14W { - _LK14W { w: self } + #[inline(always)] + pub fn lk14(&mut self) -> LK14_W { + LK14_W { w: self } } #[doc = "Bit 13 - Port Lock bit 13"] - #[inline] - pub fn lk13(&mut self) -> _LK13W { - _LK13W { w: self } + #[inline(always)] + pub fn lk13(&mut self) -> LK13_W { + LK13_W { w: self } } #[doc = "Bit 12 - Port Lock bit 12"] - #[inline] - pub fn lk12(&mut self) -> _LK12W { - _LK12W { w: self } + #[inline(always)] + pub fn lk12(&mut self) -> LK12_W { + LK12_W { w: self } } #[doc = "Bit 11 - Port Lock bit 11"] - #[inline] - pub fn lk11(&mut self) -> _LK11W { - _LK11W { w: self } + #[inline(always)] + pub fn lk11(&mut self) -> LK11_W { + LK11_W { w: self } } #[doc = "Bit 10 - Port Lock bit 10"] - #[inline] - pub fn lk10(&mut self) -> _LK10W { - _LK10W { w: self } + #[inline(always)] + pub fn lk10(&mut self) -> LK10_W { + LK10_W { w: self } } #[doc = "Bit 9 - Port Lock bit 9"] - #[inline] - pub fn lk9(&mut self) -> _LK9W { - _LK9W { w: self } + #[inline(always)] + pub fn lk9(&mut self) -> LK9_W { + LK9_W { w: self } } #[doc = "Bit 8 - Port Lock bit 8"] - #[inline] - pub fn lk8(&mut self) -> _LK8W { - _LK8W { w: self } + #[inline(always)] + pub fn lk8(&mut self) -> LK8_W { + LK8_W { w: self } } #[doc = "Bit 7 - Port Lock bit 7"] - #[inline] - pub fn lk7(&mut self) -> _LK7W { - _LK7W { w: self } + #[inline(always)] + pub fn lk7(&mut self) -> LK7_W { + LK7_W { w: self } } #[doc = "Bit 6 - Port Lock bit 6"] - #[inline] - pub fn lk6(&mut self) -> _LK6W { - _LK6W { w: self } + #[inline(always)] + pub fn lk6(&mut self) -> LK6_W { + LK6_W { w: self } } #[doc = "Bit 5 - Port Lock bit 5"] - #[inline] - pub fn lk5(&mut self) -> _LK5W { - _LK5W { w: self } + #[inline(always)] + pub fn lk5(&mut self) -> LK5_W { + LK5_W { w: self } } #[doc = "Bit 4 - Port Lock bit 4"] - #[inline] - pub fn lk4(&mut self) -> _LK4W { - _LK4W { w: self } + #[inline(always)] + pub fn lk4(&mut self) -> LK4_W { + LK4_W { w: self } } #[doc = "Bit 3 - Port Lock bit 3"] - #[inline] - pub fn lk3(&mut self) -> _LK3W { - _LK3W { w: self } + #[inline(always)] + pub fn lk3(&mut self) -> LK3_W { + LK3_W { w: self } } #[doc = "Bit 2 - Port Lock bit 2"] - #[inline] - pub fn lk2(&mut self) -> _LK2W { - _LK2W { w: self } + #[inline(always)] + pub fn lk2(&mut self) -> LK2_W { + LK2_W { w: self } } #[doc = "Bit 1 - Port Lock bit 1"] - #[inline] - pub fn lk1(&mut self) -> _LK1W { - _LK1W { w: self } + #[inline(always)] + pub fn lk1(&mut self) -> LK1_W { + LK1_W { w: self } } #[doc = "Bit 0 - Port Lock bit 0"] - #[inline] - pub fn lk0(&mut self) -> _LK0W { - _LK0W { w: self } + #[inline(always)] + pub fn lk0(&mut self) -> LK0_W { + LK0_W { w: self } } } diff --git a/src/gpioa/octl.rs b/src/gpioa/octl.rs index de5208e10f0651ede6f896e27eb8ea78fa91f4bd..ded7f1c81a04bab8be315f2304e6d471367c5668 100644 --- a/src/gpioa/octl.rs +++ b/src/gpioa/octl.rs @@ -1,1008 +1,560 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::OCTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct OCTL15R { - bits: bool, -} -impl OCTL15R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OCTL14R { - bits: bool, -} -impl OCTL14R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OCTL13R { - bits: bool, -} -impl OCTL13R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OCTL12R { - bits: bool, -} -impl OCTL12R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OCTL11R { - bits: bool, -} -impl OCTL11R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OCTL10R { - bits: bool, -} -impl OCTL10R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OCTL9R { - bits: bool, -} -impl OCTL9R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OCTL8R { - bits: bool, -} -impl OCTL8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OCTL7R { - bits: bool, -} -impl OCTL7R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OCTL6R { - bits: bool, -} -impl OCTL6R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OCTL5R { - bits: bool, -} -impl OCTL5R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OCTL4R { - bits: bool, -} -impl OCTL4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OCTL3R { - bits: bool, -} -impl OCTL3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OCTL2R { - bits: bool, -} -impl OCTL2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OCTL1R { - bits: bool, -} -impl OCTL1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OCTL0R { - bits: bool, -} -impl OCTL0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _OCTL15W<'a> { +#[doc = "Reader of register OCTL"] +pub type R = crate::R; +#[doc = "Writer for register OCTL"] +pub type W = crate::W; +#[doc = "Register OCTL `reset()`'s with value 0"] +impl crate::ResetValue for super::OCTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `OCTL15`"] +pub type OCTL15_R = crate::R; +#[doc = "Write proxy for field `OCTL15`"] +pub struct OCTL15_W<'a> { w: &'a mut W, } -impl<'a> _OCTL15W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OCTL15_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _OCTL14W<'a> { +#[doc = "Reader of field `OCTL14`"] +pub type OCTL14_R = crate::R; +#[doc = "Write proxy for field `OCTL14`"] +pub struct OCTL14_W<'a> { w: &'a mut W, } -impl<'a> _OCTL14W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OCTL14_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _OCTL13W<'a> { +#[doc = "Reader of field `OCTL13`"] +pub type OCTL13_R = crate::R; +#[doc = "Write proxy for field `OCTL13`"] +pub struct OCTL13_W<'a> { w: &'a mut W, } -impl<'a> _OCTL13W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OCTL13_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _OCTL12W<'a> { +#[doc = "Reader of field `OCTL12`"] +pub type OCTL12_R = crate::R; +#[doc = "Write proxy for field `OCTL12`"] +pub struct OCTL12_W<'a> { w: &'a mut W, } -impl<'a> _OCTL12W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OCTL12_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _OCTL11W<'a> { +#[doc = "Reader of field `OCTL11`"] +pub type OCTL11_R = crate::R; +#[doc = "Write proxy for field `OCTL11`"] +pub struct OCTL11_W<'a> { w: &'a mut W, } -impl<'a> _OCTL11W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OCTL11_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _OCTL10W<'a> { +#[doc = "Reader of field `OCTL10`"] +pub type OCTL10_R = crate::R; +#[doc = "Write proxy for field `OCTL10`"] +pub struct OCTL10_W<'a> { w: &'a mut W, } -impl<'a> _OCTL10W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OCTL10_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _OCTL9W<'a> { +#[doc = "Reader of field `OCTL9`"] +pub type OCTL9_R = crate::R; +#[doc = "Write proxy for field `OCTL9`"] +pub struct OCTL9_W<'a> { w: &'a mut W, } -impl<'a> _OCTL9W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OCTL9_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _OCTL8W<'a> { +#[doc = "Reader of field `OCTL8`"] +pub type OCTL8_R = crate::R; +#[doc = "Write proxy for field `OCTL8`"] +pub struct OCTL8_W<'a> { w: &'a mut W, } -impl<'a> _OCTL8W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OCTL8_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _OCTL7W<'a> { +#[doc = "Reader of field `OCTL7`"] +pub type OCTL7_R = crate::R; +#[doc = "Write proxy for field `OCTL7`"] +pub struct OCTL7_W<'a> { w: &'a mut W, } -impl<'a> _OCTL7W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OCTL7_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _OCTL6W<'a> { +#[doc = "Reader of field `OCTL6`"] +pub type OCTL6_R = crate::R; +#[doc = "Write proxy for field `OCTL6`"] +pub struct OCTL6_W<'a> { w: &'a mut W, } -impl<'a> _OCTL6W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OCTL6_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _OCTL5W<'a> { +#[doc = "Reader of field `OCTL5`"] +pub type OCTL5_R = crate::R; +#[doc = "Write proxy for field `OCTL5`"] +pub struct OCTL5_W<'a> { w: &'a mut W, } -impl<'a> _OCTL5W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OCTL5_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _OCTL4W<'a> { +#[doc = "Reader of field `OCTL4`"] +pub type OCTL4_R = crate::R; +#[doc = "Write proxy for field `OCTL4`"] +pub struct OCTL4_W<'a> { w: &'a mut W, } -impl<'a> _OCTL4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OCTL4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _OCTL3W<'a> { +#[doc = "Reader of field `OCTL3`"] +pub type OCTL3_R = crate::R; +#[doc = "Write proxy for field `OCTL3`"] +pub struct OCTL3_W<'a> { w: &'a mut W, } -impl<'a> _OCTL3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OCTL3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _OCTL2W<'a> { +#[doc = "Reader of field `OCTL2`"] +pub type OCTL2_R = crate::R; +#[doc = "Write proxy for field `OCTL2`"] +pub struct OCTL2_W<'a> { w: &'a mut W, } -impl<'a> _OCTL2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OCTL2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _OCTL1W<'a> { +#[doc = "Reader of field `OCTL1`"] +pub type OCTL1_R = crate::R; +#[doc = "Write proxy for field `OCTL1`"] +pub struct OCTL1_W<'a> { w: &'a mut W, } -impl<'a> _OCTL1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OCTL1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _OCTL0W<'a> { +#[doc = "Reader of field `OCTL0`"] +pub type OCTL0_R = crate::R; +#[doc = "Write proxy for field `OCTL0`"] +pub struct OCTL0_W<'a> { w: &'a mut W, } -impl<'a> _OCTL0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OCTL0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 15 - Port output control"] - #[inline] - pub fn octl15(&self) -> OCTL15R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OCTL15R { bits } + #[inline(always)] + pub fn octl15(&self) -> OCTL15_R { + OCTL15_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 14 - Port output control"] - #[inline] - pub fn octl14(&self) -> OCTL14R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OCTL14R { bits } + #[inline(always)] + pub fn octl14(&self) -> OCTL14_R { + OCTL14_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 13 - Port output control"] - #[inline] - pub fn octl13(&self) -> OCTL13R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OCTL13R { bits } + #[inline(always)] + pub fn octl13(&self) -> OCTL13_R { + OCTL13_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - Port output control"] - #[inline] - pub fn octl12(&self) -> OCTL12R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OCTL12R { bits } + #[inline(always)] + pub fn octl12(&self) -> OCTL12_R { + OCTL12_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Port output control"] - #[inline] - pub fn octl11(&self) -> OCTL11R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OCTL11R { bits } + #[inline(always)] + pub fn octl11(&self) -> OCTL11_R { + OCTL11_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Port output control"] - #[inline] - pub fn octl10(&self) -> OCTL10R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OCTL10R { bits } + #[inline(always)] + pub fn octl10(&self) -> OCTL10_R { + OCTL10_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Port output control"] - #[inline] - pub fn octl9(&self) -> OCTL9R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OCTL9R { bits } + #[inline(always)] + pub fn octl9(&self) -> OCTL9_R { + OCTL9_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Port output control"] - #[inline] - pub fn octl8(&self) -> OCTL8R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OCTL8R { bits } + #[inline(always)] + pub fn octl8(&self) -> OCTL8_R { + OCTL8_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - Port output control"] - #[inline] - pub fn octl7(&self) -> OCTL7R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OCTL7R { bits } + #[inline(always)] + pub fn octl7(&self) -> OCTL7_R { + OCTL7_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Port output control"] - #[inline] - pub fn octl6(&self) -> OCTL6R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OCTL6R { bits } + #[inline(always)] + pub fn octl6(&self) -> OCTL6_R { + OCTL6_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Port output control"] - #[inline] - pub fn octl5(&self) -> OCTL5R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OCTL5R { bits } + #[inline(always)] + pub fn octl5(&self) -> OCTL5_R { + OCTL5_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Port output control"] - #[inline] - pub fn octl4(&self) -> OCTL4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OCTL4R { bits } + #[inline(always)] + pub fn octl4(&self) -> OCTL4_R { + OCTL4_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Port output control"] - #[inline] - pub fn octl3(&self) -> OCTL3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OCTL3R { bits } + #[inline(always)] + pub fn octl3(&self) -> OCTL3_R { + OCTL3_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Port output control"] - #[inline] - pub fn octl2(&self) -> OCTL2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OCTL2R { bits } + #[inline(always)] + pub fn octl2(&self) -> OCTL2_R { + OCTL2_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Port output control"] - #[inline] - pub fn octl1(&self) -> OCTL1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OCTL1R { bits } + #[inline(always)] + pub fn octl1(&self) -> OCTL1_R { + OCTL1_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Port output control"] - #[inline] - pub fn octl0(&self) -> OCTL0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OCTL0R { bits } + #[inline(always)] + pub fn octl0(&self) -> OCTL0_R { + OCTL0_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 15 - Port output control"] - #[inline] - pub fn octl15(&mut self) -> _OCTL15W { - _OCTL15W { w: self } + #[inline(always)] + pub fn octl15(&mut self) -> OCTL15_W { + OCTL15_W { w: self } } #[doc = "Bit 14 - Port output control"] - #[inline] - pub fn octl14(&mut self) -> _OCTL14W { - _OCTL14W { w: self } + #[inline(always)] + pub fn octl14(&mut self) -> OCTL14_W { + OCTL14_W { w: self } } #[doc = "Bit 13 - Port output control"] - #[inline] - pub fn octl13(&mut self) -> _OCTL13W { - _OCTL13W { w: self } + #[inline(always)] + pub fn octl13(&mut self) -> OCTL13_W { + OCTL13_W { w: self } } #[doc = "Bit 12 - Port output control"] - #[inline] - pub fn octl12(&mut self) -> _OCTL12W { - _OCTL12W { w: self } + #[inline(always)] + pub fn octl12(&mut self) -> OCTL12_W { + OCTL12_W { w: self } } #[doc = "Bit 11 - Port output control"] - #[inline] - pub fn octl11(&mut self) -> _OCTL11W { - _OCTL11W { w: self } + #[inline(always)] + pub fn octl11(&mut self) -> OCTL11_W { + OCTL11_W { w: self } } #[doc = "Bit 10 - Port output control"] - #[inline] - pub fn octl10(&mut self) -> _OCTL10W { - _OCTL10W { w: self } + #[inline(always)] + pub fn octl10(&mut self) -> OCTL10_W { + OCTL10_W { w: self } } #[doc = "Bit 9 - Port output control"] - #[inline] - pub fn octl9(&mut self) -> _OCTL9W { - _OCTL9W { w: self } + #[inline(always)] + pub fn octl9(&mut self) -> OCTL9_W { + OCTL9_W { w: self } } #[doc = "Bit 8 - Port output control"] - #[inline] - pub fn octl8(&mut self) -> _OCTL8W { - _OCTL8W { w: self } + #[inline(always)] + pub fn octl8(&mut self) -> OCTL8_W { + OCTL8_W { w: self } } #[doc = "Bit 7 - Port output control"] - #[inline] - pub fn octl7(&mut self) -> _OCTL7W { - _OCTL7W { w: self } + #[inline(always)] + pub fn octl7(&mut self) -> OCTL7_W { + OCTL7_W { w: self } } #[doc = "Bit 6 - Port output control"] - #[inline] - pub fn octl6(&mut self) -> _OCTL6W { - _OCTL6W { w: self } + #[inline(always)] + pub fn octl6(&mut self) -> OCTL6_W { + OCTL6_W { w: self } } #[doc = "Bit 5 - Port output control"] - #[inline] - pub fn octl5(&mut self) -> _OCTL5W { - _OCTL5W { w: self } + #[inline(always)] + pub fn octl5(&mut self) -> OCTL5_W { + OCTL5_W { w: self } } #[doc = "Bit 4 - Port output control"] - #[inline] - pub fn octl4(&mut self) -> _OCTL4W { - _OCTL4W { w: self } + #[inline(always)] + pub fn octl4(&mut self) -> OCTL4_W { + OCTL4_W { w: self } } #[doc = "Bit 3 - Port output control"] - #[inline] - pub fn octl3(&mut self) -> _OCTL3W { - _OCTL3W { w: self } + #[inline(always)] + pub fn octl3(&mut self) -> OCTL3_W { + OCTL3_W { w: self } } #[doc = "Bit 2 - Port output control"] - #[inline] - pub fn octl2(&mut self) -> _OCTL2W { - _OCTL2W { w: self } + #[inline(always)] + pub fn octl2(&mut self) -> OCTL2_W { + OCTL2_W { w: self } } #[doc = "Bit 1 - Port output control"] - #[inline] - pub fn octl1(&mut self) -> _OCTL1W { - _OCTL1W { w: self } + #[inline(always)] + pub fn octl1(&mut self) -> OCTL1_W { + OCTL1_W { w: self } } #[doc = "Bit 0 - Port output control"] - #[inline] - pub fn octl0(&mut self) -> _OCTL0W { - _OCTL0W { w: self } + #[inline(always)] + pub fn octl0(&mut self) -> OCTL0_W { + OCTL0_W { w: self } } } diff --git a/src/i2c0.rs b/src/i2c0.rs index 7ab206fdd059ad651674b75aaafddda168f1a2f9..654763ccb52ad87b40a92dbf7ff5eb174d2133be 100644 --- a/src/i2c0.rs +++ b/src/i2c0.rs @@ -1,84 +1,127 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Control register 0"] pub ctl0: CTL0, - _reserved0: [u8; 2usize], + _reserved1: [u8; 2usize], #[doc = "0x04 - Control register 1"] pub ctl1: CTL1, - _reserved1: [u8; 2usize], + _reserved2: [u8; 2usize], #[doc = "0x08 - Slave address register 0"] pub saddr0: SADDR0, - _reserved2: [u8; 2usize], + _reserved3: [u8; 2usize], #[doc = "0x0c - Slave address register 1"] pub saddr1: SADDR1, - _reserved3: [u8; 2usize], + _reserved4: [u8; 2usize], #[doc = "0x10 - Transfer buffer register"] pub data: DATA, - _reserved4: [u8; 2usize], + _reserved5: [u8; 2usize], #[doc = "0x14 - Transfer status register 0"] pub stat0: STAT0, - _reserved5: [u8; 2usize], + _reserved6: [u8; 2usize], #[doc = "0x18 - Transfer status register 1"] pub stat1: STAT1, - _reserved6: [u8; 2usize], + _reserved7: [u8; 2usize], #[doc = "0x1c - Clock configure register"] pub ckcfg: CKCFG, - _reserved7: [u8; 2usize], + _reserved8: [u8; 2usize], #[doc = "0x20 - Rise time register"] pub rt: RT, } -#[doc = "Control register 0"] -pub struct CTL0 { - register: ::vcell::VolatileCell, -} +#[doc = "Control register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl0](ctl0) module"] +pub type CTL0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL0; +#[doc = "`read()` method returns [ctl0::R](ctl0::R) reader structure"] +impl crate::Readable for CTL0 {} +#[doc = "`write(|w| ..)` method takes [ctl0::W](ctl0::W) writer structure"] +impl crate::Writable for CTL0 {} #[doc = "Control register 0"] pub mod ctl0; -#[doc = "Control register 1"] -pub struct CTL1 { - register: ::vcell::VolatileCell, -} +#[doc = "Control register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl1](ctl1) module"] +pub type CTL1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL1; +#[doc = "`read()` method returns [ctl1::R](ctl1::R) reader structure"] +impl crate::Readable for CTL1 {} +#[doc = "`write(|w| ..)` method takes [ctl1::W](ctl1::W) writer structure"] +impl crate::Writable for CTL1 {} #[doc = "Control register 1"] pub mod ctl1; -#[doc = "Slave address register 0"] -pub struct SADDR0 { - register: ::vcell::VolatileCell, -} +#[doc = "Slave address register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [saddr0](saddr0) module"] +pub type SADDR0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _SADDR0; +#[doc = "`read()` method returns [saddr0::R](saddr0::R) reader structure"] +impl crate::Readable for SADDR0 {} +#[doc = "`write(|w| ..)` method takes [saddr0::W](saddr0::W) writer structure"] +impl crate::Writable for SADDR0 {} #[doc = "Slave address register 0"] pub mod saddr0; -#[doc = "Slave address register 1"] -pub struct SADDR1 { - register: ::vcell::VolatileCell, -} +#[doc = "Slave address register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [saddr1](saddr1) module"] +pub type SADDR1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _SADDR1; +#[doc = "`read()` method returns [saddr1::R](saddr1::R) reader structure"] +impl crate::Readable for SADDR1 {} +#[doc = "`write(|w| ..)` method takes [saddr1::W](saddr1::W) writer structure"] +impl crate::Writable for SADDR1 {} #[doc = "Slave address register 1"] pub mod saddr1; -#[doc = "Transfer buffer register"] -pub struct DATA { - register: ::vcell::VolatileCell, -} +#[doc = "Transfer buffer register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data](data) module"] +pub type DATA = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA; +#[doc = "`read()` method returns [data::R](data::R) reader structure"] +impl crate::Readable for DATA {} +#[doc = "`write(|w| ..)` method takes [data::W](data::W) writer structure"] +impl crate::Writable for DATA {} #[doc = "Transfer buffer register"] pub mod data; -#[doc = "Transfer status register 0"] -pub struct STAT0 { - register: ::vcell::VolatileCell, -} +#[doc = "Transfer status register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [stat0](stat0) module"] +pub type STAT0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _STAT0; +#[doc = "`read()` method returns [stat0::R](stat0::R) reader structure"] +impl crate::Readable for STAT0 {} +#[doc = "`write(|w| ..)` method takes [stat0::W](stat0::W) writer structure"] +impl crate::Writable for STAT0 {} #[doc = "Transfer status register 0"] pub mod stat0; -#[doc = "Transfer status register 1"] -pub struct STAT1 { - register: ::vcell::VolatileCell, -} +#[doc = "Transfer status register 1\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [stat1](stat1) module"] +pub type STAT1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _STAT1; +#[doc = "`read()` method returns [stat1::R](stat1::R) reader structure"] +impl crate::Readable for STAT1 {} #[doc = "Transfer status register 1"] pub mod stat1; -#[doc = "Clock configure register"] -pub struct CKCFG { - register: ::vcell::VolatileCell, -} +#[doc = "Clock configure register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ckcfg](ckcfg) module"] +pub type CKCFG = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CKCFG; +#[doc = "`read()` method returns [ckcfg::R](ckcfg::R) reader structure"] +impl crate::Readable for CKCFG {} +#[doc = "`write(|w| ..)` method takes [ckcfg::W](ckcfg::W) writer structure"] +impl crate::Writable for CKCFG {} #[doc = "Clock configure register"] pub mod ckcfg; -#[doc = "Rise time register"] -pub struct RT { - register: ::vcell::VolatileCell, -} +#[doc = "Rise time register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rt](rt) module"] +pub type RT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RT; +#[doc = "`read()` method returns [rt::R](rt::R) reader structure"] +impl crate::Readable for RT {} +#[doc = "`write(|w| ..)` method takes [rt::W](rt::W) writer structure"] +impl crate::Writable for RT {} #[doc = "Rise time register"] pub mod rt; diff --git a/src/i2c0/ckcfg.rs b/src/i2c0/ckcfg.rs index df50441efd4f0a53ce88fa5cf7be5367237abbc6..02e7b7b4c39df0d98b08eee9c50b005921190901 100644 --- a/src/i2c0/ckcfg.rs +++ b/src/i2c0/ckcfg.rs @@ -1,223 +1,108 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CKCFG { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FASTR { - bits: bool, -} -impl FASTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTCYR { - bits: bool, -} -impl DTCYR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CLKCR { - bits: u16, -} -impl CLKCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _FASTW<'a> { +#[doc = "Reader of register CKCFG"] +pub type R = crate::R; +#[doc = "Writer for register CKCFG"] +pub type W = crate::W; +#[doc = "Register CKCFG `reset()`'s with value 0"] +impl crate::ResetValue for super::CKCFG { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `FAST`"] +pub type FAST_R = crate::R; +#[doc = "Write proxy for field `FAST`"] +pub struct FAST_W<'a> { w: &'a mut W, } -impl<'a> _FASTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FAST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u16) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _DTCYW<'a> { +#[doc = "Reader of field `DTCY`"] +pub type DTCY_R = crate::R; +#[doc = "Write proxy for field `DTCY`"] +pub struct DTCY_W<'a> { w: &'a mut W, } -impl<'a> _DTCYW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTCY_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u16) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _CLKCW<'a> { +#[doc = "Reader of field `CLKC`"] +pub type CLKC_R = crate::R; +#[doc = "Write proxy for field `CLKC`"] +pub struct CLKC_W<'a> { w: &'a mut W, } -impl<'a> _CLKCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CLKC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u16) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 15 - I2C speed selection in master mode"] - #[inline] - pub fn fast(&self) -> FASTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - FASTR { bits } + #[inline(always)] + pub fn fast(&self) -> FAST_R { + FAST_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 14 - Duty cycle in fast mode"] - #[inline] - pub fn dtcy(&self) -> DTCYR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - DTCYR { bits } + #[inline(always)] + pub fn dtcy(&self) -> DTCY_R { + DTCY_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bits 0:11 - I2C Clock control in master mode"] - #[inline] - pub fn clkc(&self) -> CLKCR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - CLKCR { bits } + #[inline(always)] + pub fn clkc(&self) -> CLKC_R { + CLKC_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 15 - I2C speed selection in master mode"] - #[inline] - pub fn fast(&mut self) -> _FASTW { - _FASTW { w: self } + #[inline(always)] + pub fn fast(&mut self) -> FAST_W { + FAST_W { w: self } } #[doc = "Bit 14 - Duty cycle in fast mode"] - #[inline] - pub fn dtcy(&mut self) -> _DTCYW { - _DTCYW { w: self } + #[inline(always)] + pub fn dtcy(&mut self) -> DTCY_W { + DTCY_W { w: self } } #[doc = "Bits 0:11 - I2C Clock control in master mode"] - #[inline] - pub fn clkc(&mut self) -> _CLKCW { - _CLKCW { w: self } + #[inline(always)] + pub fn clkc(&mut self) -> CLKC_W { + CLKC_W { w: self } } } diff --git a/src/i2c0/ctl0.rs b/src/i2c0/ctl0.rs index 4faa0568d47be8e8dfda1308021932baba4c5015..eb307f1f3d09600c19e4e7275ecadd26febe9be0 100644 --- a/src/i2c0/ctl0.rs +++ b/src/i2c0/ctl0.rs @@ -1,890 +1,492 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CTL0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SRESETR { - bits: bool, -} -impl SRESETR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SALTR { - bits: bool, -} -impl SALTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PECTRANSR { - bits: bool, -} -impl PECTRANSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct POAPR { - bits: bool, -} -impl POAPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKENR { - bits: bool, -} -impl ACKENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STOPR { - bits: bool, -} -impl STOPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STARTR { - bits: bool, -} -impl STARTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SSR { - bits: bool, -} -impl SSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GCENR { - bits: bool, -} -impl GCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PECENR { - bits: bool, -} -impl PECENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ARPENR { - bits: bool, -} -impl ARPENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SMBSELR { - bits: bool, -} -impl SMBSELR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SMBENR { - bits: bool, -} -impl SMBENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct I2CENR { - bits: bool, -} -impl I2CENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _SRESETW<'a> { +#[doc = "Reader of register CTL0"] +pub type R = crate::R; +#[doc = "Writer for register CTL0"] +pub type W = crate::W; +#[doc = "Register CTL0 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL0 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `SRESET`"] +pub type SRESET_R = crate::R; +#[doc = "Write proxy for field `SRESET`"] +pub struct SRESET_W<'a> { w: &'a mut W, } -impl<'a> _SRESETW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SRESET_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u16) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _SALTW<'a> { +#[doc = "Reader of field `SALT`"] +pub type SALT_R = crate::R; +#[doc = "Write proxy for field `SALT`"] +pub struct SALT_W<'a> { w: &'a mut W, } -impl<'a> _SALTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SALT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u16) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _PECTRANSW<'a> { +#[doc = "Reader of field `PECTRANS`"] +pub type PECTRANS_R = crate::R; +#[doc = "Write proxy for field `PECTRANS`"] +pub struct PECTRANS_W<'a> { w: &'a mut W, } -impl<'a> _PECTRANSW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PECTRANS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u16) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _POAPW<'a> { +#[doc = "Reader of field `POAP`"] +pub type POAP_R = crate::R; +#[doc = "Write proxy for field `POAP`"] +pub struct POAP_W<'a> { w: &'a mut W, } -impl<'a> _POAPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> POAP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u16) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _ACKENW<'a> { +#[doc = "Reader of field `ACKEN`"] +pub type ACKEN_R = crate::R; +#[doc = "Write proxy for field `ACKEN`"] +pub struct ACKEN_W<'a> { w: &'a mut W, } -impl<'a> _ACKENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACKEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u16) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _STOPW<'a> { +#[doc = "Reader of field `STOP`"] +pub type STOP_R = crate::R; +#[doc = "Write proxy for field `STOP`"] +pub struct STOP_W<'a> { w: &'a mut W, } -impl<'a> _STOPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STOP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u16) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _STARTW<'a> { +#[doc = "Reader of field `START`"] +pub type START_R = crate::R; +#[doc = "Write proxy for field `START`"] +pub struct START_W<'a> { w: &'a mut W, } -impl<'a> _STARTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> START_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u16) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _SSW<'a> { +#[doc = "Reader of field `SS`"] +pub type SS_R = crate::R; +#[doc = "Write proxy for field `SS`"] +pub struct SS_W<'a> { w: &'a mut W, } -impl<'a> _SSW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _GCENW<'a> { +#[doc = "Reader of field `GCEN`"] +pub type GCEN_R = crate::R; +#[doc = "Write proxy for field `GCEN`"] +pub struct GCEN_W<'a> { w: &'a mut W, } -impl<'a> _GCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> GCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u16) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _PECENW<'a> { +#[doc = "Reader of field `PECEN`"] +pub type PECEN_R = crate::R; +#[doc = "Write proxy for field `PECEN`"] +pub struct PECEN_W<'a> { w: &'a mut W, } -impl<'a> _PECENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PECEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u16) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _ARPENW<'a> { +#[doc = "Reader of field `ARPEN`"] +pub type ARPEN_R = crate::R; +#[doc = "Write proxy for field `ARPEN`"] +pub struct ARPEN_W<'a> { w: &'a mut W, } -impl<'a> _ARPENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ARPEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u16) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _SMBSELW<'a> { +#[doc = "Reader of field `SMBSEL`"] +pub type SMBSEL_R = crate::R; +#[doc = "Write proxy for field `SMBSEL`"] +pub struct SMBSEL_W<'a> { w: &'a mut W, } -impl<'a> _SMBSELW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SMBSEL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _SMBENW<'a> { +#[doc = "Reader of field `SMBEN`"] +pub type SMBEN_R = crate::R; +#[doc = "Write proxy for field `SMBEN`"] +pub struct SMBEN_W<'a> { w: &'a mut W, } -impl<'a> _SMBENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SMBEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _I2CENW<'a> { +#[doc = "Reader of field `I2CEN`"] +pub type I2CEN_R = crate::R; +#[doc = "Write proxy for field `I2CEN`"] +pub struct I2CEN_W<'a> { w: &'a mut W, } -impl<'a> _I2CENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> I2CEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 15 - Software reset"] - #[inline] - pub fn sreset(&self) -> SRESETR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - SRESETR { bits } + #[inline(always)] + pub fn sreset(&self) -> SRESET_R { + SRESET_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 13 - SMBus alert"] - #[inline] - pub fn salt(&self) -> SALTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - SALTR { bits } + #[inline(always)] + pub fn salt(&self) -> SALT_R { + SALT_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - PEC Transfer"] - #[inline] - pub fn pectrans(&self) -> PECTRANSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - PECTRANSR { bits } + #[inline(always)] + pub fn pectrans(&self) -> PECTRANS_R { + PECTRANS_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Position of ACK and PEC when receiving"] - #[inline] - pub fn poap(&self) -> POAPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - POAPR { bits } + #[inline(always)] + pub fn poap(&self) -> POAP_R { + POAP_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Whether or not to send an ACK"] - #[inline] - pub fn acken(&self) -> ACKENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ACKENR { bits } + #[inline(always)] + pub fn acken(&self) -> ACKEN_R { + ACKEN_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Generate a STOP condition on I2C bus"] - #[inline] - pub fn stop(&self) -> STOPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - STOPR { bits } + #[inline(always)] + pub fn stop(&self) -> STOP_R { + STOP_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Generate a START condition on I2C bus"] - #[inline] - pub fn start(&self) -> STARTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - STARTR { bits } + #[inline(always)] + pub fn start(&self) -> START_R { + START_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - Whether to stretch SCL low when data is not ready in slave mode"] - #[inline] - pub fn ss(&self) -> SSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - SSR { bits } + #[inline(always)] + pub fn ss(&self) -> SS_R { + SS_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Whether or not to response to a General Call (0x00)"] - #[inline] - pub fn gcen(&self) -> GCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - GCENR { bits } + #[inline(always)] + pub fn gcen(&self) -> GCEN_R { + GCEN_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - PEC Calculation Switch"] - #[inline] - pub fn pecen(&self) -> PECENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - PECENR { bits } + #[inline(always)] + pub fn pecen(&self) -> PECEN_R { + PECEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - ARP protocol in SMBus switch"] - #[inline] - pub fn arpen(&self) -> ARPENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ARPENR { bits } + #[inline(always)] + pub fn arpen(&self) -> ARPEN_R { + ARPEN_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - SMBusType Selection"] - #[inline] - pub fn smbsel(&self) -> SMBSELR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - SMBSELR { bits } + #[inline(always)] + pub fn smbsel(&self) -> SMBSEL_R { + SMBSEL_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 1 - SMBus/I2C mode switch"] - #[inline] - pub fn smben(&self) -> SMBENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - SMBENR { bits } + #[inline(always)] + pub fn smben(&self) -> SMBEN_R { + SMBEN_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - I2C peripheral enable"] - #[inline] - pub fn i2cen(&self) -> I2CENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - I2CENR { bits } + #[inline(always)] + pub fn i2cen(&self) -> I2CEN_R { + I2CEN_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 15 - Software reset"] - #[inline] - pub fn sreset(&mut self) -> _SRESETW { - _SRESETW { w: self } + #[inline(always)] + pub fn sreset(&mut self) -> SRESET_W { + SRESET_W { w: self } } #[doc = "Bit 13 - SMBus alert"] - #[inline] - pub fn salt(&mut self) -> _SALTW { - _SALTW { w: self } + #[inline(always)] + pub fn salt(&mut self) -> SALT_W { + SALT_W { w: self } } #[doc = "Bit 12 - PEC Transfer"] - #[inline] - pub fn pectrans(&mut self) -> _PECTRANSW { - _PECTRANSW { w: self } + #[inline(always)] + pub fn pectrans(&mut self) -> PECTRANS_W { + PECTRANS_W { w: self } } #[doc = "Bit 11 - Position of ACK and PEC when receiving"] - #[inline] - pub fn poap(&mut self) -> _POAPW { - _POAPW { w: self } + #[inline(always)] + pub fn poap(&mut self) -> POAP_W { + POAP_W { w: self } } #[doc = "Bit 10 - Whether or not to send an ACK"] - #[inline] - pub fn acken(&mut self) -> _ACKENW { - _ACKENW { w: self } + #[inline(always)] + pub fn acken(&mut self) -> ACKEN_W { + ACKEN_W { w: self } } #[doc = "Bit 9 - Generate a STOP condition on I2C bus"] - #[inline] - pub fn stop(&mut self) -> _STOPW { - _STOPW { w: self } + #[inline(always)] + pub fn stop(&mut self) -> STOP_W { + STOP_W { w: self } } #[doc = "Bit 8 - Generate a START condition on I2C bus"] - #[inline] - pub fn start(&mut self) -> _STARTW { - _STARTW { w: self } + #[inline(always)] + pub fn start(&mut self) -> START_W { + START_W { w: self } } #[doc = "Bit 7 - Whether to stretch SCL low when data is not ready in slave mode"] - #[inline] - pub fn ss(&mut self) -> _SSW { - _SSW { w: self } + #[inline(always)] + pub fn ss(&mut self) -> SS_W { + SS_W { w: self } } #[doc = "Bit 6 - Whether or not to response to a General Call (0x00)"] - #[inline] - pub fn gcen(&mut self) -> _GCENW { - _GCENW { w: self } + #[inline(always)] + pub fn gcen(&mut self) -> GCEN_W { + GCEN_W { w: self } } #[doc = "Bit 5 - PEC Calculation Switch"] - #[inline] - pub fn pecen(&mut self) -> _PECENW { - _PECENW { w: self } + #[inline(always)] + pub fn pecen(&mut self) -> PECEN_W { + PECEN_W { w: self } } #[doc = "Bit 4 - ARP protocol in SMBus switch"] - #[inline] - pub fn arpen(&mut self) -> _ARPENW { - _ARPENW { w: self } + #[inline(always)] + pub fn arpen(&mut self) -> ARPEN_W { + ARPEN_W { w: self } } #[doc = "Bit 3 - SMBusType Selection"] - #[inline] - pub fn smbsel(&mut self) -> _SMBSELW { - _SMBSELW { w: self } + #[inline(always)] + pub fn smbsel(&mut self) -> SMBSEL_W { + SMBSEL_W { w: self } } #[doc = "Bit 1 - SMBus/I2C mode switch"] - #[inline] - pub fn smben(&mut self) -> _SMBENW { - _SMBENW { w: self } + #[inline(always)] + pub fn smben(&mut self) -> SMBEN_W { + SMBEN_W { w: self } } #[doc = "Bit 0 - I2C peripheral enable"] - #[inline] - pub fn i2cen(&mut self) -> _I2CENW { - _I2CENW { w: self } + #[inline(always)] + pub fn i2cen(&mut self) -> I2CEN_W { + I2CEN_W { w: self } } } diff --git a/src/i2c0/ctl1.rs b/src/i2c0/ctl1.rs index dfebaf1bd3b3e7ec3c7730ab4567a74eceb616e0..cdc940f11ff6b48fb219a229f4b3ed1267d73da2 100644 --- a/src/i2c0/ctl1.rs +++ b/src/i2c0/ctl1.rs @@ -1,400 +1,210 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CTL1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DMALSTR { - bits: bool, -} -impl DMALSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DMAONR { - bits: bool, -} -impl DMAONR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BUFIER { - bits: bool, -} -impl BUFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EVIER { - bits: bool, -} -impl EVIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct I2CCLKR { - bits: u8, -} -impl I2CCLKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DMALSTW<'a> { +#[doc = "Reader of register CTL1"] +pub type R = crate::R; +#[doc = "Writer for register CTL1"] +pub type W = crate::W; +#[doc = "Register CTL1 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL1 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DMALST`"] +pub type DMALST_R = crate::R; +#[doc = "Write proxy for field `DMALST`"] +pub struct DMALST_W<'a> { w: &'a mut W, } -impl<'a> _DMALSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DMALST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u16) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _DMAONW<'a> { +#[doc = "Reader of field `DMAON`"] +pub type DMAON_R = crate::R; +#[doc = "Write proxy for field `DMAON`"] +pub struct DMAON_W<'a> { w: &'a mut W, } -impl<'a> _DMAONW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DMAON_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u16) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _BUFIEW<'a> { +#[doc = "Reader of field `BUFIE`"] +pub type BUFIE_R = crate::R; +#[doc = "Write proxy for field `BUFIE`"] +pub struct BUFIE_W<'a> { w: &'a mut W, } -impl<'a> _BUFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BUFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u16) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _EVIEW<'a> { +#[doc = "Reader of field `EVIE`"] +pub type EVIE_R = crate::R; +#[doc = "Write proxy for field `EVIE`"] +pub struct EVIE_W<'a> { w: &'a mut W, } -impl<'a> _EVIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EVIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u16) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u16) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _I2CCLKW<'a> { +#[doc = "Reader of field `I2CCLK`"] +pub type I2CCLK_R = crate::R; +#[doc = "Write proxy for field `I2CCLK`"] +pub struct I2CCLK_W<'a> { w: &'a mut W, } -impl<'a> _I2CCLKW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> I2CCLK_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x3f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x3f) | ((value as u16) & 0x3f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 12 - Flag indicating DMA last transfer"] - #[inline] - pub fn dmalst(&self) -> DMALSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - DMALSTR { bits } + #[inline(always)] + pub fn dmalst(&self) -> DMALST_R { + DMALST_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - DMA mode switch"] - #[inline] - pub fn dmaon(&self) -> DMAONR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - DMAONR { bits } + #[inline(always)] + pub fn dmaon(&self) -> DMAON_R { + DMAON_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Buffer interrupt enable"] - #[inline] - pub fn bufie(&self) -> BUFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - BUFIER { bits } + #[inline(always)] + pub fn bufie(&self) -> BUFIE_R { + BUFIE_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Event interrupt enable"] - #[inline] - pub fn evie(&self) -> EVIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - EVIER { bits } + #[inline(always)] + pub fn evie(&self) -> EVIE_R { + EVIE_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Error interrupt enable"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bits 0:5 - I2C Peripheral clock frequency"] - #[inline] - pub fn i2cclk(&self) -> I2CCLKR { - let bits = { - const MASK: u8 = 0x3f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - I2CCLKR { bits } + #[inline(always)] + pub fn i2cclk(&self) -> I2CCLK_R { + I2CCLK_R::new((self.bits & 0x3f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 12 - Flag indicating DMA last transfer"] - #[inline] - pub fn dmalst(&mut self) -> _DMALSTW { - _DMALSTW { w: self } + #[inline(always)] + pub fn dmalst(&mut self) -> DMALST_W { + DMALST_W { w: self } } #[doc = "Bit 11 - DMA mode switch"] - #[inline] - pub fn dmaon(&mut self) -> _DMAONW { - _DMAONW { w: self } + #[inline(always)] + pub fn dmaon(&mut self) -> DMAON_W { + DMAON_W { w: self } } #[doc = "Bit 10 - Buffer interrupt enable"] - #[inline] - pub fn bufie(&mut self) -> _BUFIEW { - _BUFIEW { w: self } + #[inline(always)] + pub fn bufie(&mut self) -> BUFIE_W { + BUFIE_W { w: self } } #[doc = "Bit 9 - Event interrupt enable"] - #[inline] - pub fn evie(&mut self) -> _EVIEW { - _EVIEW { w: self } + #[inline(always)] + pub fn evie(&mut self) -> EVIE_W { + EVIE_W { w: self } } #[doc = "Bit 8 - Error interrupt enable"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } #[doc = "Bits 0:5 - I2C Peripheral clock frequency"] - #[inline] - pub fn i2cclk(&mut self) -> _I2CCLKW { - _I2CCLKW { w: self } + #[inline(always)] + pub fn i2cclk(&mut self) -> I2CCLK_W { + I2CCLK_W { w: self } } } diff --git a/src/i2c0/data.rs b/src/i2c0/data.rs index 3a07310826caa3b5baeed63197662dac6e7b2b5a..3cd03cd6e82e47279450400a6827d9c735b17551 100644 --- a/src/i2c0/data.rs +++ b/src/i2c0/data.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TRBR { - bits: u8, -} -impl TRBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _TRBW<'a> { +#[doc = "Reader of register DATA"] +pub type R = crate::R; +#[doc = "Writer for register DATA"] +pub type W = crate::W; +#[doc = "Register DATA `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TRB`"] +pub type TRB_R = crate::R; +#[doc = "Write proxy for field `TRB`"] +pub struct TRB_W<'a> { w: &'a mut W, } -impl<'a> _TRBW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TRB_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u16) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:7 - Transmission or reception data buffer register"] - #[inline] - pub fn trb(&self) -> TRBR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - TRBR { bits } + #[inline(always)] + pub fn trb(&self) -> TRB_R { + TRB_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:7 - Transmission or reception data buffer register"] - #[inline] - pub fn trb(&mut self) -> _TRBW { - _TRBW { w: self } + #[inline(always)] + pub fn trb(&mut self) -> TRB_W { + TRB_W { w: self } } } diff --git a/src/i2c0/rt.rs b/src/i2c0/rt.rs index 3165f029dbcf38c573d2f6785246736b1a5ef7f7..06e7cda03d70a7bd3745c92cbea85241e0db5824 100644 --- a/src/i2c0/rt.rs +++ b/src/i2c0/rt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::RT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RISETIMER { - bits: u8, -} -impl RISETIMER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _RISETIMEW<'a> { +#[doc = "Reader of register RT"] +pub type R = crate::R; +#[doc = "Writer for register RT"] +pub type W = crate::W; +#[doc = "Register RT `reset()`'s with value 0x02"] +impl crate::ResetValue for super::RT { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x02 + } +} +#[doc = "Reader of field `RISETIME`"] +pub type RISETIME_R = crate::R; +#[doc = "Write proxy for field `RISETIME`"] +pub struct RISETIME_W<'a> { w: &'a mut W, } -impl<'a> _RISETIMEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RISETIME_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x3f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x3f) | ((value as u16) & 0x3f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:5 - Maximum rise time in master mode"] - #[inline] - pub fn risetime(&self) -> RISETIMER { - let bits = { - const MASK: u8 = 0x3f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - RISETIMER { bits } + #[inline(always)] + pub fn risetime(&self) -> RISETIME_R { + RISETIME_R::new((self.bits & 0x3f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x02 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:5 - Maximum rise time in master mode"] - #[inline] - pub fn risetime(&mut self) -> _RISETIMEW { - _RISETIMEW { w: self } + #[inline(always)] + pub fn risetime(&mut self) -> RISETIME_W { + RISETIME_W { w: self } } } diff --git a/src/i2c0/saddr0.rs b/src/i2c0/saddr0.rs index bd91917224a432b691e42f9f5aa4ff6ebf1ea511..bf752da7cbf96460f7495a9da42d4d64ea09998c 100644 --- a/src/i2c0/saddr0.rs +++ b/src/i2c0/saddr0.rs @@ -1,264 +1,132 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::SADDR0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct ADDFORMATR { - bits: bool, -} -impl ADDFORMATR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ADDRESS9_8R { - bits: u8, -} -impl ADDRESS9_8R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ADDRESS7_1R { - bits: u8, -} -impl ADDRESS7_1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ADDRESS0R { - bits: bool, -} -impl ADDRESS0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _ADDFORMATW<'a> { +#[doc = "Reader of register SADDR0"] +pub type R = crate::R; +#[doc = "Writer for register SADDR0"] +pub type W = crate::W; +#[doc = "Register SADDR0 `reset()`'s with value 0"] +impl crate::ResetValue for super::SADDR0 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `ADDFORMAT`"] +pub type ADDFORMAT_R = crate::R; +#[doc = "Write proxy for field `ADDFORMAT`"] +pub struct ADDFORMAT_W<'a> { w: &'a mut W, } -impl<'a> _ADDFORMATW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ADDFORMAT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u16) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _ADDRESS9_8W<'a> { +#[doc = "Reader of field `ADDRESS9_8`"] +pub type ADDRESS9_8_R = crate::R; +#[doc = "Write proxy for field `ADDRESS9_8`"] +pub struct ADDRESS9_8_W<'a> { w: &'a mut W, } -impl<'a> _ADDRESS9_8W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ADDRESS9_8_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u16) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _ADDRESS7_1W<'a> { +#[doc = "Reader of field `ADDRESS7_1`"] +pub type ADDRESS7_1_R = crate::R; +#[doc = "Write proxy for field `ADDRESS7_1`"] +pub struct ADDRESS7_1_W<'a> { w: &'a mut W, } -impl<'a> _ADDRESS7_1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ADDRESS7_1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x7f << 1)) | (((value as u16) & 0x7f) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _ADDRESS0W<'a> { +#[doc = "Reader of field `ADDRESS0`"] +pub type ADDRESS0_R = crate::R; +#[doc = "Write proxy for field `ADDRESS0`"] +pub struct ADDRESS0_W<'a> { w: &'a mut W, } -impl<'a> _ADDRESS0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ADDRESS0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 15 - Address mode for the I2C slave"] - #[inline] - pub fn addformat(&self) -> ADDFORMATR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ADDFORMATR { bits } + #[inline(always)] + pub fn addformat(&self) -> ADDFORMAT_R { + ADDFORMAT_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bits 8:9 - Highest two bits of a 10-bit address"] - #[inline] - pub fn address9_8(&self) -> ADDRESS9_8R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - ADDRESS9_8R { bits } + #[inline(always)] + pub fn address9_8(&self) -> ADDRESS9_8_R { + ADDRESS9_8_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 1:7 - 7-bit address or bits 7:1 of a 10-bit address"] - #[inline] - pub fn address7_1(&self) -> ADDRESS7_1R { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - ADDRESS7_1R { bits } + #[inline(always)] + pub fn address7_1(&self) -> ADDRESS7_1_R { + ADDRESS7_1_R::new(((self.bits >> 1) & 0x7f) as u8) } #[doc = "Bit 0 - Bit 0 of a 10-bit address"] - #[inline] - pub fn address0(&self) -> ADDRESS0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ADDRESS0R { bits } + #[inline(always)] + pub fn address0(&self) -> ADDRESS0_R { + ADDRESS0_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 15 - Address mode for the I2C slave"] - #[inline] - pub fn addformat(&mut self) -> _ADDFORMATW { - _ADDFORMATW { w: self } + #[inline(always)] + pub fn addformat(&mut self) -> ADDFORMAT_W { + ADDFORMAT_W { w: self } } #[doc = "Bits 8:9 - Highest two bits of a 10-bit address"] - #[inline] - pub fn address9_8(&mut self) -> _ADDRESS9_8W { - _ADDRESS9_8W { w: self } + #[inline(always)] + pub fn address9_8(&mut self) -> ADDRESS9_8_W { + ADDRESS9_8_W { w: self } } #[doc = "Bits 1:7 - 7-bit address or bits 7:1 of a 10-bit address"] - #[inline] - pub fn address7_1(&mut self) -> _ADDRESS7_1W { - _ADDRESS7_1W { w: self } + #[inline(always)] + pub fn address7_1(&mut self) -> ADDRESS7_1_W { + ADDRESS7_1_W { w: self } } #[doc = "Bit 0 - Bit 0 of a 10-bit address"] - #[inline] - pub fn address0(&mut self) -> _ADDRESS0W { - _ADDRESS0W { w: self } + #[inline(always)] + pub fn address0(&mut self) -> ADDRESS0_W { + ADDRESS0_W { w: self } } } diff --git a/src/i2c0/saddr1.rs b/src/i2c0/saddr1.rs index a0fcc9654cfafb8402f506e6b61c9ab886579be8..912003344dc2d16d0b0b130527958a089d94a5f8 100644 --- a/src/i2c0/saddr1.rs +++ b/src/i2c0/saddr1.rs @@ -1,164 +1,74 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::SADDR1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct ADDRESS2R { - bits: u8, -} -impl ADDRESS2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits +#[doc = "Reader of register SADDR1"] +pub type R = crate::R; +#[doc = "Writer for register SADDR1"] +pub type W = crate::W; +#[doc = "Register SADDR1 `reset()`'s with value 0"] +impl crate::ResetValue for super::SADDR1 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Value of the field"] -pub struct DUADENR { - bits: bool, -} -impl DUADENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _ADDRESS2W<'a> { +#[doc = "Reader of field `ADDRESS2`"] +pub type ADDRESS2_R = crate::R; +#[doc = "Write proxy for field `ADDRESS2`"] +pub struct ADDRESS2_W<'a> { w: &'a mut W, } -impl<'a> _ADDRESS2W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ADDRESS2_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x7f << 1)) | (((value as u16) & 0x7f) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _DUADENW<'a> { +#[doc = "Reader of field `DUADEN`"] +pub type DUADEN_R = crate::R; +#[doc = "Write proxy for field `DUADEN`"] +pub struct DUADEN_W<'a> { w: &'a mut W, } -impl<'a> _DUADENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DUADEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 1:7 - Second I2C address for the slave in Dual-Address mode"] - #[inline] - pub fn address2(&self) -> ADDRESS2R { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - ADDRESS2R { bits } + #[inline(always)] + pub fn address2(&self) -> ADDRESS2_R { + ADDRESS2_R::new(((self.bits >> 1) & 0x7f) as u8) } #[doc = "Bit 0 - Dual-Address mode switch"] - #[inline] - pub fn duaden(&self) -> DUADENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - DUADENR { bits } + #[inline(always)] + pub fn duaden(&self) -> DUADEN_R { + DUADEN_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 1:7 - Second I2C address for the slave in Dual-Address mode"] - #[inline] - pub fn address2(&mut self) -> _ADDRESS2W { - _ADDRESS2W { w: self } + #[inline(always)] + pub fn address2(&mut self) -> ADDRESS2_W { + ADDRESS2_W { w: self } } #[doc = "Bit 0 - Dual-Address mode switch"] - #[inline] - pub fn duaden(&mut self) -> _DUADENW { - _DUADENW { w: self } + #[inline(always)] + pub fn duaden(&mut self) -> DUADEN_W { + DUADEN_W { w: self } } } diff --git a/src/i2c0/stat0.rs b/src/i2c0/stat0.rs index 8b25ab95e9a7b4da935a39f38b98bd1addf8a7c7..48198522994a6b3a81ad6e9cdca595d08327f2b3 100644 --- a/src/i2c0/stat0.rs +++ b/src/i2c0/stat0.rs @@ -1,694 +1,303 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::STAT0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SMBALTR { - bits: bool, -} -impl SMBALTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SMBTOR { - bits: bool, -} -impl SMBTOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PECERRR { - bits: bool, -} -impl PECERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OUERRR { - bits: bool, -} -impl OUERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct AERRR { - bits: bool, -} -impl AERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LOSTARBR { - bits: bool, -} -impl LOSTARBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BERRR { - bits: bool, -} -impl BERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TBER { - bits: bool, -} -impl TBER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RBNER { - bits: bool, -} -impl RBNER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STPDETR { - bits: bool, -} -impl STPDETR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ADD10SENDR { - bits: bool, -} -impl ADD10SENDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BTCR { - bits: bool, -} -impl BTCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ADDSENDR { - bits: bool, -} -impl ADDSENDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SBSENDR { - bits: bool, -} -impl SBSENDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _SMBALTW<'a> { +#[doc = "Reader of register STAT0"] +pub type R = crate::R; +#[doc = "Writer for register STAT0"] +pub type W = crate::W; +#[doc = "Register STAT0 `reset()`'s with value 0"] +impl crate::ResetValue for super::STAT0 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `SMBALT`"] +pub type SMBALT_R = crate::R; +#[doc = "Write proxy for field `SMBALT`"] +pub struct SMBALT_W<'a> { w: &'a mut W, } -impl<'a> _SMBALTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SMBALT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u16) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _SMBTOW<'a> { +#[doc = "Reader of field `SMBTO`"] +pub type SMBTO_R = crate::R; +#[doc = "Write proxy for field `SMBTO`"] +pub struct SMBTO_W<'a> { w: &'a mut W, } -impl<'a> _SMBTOW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SMBTO_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u16) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _PECERRW<'a> { +#[doc = "Reader of field `PECERR`"] +pub type PECERR_R = crate::R; +#[doc = "Write proxy for field `PECERR`"] +pub struct PECERR_W<'a> { w: &'a mut W, } -impl<'a> _PECERRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PECERR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u16) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _OUERRW<'a> { +#[doc = "Reader of field `OUERR`"] +pub type OUERR_R = crate::R; +#[doc = "Write proxy for field `OUERR`"] +pub struct OUERR_W<'a> { w: &'a mut W, } -impl<'a> _OUERRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OUERR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u16) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _AERRW<'a> { +#[doc = "Reader of field `AERR`"] +pub type AERR_R = crate::R; +#[doc = "Write proxy for field `AERR`"] +pub struct AERR_W<'a> { w: &'a mut W, } -impl<'a> _AERRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> AERR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u16) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _LOSTARBW<'a> { +#[doc = "Reader of field `LOSTARB`"] +pub type LOSTARB_R = crate::R; +#[doc = "Write proxy for field `LOSTARB`"] +pub struct LOSTARB_W<'a> { w: &'a mut W, } -impl<'a> _LOSTARBW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LOSTARB_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u16) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _BERRW<'a> { +#[doc = "Reader of field `BERR`"] +pub type BERR_R = crate::R; +#[doc = "Write proxy for field `BERR`"] +pub struct BERR_W<'a> { w: &'a mut W, } -impl<'a> _BERRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BERR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u16) & 0x01) << 8); self.w } } +#[doc = "Reader of field `TBE`"] +pub type TBE_R = crate::R; +#[doc = "Reader of field `RBNE`"] +pub type RBNE_R = crate::R; +#[doc = "Reader of field `STPDET`"] +pub type STPDET_R = crate::R; +#[doc = "Reader of field `ADD10SEND`"] +pub type ADD10SEND_R = crate::R; +#[doc = "Reader of field `BTC`"] +pub type BTC_R = crate::R; +#[doc = "Reader of field `ADDSEND`"] +pub type ADDSEND_R = crate::R; +#[doc = "Reader of field `SBSEND`"] +pub type SBSEND_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 15 - SMBus Alert status"] - #[inline] - pub fn smbalt(&self) -> SMBALTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - SMBALTR { bits } + #[inline(always)] + pub fn smbalt(&self) -> SMBALT_R { + SMBALT_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 14 - Timeout signal in SMBus mode"] - #[inline] - pub fn smbto(&self) -> SMBTOR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - SMBTOR { bits } + #[inline(always)] + pub fn smbto(&self) -> SMBTO_R { + SMBTO_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 12 - PEC error when receiving data"] - #[inline] - pub fn pecerr(&self) -> PECERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - PECERRR { bits } + #[inline(always)] + pub fn pecerr(&self) -> PECERR_R { + PECERR_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Over-run or under-run situation occurs in slave mode"] - #[inline] - pub fn ouerr(&self) -> OUERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - OUERRR { bits } + #[inline(always)] + pub fn ouerr(&self) -> OUERR_R { + OUERR_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Acknowledge error"] - #[inline] - pub fn aerr(&self) -> AERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - AERRR { bits } + #[inline(always)] + pub fn aerr(&self) -> AERR_R { + AERR_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Arbitration Lost in master mode"] - #[inline] - pub fn lostarb(&self) -> LOSTARBR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - LOSTARBR { bits } + #[inline(always)] + pub fn lostarb(&self) -> LOSTARB_R { + LOSTARB_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - A bus error occurs indication a unexpected START or STOP condition on I2C bus"] - #[inline] - pub fn berr(&self) -> BERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - BERRR { bits } + #[inline(always)] + pub fn berr(&self) -> BERR_R { + BERR_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - I2C_DATA is Empty during transmitting"] - #[inline] - pub fn tbe(&self) -> TBER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TBER { bits } + #[inline(always)] + pub fn tbe(&self) -> TBE_R { + TBE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - I2C_DATA is not Empty during receiving"] - #[inline] - pub fn rbne(&self) -> RBNER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - RBNER { bits } + #[inline(always)] + pub fn rbne(&self) -> RBNE_R { + RBNE_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 4 - STOP condition detected in slave mode"] - #[inline] - pub fn stpdet(&self) -> STPDETR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - STPDETR { bits } + #[inline(always)] + pub fn stpdet(&self) -> STPDET_R { + STPDET_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Header of 10-bit address is sent in master mode"] - #[inline] - pub fn add10send(&self) -> ADD10SENDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ADD10SENDR { bits } + #[inline(always)] + pub fn add10send(&self) -> ADD10SEND_R { + ADD10SEND_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Byte transmission completed"] - #[inline] - pub fn btc(&self) -> BTCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - BTCR { bits } + #[inline(always)] + pub fn btc(&self) -> BTC_R { + BTC_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Address is sent in master mode or received and matches in slave mode"] - #[inline] - pub fn addsend(&self) -> ADDSENDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ADDSENDR { bits } + #[inline(always)] + pub fn addsend(&self) -> ADDSEND_R { + ADDSEND_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - START condition sent out in master mode"] - #[inline] - pub fn sbsend(&self) -> SBSENDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - SBSENDR { bits } + #[inline(always)] + pub fn sbsend(&self) -> SBSEND_R { + SBSEND_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 15 - SMBus Alert status"] - #[inline] - pub fn smbalt(&mut self) -> _SMBALTW { - _SMBALTW { w: self } + #[inline(always)] + pub fn smbalt(&mut self) -> SMBALT_W { + SMBALT_W { w: self } } #[doc = "Bit 14 - Timeout signal in SMBus mode"] - #[inline] - pub fn smbto(&mut self) -> _SMBTOW { - _SMBTOW { w: self } + #[inline(always)] + pub fn smbto(&mut self) -> SMBTO_W { + SMBTO_W { w: self } } #[doc = "Bit 12 - PEC error when receiving data"] - #[inline] - pub fn pecerr(&mut self) -> _PECERRW { - _PECERRW { w: self } + #[inline(always)] + pub fn pecerr(&mut self) -> PECERR_W { + PECERR_W { w: self } } #[doc = "Bit 11 - Over-run or under-run situation occurs in slave mode"] - #[inline] - pub fn ouerr(&mut self) -> _OUERRW { - _OUERRW { w: self } + #[inline(always)] + pub fn ouerr(&mut self) -> OUERR_W { + OUERR_W { w: self } } #[doc = "Bit 10 - Acknowledge error"] - #[inline] - pub fn aerr(&mut self) -> _AERRW { - _AERRW { w: self } + #[inline(always)] + pub fn aerr(&mut self) -> AERR_W { + AERR_W { w: self } } #[doc = "Bit 9 - Arbitration Lost in master mode"] - #[inline] - pub fn lostarb(&mut self) -> _LOSTARBW { - _LOSTARBW { w: self } + #[inline(always)] + pub fn lostarb(&mut self) -> LOSTARB_W { + LOSTARB_W { w: self } } #[doc = "Bit 8 - A bus error occurs indication a unexpected START or STOP condition on I2C bus"] - #[inline] - pub fn berr(&mut self) -> _BERRW { - _BERRW { w: self } + #[inline(always)] + pub fn berr(&mut self) -> BERR_W { + BERR_W { w: self } } } diff --git a/src/i2c0/stat1.rs b/src/i2c0/stat1.rs index 1a8655b344bce1afe267cc5ae707b1404142a1c3..91a9479a60f37272b9457519e6449c8a4a6d9d3f 100644 --- a/src/i2c0/stat1.rs +++ b/src/i2c0/stat1.rs @@ -1,258 +1,60 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -impl super::STAT1 { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct PECVR { - bits: u8, -} -impl PECVR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DUMODFR { - bits: bool, -} -impl DUMODFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HSTSMBR { - bits: bool, -} -impl HSTSMBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DEFSMBR { - bits: bool, -} -impl DEFSMBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RXGCR { - bits: bool, -} -impl RXGCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TRR { - bits: bool, -} -impl TRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct I2CBSYR { - bits: bool, -} -impl I2CBSYR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MASTERR { - bits: bool, -} -impl MASTERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} +#[doc = "Reader of register STAT1"] +pub type R = crate::R; +#[doc = "Reader of field `PECV`"] +pub type PECV_R = crate::R; +#[doc = "Reader of field `DUMODF`"] +pub type DUMODF_R = crate::R; +#[doc = "Reader of field `HSTSMB`"] +pub type HSTSMB_R = crate::R; +#[doc = "Reader of field `DEFSMB`"] +pub type DEFSMB_R = crate::R; +#[doc = "Reader of field `RXGC`"] +pub type RXGC_R = crate::R; +#[doc = "Reader of field `TR`"] +pub type TR_R = crate::R; +#[doc = "Reader of field `I2CBSY`"] +pub type I2CBSY_R = crate::R; +#[doc = "Reader of field `MASTER`"] +pub type MASTER_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 8:15 - Packet Error Checking Value that calculated by hardware when PEC is enabled"] - #[inline] - pub fn pecv(&self) -> PECVR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - PECVR { bits } + #[inline(always)] + pub fn pecv(&self) -> PECV_R { + PECV_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bit 7 - Dual Flag in slave mode"] - #[inline] - pub fn dumodf(&self) -> DUMODFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - DUMODFR { bits } + #[inline(always)] + pub fn dumodf(&self) -> DUMODF_R { + DUMODF_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - SMBus Host Header detected in slave mode"] - #[inline] - pub fn hstsmb(&self) -> HSTSMBR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - HSTSMBR { bits } + #[inline(always)] + pub fn hstsmb(&self) -> HSTSMB_R { + HSTSMB_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Default address of SMBusDevice"] - #[inline] - pub fn defsmb(&self) -> DEFSMBR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - DEFSMBR { bits } + #[inline(always)] + pub fn defsmb(&self) -> DEFSMB_R { + DEFSMB_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - General call address (00h) received"] - #[inline] - pub fn rxgc(&self) -> RXGCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - RXGCR { bits } + #[inline(always)] + pub fn rxgc(&self) -> RXGC_R { + RXGC_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 2 - Whether the I2C is a transmitter or a receiver"] - #[inline] - pub fn tr(&self) -> TRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TRR { bits } + #[inline(always)] + pub fn tr(&self) -> TR_R { + TR_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Busy flag"] - #[inline] - pub fn i2cbsy(&self) -> I2CBSYR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - I2CBSYR { bits } + #[inline(always)] + pub fn i2cbsy(&self) -> I2CBSY_R { + I2CBSY_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - A flag indicating whether I2C block is in master or slave mode"] - #[inline] - pub fn master(&self) -> MASTERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - MASTERR { bits } + #[inline(always)] + pub fn master(&self) -> MASTER_R { + MASTER_R::new((self.bits & 0x01) != 0) } } diff --git a/src/interrupt.rs b/src/interrupt.rs index 3fc3befce7bae1068a4106a5cb45f50966de8921..900f91b2489af149815e0e83c110144fc508e81a 100644 --- a/src/interrupt.rs +++ b/src/interrupt.rs @@ -1,4 +1,4 @@ -#[doc = r" Enumeration of all the interrupts"] +#[doc = r"Enumeration of all the interrupts"] #[derive(Copy, Clone, Debug)] pub enum Interrupt { #[doc = "0 - WWDGT"] @@ -118,7 +118,7 @@ pub enum Interrupt { #[doc = "86 - USBFS"] USBFS, } -unsafe impl ::bare_metal::Nr for Interrupt { +unsafe impl bare_metal::Nr for Interrupt { #[inline] fn nr(&self) -> u8 { match *self { diff --git a/src/lib.rs b/src/lib.rs index c94c29e7142d0bbf976c81846f7d8614d58fddc3..3140c92fd898c1af5f4cce7af868c6f367e0ff3c 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -#![doc = "Peripheral access API for GD32VF103 microcontrollers (generated using svd2rust v0.14.0)\n\nYou can find an overview of the API [here].\n\n[here]: https://docs.rs/svd2rust/0.14.0/svd2rust/#peripheral-api"] +#![doc = "Peripheral access API for GD32VF103 microcontrollers (generated using svd2rust v0.16.1)\n\nYou can find an overview of the API [here].\n\n[here]: https://docs.rs/svd2rust/0.16.1/svd2rust/#peripheral-api"] #![deny(missing_docs)] #![deny(warnings)] #![allow(non_camel_case_types)] @@ -10,25 +10,30 @@ extern crate riscv_rt; extern crate vcell; use core::marker::PhantomData; use core::ops::Deref; -#[doc = r" Number available in the NVIC for configuring priority"] +#[doc = r"Number available in the NVIC for configuring priority"] pub const NVIC_PRIO_BITS: u8 = 4; #[doc(hidden)] pub mod interrupt; pub use self::interrupt::Interrupt; +#[allow(unused_imports)] +use generic::*; +#[doc = r"Common register and bit access and modify traits"] +pub mod generic; #[doc = "Analog to digital converter"] pub struct ADC0 { _marker: PhantomData<*const ()>, } unsafe impl Send for ADC0 {} impl ADC0 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const adc0::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const adc0::RegisterBlock { 0x4001_2400 as *const _ } } impl Deref for ADC0 { type Target = adc0::RegisterBlock; - fn deref(&self) -> &adc0::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*ADC0::ptr() } } } @@ -40,14 +45,15 @@ pub struct ADC1 { } unsafe impl Send for ADC1 {} impl ADC1 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const adc1::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const adc1::RegisterBlock { 0x4001_2800 as *const _ } } impl Deref for ADC1 { type Target = adc1::RegisterBlock; - fn deref(&self) -> &adc1::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*ADC1::ptr() } } } @@ -59,14 +65,15 @@ pub struct AFIO { } unsafe impl Send for AFIO {} impl AFIO { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const afio::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const afio::RegisterBlock { 0x4001_0000 as *const _ } } impl Deref for AFIO { type Target = afio::RegisterBlock; - fn deref(&self) -> &afio::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*AFIO::ptr() } } } @@ -78,14 +85,15 @@ pub struct BKP { } unsafe impl Send for BKP {} impl BKP { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const bkp::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const bkp::RegisterBlock { 0x4000_6c00 as *const _ } } impl Deref for BKP { type Target = bkp::RegisterBlock; - fn deref(&self) -> &bkp::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*BKP::ptr() } } } @@ -97,33 +105,35 @@ pub struct CAN0 { } unsafe impl Send for CAN0 {} impl CAN0 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const can0::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const can0::RegisterBlock { 0x4000_6400 as *const _ } } impl Deref for CAN0 { type Target = can0::RegisterBlock; - fn deref(&self) -> &can0::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*CAN0::ptr() } } } #[doc = "Controller area network"] pub mod can0; -#[doc = "CAN1"] +#[doc = "Controller area network"] pub struct CAN1 { _marker: PhantomData<*const ()>, } unsafe impl Send for CAN1 {} impl CAN1 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const can0::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const can0::RegisterBlock { 0x4000_6800 as *const _ } } impl Deref for CAN1 { type Target = can0::RegisterBlock; - fn deref(&self) -> &can0::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*CAN1::ptr() } } } @@ -133,14 +143,15 @@ pub struct CRC { } unsafe impl Send for CRC {} impl CRC { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const crc::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const crc::RegisterBlock { 0x4002_3000 as *const _ } } impl Deref for CRC { type Target = crc::RegisterBlock; - fn deref(&self) -> &crc::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*CRC::ptr() } } } @@ -152,14 +163,15 @@ pub struct DAC { } unsafe impl Send for DAC {} impl DAC { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const dac::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const dac::RegisterBlock { 0x4000_7400 as *const _ } } impl Deref for DAC { type Target = dac::RegisterBlock; - fn deref(&self) -> &dac::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*DAC::ptr() } } } @@ -171,14 +183,15 @@ pub struct DBG { } unsafe impl Send for DBG {} impl DBG { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const dbg::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const dbg::RegisterBlock { 0xe004_2000 as *const _ } } impl Deref for DBG { type Target = dbg::RegisterBlock; - fn deref(&self) -> &dbg::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*DBG::ptr() } } } @@ -190,14 +203,15 @@ pub struct DMA0 { } unsafe impl Send for DMA0 {} impl DMA0 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const dma0::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const dma0::RegisterBlock { 0x4002_0000 as *const _ } } impl Deref for DMA0 { type Target = dma0::RegisterBlock; - fn deref(&self) -> &dma0::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*DMA0::ptr() } } } @@ -209,14 +223,15 @@ pub struct DMA1 { } unsafe impl Send for DMA1 {} impl DMA1 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const dma1::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const dma1::RegisterBlock { 0x4002_0000 as *const _ } } impl Deref for DMA1 { type Target = dma1::RegisterBlock; - fn deref(&self) -> &dma1::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*DMA1::ptr() } } } @@ -228,14 +243,15 @@ pub struct EXMC { } unsafe impl Send for EXMC {} impl EXMC { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const exmc::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const exmc::RegisterBlock { 0xa000_0000 as *const _ } } impl Deref for EXMC { type Target = exmc::RegisterBlock; - fn deref(&self) -> &exmc::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*EXMC::ptr() } } } @@ -247,14 +263,15 @@ pub struct EXTI { } unsafe impl Send for EXTI {} impl EXTI { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const exti::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const exti::RegisterBlock { 0x4001_0400 as *const _ } } impl Deref for EXTI { type Target = exti::RegisterBlock; - fn deref(&self) -> &exti::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*EXTI::ptr() } } } @@ -266,14 +283,15 @@ pub struct FMC { } unsafe impl Send for FMC {} impl FMC { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const fmc::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const fmc::RegisterBlock { 0x4002_2000 as *const _ } } impl Deref for FMC { type Target = fmc::RegisterBlock; - fn deref(&self) -> &fmc::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*FMC::ptr() } } } @@ -285,14 +303,15 @@ pub struct FWDGT { } unsafe impl Send for FWDGT {} impl FWDGT { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const fwdgt::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const fwdgt::RegisterBlock { 0x4000_3000 as *const _ } } impl Deref for FWDGT { type Target = fwdgt::RegisterBlock; - fn deref(&self) -> &fwdgt::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*FWDGT::ptr() } } } @@ -304,84 +323,89 @@ pub struct GPIOA { } unsafe impl Send for GPIOA {} impl GPIOA { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const gpioa::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const gpioa::RegisterBlock { 0x4001_0800 as *const _ } } impl Deref for GPIOA { type Target = gpioa::RegisterBlock; - fn deref(&self) -> &gpioa::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*GPIOA::ptr() } } } #[doc = "General-purpose I/Os"] pub mod gpioa; -#[doc = "GPIOB"] +#[doc = "General-purpose I/Os"] pub struct GPIOB { _marker: PhantomData<*const ()>, } unsafe impl Send for GPIOB {} impl GPIOB { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const gpioa::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const gpioa::RegisterBlock { 0x4001_0c00 as *const _ } } impl Deref for GPIOB { type Target = gpioa::RegisterBlock; - fn deref(&self) -> &gpioa::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*GPIOB::ptr() } } } -#[doc = "GPIOC"] +#[doc = "General-purpose I/Os"] pub struct GPIOC { _marker: PhantomData<*const ()>, } unsafe impl Send for GPIOC {} impl GPIOC { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const gpioa::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const gpioa::RegisterBlock { 0x4001_1000 as *const _ } } impl Deref for GPIOC { type Target = gpioa::RegisterBlock; - fn deref(&self) -> &gpioa::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*GPIOC::ptr() } } } -#[doc = "GPIOD"] +#[doc = "General-purpose I/Os"] pub struct GPIOD { _marker: PhantomData<*const ()>, } unsafe impl Send for GPIOD {} impl GPIOD { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const gpioa::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const gpioa::RegisterBlock { 0x4001_1400 as *const _ } } impl Deref for GPIOD { type Target = gpioa::RegisterBlock; - fn deref(&self) -> &gpioa::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*GPIOD::ptr() } } } -#[doc = "GPIOE"] +#[doc = "General-purpose I/Os"] pub struct GPIOE { _marker: PhantomData<*const ()>, } unsafe impl Send for GPIOE {} impl GPIOE { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const gpioa::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const gpioa::RegisterBlock { 0x4001_1800 as *const _ } } impl Deref for GPIOE { type Target = gpioa::RegisterBlock; - fn deref(&self) -> &gpioa::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*GPIOE::ptr() } } } @@ -391,33 +415,35 @@ pub struct I2C0 { } unsafe impl Send for I2C0 {} impl I2C0 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const i2c0::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const i2c0::RegisterBlock { 0x4000_5400 as *const _ } } impl Deref for I2C0 { type Target = i2c0::RegisterBlock; - fn deref(&self) -> &i2c0::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*I2C0::ptr() } } } #[doc = "Inter integrated circuit"] pub mod i2c0; -#[doc = "I2C1"] +#[doc = "Inter integrated circuit"] pub struct I2C1 { _marker: PhantomData<*const ()>, } unsafe impl Send for I2C1 {} impl I2C1 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const i2c0::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const i2c0::RegisterBlock { 0x4000_5800 as *const _ } } impl Deref for I2C1 { type Target = i2c0::RegisterBlock; - fn deref(&self) -> &i2c0::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*I2C1::ptr() } } } @@ -427,14 +453,15 @@ pub struct ECLIC { } unsafe impl Send for ECLIC {} impl ECLIC { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const eclic::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const eclic::RegisterBlock { 0xd200_0000 as *const _ } } impl Deref for ECLIC { type Target = eclic::RegisterBlock; - fn deref(&self) -> &eclic::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*ECLIC::ptr() } } } @@ -446,14 +473,15 @@ pub struct PMU { } unsafe impl Send for PMU {} impl PMU { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const pmu::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const pmu::RegisterBlock { 0x4000_7000 as *const _ } } impl Deref for PMU { type Target = pmu::RegisterBlock; - fn deref(&self) -> &pmu::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*PMU::ptr() } } } @@ -465,14 +493,15 @@ pub struct RCU { } unsafe impl Send for RCU {} impl RCU { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const rcu::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const rcu::RegisterBlock { 0x4002_1000 as *const _ } } impl Deref for RCU { type Target = rcu::RegisterBlock; - fn deref(&self) -> &rcu::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*RCU::ptr() } } } @@ -484,14 +513,15 @@ pub struct RTC { } unsafe impl Send for RTC {} impl RTC { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const rtc::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const rtc::RegisterBlock { 0x4000_2800 as *const _ } } impl Deref for RTC { type Target = rtc::RegisterBlock; - fn deref(&self) -> &rtc::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*RTC::ptr() } } } @@ -503,50 +533,53 @@ pub struct SPI0 { } unsafe impl Send for SPI0 {} impl SPI0 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const spi0::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const spi0::RegisterBlock { 0x4001_3000 as *const _ } } impl Deref for SPI0 { type Target = spi0::RegisterBlock; - fn deref(&self) -> &spi0::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*SPI0::ptr() } } } #[doc = "Serial peripheral interface"] pub mod spi0; -#[doc = "SPI1"] +#[doc = "Serial peripheral interface"] pub struct SPI1 { _marker: PhantomData<*const ()>, } unsafe impl Send for SPI1 {} impl SPI1 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const spi0::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const spi0::RegisterBlock { 0x4000_3800 as *const _ } } impl Deref for SPI1 { type Target = spi0::RegisterBlock; - fn deref(&self) -> &spi0::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*SPI1::ptr() } } } -#[doc = "SPI2"] +#[doc = "Serial peripheral interface"] pub struct SPI2 { _marker: PhantomData<*const ()>, } unsafe impl Send for SPI2 {} impl SPI2 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const spi0::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const spi0::RegisterBlock { 0x4000_3c00 as *const _ } } impl Deref for SPI2 { type Target = spi0::RegisterBlock; - fn deref(&self) -> &spi0::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*SPI2::ptr() } } } @@ -556,14 +589,15 @@ pub struct TIMER0 { } unsafe impl Send for TIMER0 {} impl TIMER0 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const timer0::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const timer0::RegisterBlock { 0x4001_2c00 as *const _ } } impl Deref for TIMER0 { type Target = timer0::RegisterBlock; - fn deref(&self) -> &timer0::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*TIMER0::ptr() } } } @@ -575,67 +609,71 @@ pub struct TIMER1 { } unsafe impl Send for TIMER1 {} impl TIMER1 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const timer1::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const timer1::RegisterBlock { 0x4000_0000 as *const _ } } impl Deref for TIMER1 { type Target = timer1::RegisterBlock; - fn deref(&self) -> &timer1::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*TIMER1::ptr() } } } #[doc = "General-purpose-timers"] pub mod timer1; -#[doc = "TIMER2"] +#[doc = "General-purpose-timers"] pub struct TIMER2 { _marker: PhantomData<*const ()>, } unsafe impl Send for TIMER2 {} impl TIMER2 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const timer1::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const timer1::RegisterBlock { 0x4000_0400 as *const _ } } impl Deref for TIMER2 { type Target = timer1::RegisterBlock; - fn deref(&self) -> &timer1::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*TIMER2::ptr() } } } -#[doc = "TIMER3"] +#[doc = "General-purpose-timers"] pub struct TIMER3 { _marker: PhantomData<*const ()>, } unsafe impl Send for TIMER3 {} impl TIMER3 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const timer1::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const timer1::RegisterBlock { 0x4000_0800 as *const _ } } impl Deref for TIMER3 { type Target = timer1::RegisterBlock; - fn deref(&self) -> &timer1::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*TIMER3::ptr() } } } -#[doc = "TIMER4"] +#[doc = "General-purpose-timers"] pub struct TIMER4 { _marker: PhantomData<*const ()>, } unsafe impl Send for TIMER4 {} impl TIMER4 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const timer1::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const timer1::RegisterBlock { 0x4000_0c00 as *const _ } } impl Deref for TIMER4 { type Target = timer1::RegisterBlock; - fn deref(&self) -> &timer1::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*TIMER4::ptr() } } } @@ -645,33 +683,35 @@ pub struct TIMER5 { } unsafe impl Send for TIMER5 {} impl TIMER5 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const timer5::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const timer5::RegisterBlock { 0x4000_1000 as *const _ } } impl Deref for TIMER5 { type Target = timer5::RegisterBlock; - fn deref(&self) -> &timer5::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*TIMER5::ptr() } } } #[doc = "Basic-timers"] pub mod timer5; -#[doc = "TIMER6"] +#[doc = "Basic-timers"] pub struct TIMER6 { _marker: PhantomData<*const ()>, } unsafe impl Send for TIMER6 {} impl TIMER6 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const timer5::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const timer5::RegisterBlock { 0x4000_1400 as *const _ } } impl Deref for TIMER6 { type Target = timer5::RegisterBlock; - fn deref(&self) -> &timer5::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*TIMER6::ptr() } } } @@ -681,50 +721,53 @@ pub struct USART0 { } unsafe impl Send for USART0 {} impl USART0 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const usart0::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const usart0::RegisterBlock { 0x4001_3800 as *const _ } } impl Deref for USART0 { type Target = usart0::RegisterBlock; - fn deref(&self) -> &usart0::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*USART0::ptr() } } } #[doc = "Universal synchronous asynchronous receiver transmitter"] pub mod usart0; -#[doc = "USART1"] +#[doc = "Universal synchronous asynchronous receiver transmitter"] pub struct USART1 { _marker: PhantomData<*const ()>, } unsafe impl Send for USART1 {} impl USART1 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const usart0::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const usart0::RegisterBlock { 0x4000_4400 as *const _ } } impl Deref for USART1 { type Target = usart0::RegisterBlock; - fn deref(&self) -> &usart0::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*USART1::ptr() } } } -#[doc = "USART2"] +#[doc = "Universal synchronous asynchronous receiver transmitter"] pub struct USART2 { _marker: PhantomData<*const ()>, } unsafe impl Send for USART2 {} impl USART2 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const usart0::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const usart0::RegisterBlock { 0x4000_4800 as *const _ } } impl Deref for USART2 { type Target = usart0::RegisterBlock; - fn deref(&self) -> &usart0::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*USART2::ptr() } } } @@ -734,33 +777,35 @@ pub struct UART3 { } unsafe impl Send for UART3 {} impl UART3 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const uart3::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const uart3::RegisterBlock { 0x4000_4c00 as *const _ } } impl Deref for UART3 { type Target = uart3::RegisterBlock; - fn deref(&self) -> &uart3::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*UART3::ptr() } } } #[doc = "Universal asynchronous receiver transmitter"] pub mod uart3; -#[doc = "UART4"] +#[doc = "Universal asynchronous receiver transmitter"] pub struct UART4 { _marker: PhantomData<*const ()>, } unsafe impl Send for UART4 {} impl UART4 { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const uart3::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const uart3::RegisterBlock { 0x4000_5000 as *const _ } } impl Deref for UART4 { type Target = uart3::RegisterBlock; - fn deref(&self) -> &uart3::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*UART4::ptr() } } } @@ -770,14 +815,15 @@ pub struct USBFS_GLOBAL { } unsafe impl Send for USBFS_GLOBAL {} impl USBFS_GLOBAL { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const usbfs_global::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const usbfs_global::RegisterBlock { 0x5000_0000 as *const _ } } impl Deref for USBFS_GLOBAL { type Target = usbfs_global::RegisterBlock; - fn deref(&self) -> &usbfs_global::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*USBFS_GLOBAL::ptr() } } } @@ -789,14 +835,15 @@ pub struct USBFS_HOST { } unsafe impl Send for USBFS_HOST {} impl USBFS_HOST { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const usbfs_host::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const usbfs_host::RegisterBlock { 0x5000_0400 as *const _ } } impl Deref for USBFS_HOST { type Target = usbfs_host::RegisterBlock; - fn deref(&self) -> &usbfs_host::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*USBFS_HOST::ptr() } } } @@ -808,14 +855,15 @@ pub struct USBFS_DEVICE { } unsafe impl Send for USBFS_DEVICE {} impl USBFS_DEVICE { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const usbfs_device::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const usbfs_device::RegisterBlock { 0x5000_0800 as *const _ } } impl Deref for USBFS_DEVICE { type Target = usbfs_device::RegisterBlock; - fn deref(&self) -> &usbfs_device::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*USBFS_DEVICE::ptr() } } } @@ -827,14 +875,15 @@ pub struct USBFS_PWRCLK { } unsafe impl Send for USBFS_PWRCLK {} impl USBFS_PWRCLK { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const usbfs_pwrclk::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const usbfs_pwrclk::RegisterBlock { 0x5000_0e00 as *const _ } } impl Deref for USBFS_PWRCLK { type Target = usbfs_pwrclk::RegisterBlock; - fn deref(&self) -> &usbfs_pwrclk::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*USBFS_PWRCLK::ptr() } } } @@ -846,14 +895,15 @@ pub struct WWDGT { } unsafe impl Send for WWDGT {} impl WWDGT { - #[doc = r" Returns a pointer to the register block"] - pub fn ptr() -> *const wwdgt::RegisterBlock { + #[doc = r"Returns a pointer to the register block"] + #[inline(always)] + pub const fn ptr() -> *const wwdgt::RegisterBlock { 0x4000_2c00 as *const _ } } impl Deref for WWDGT { type Target = wwdgt::RegisterBlock; - fn deref(&self) -> &wwdgt::RegisterBlock { + fn deref(&self) -> &Self::Target { unsafe { &*WWDGT::ptr() } } } @@ -861,7 +911,7 @@ impl Deref for WWDGT { pub mod wwdgt; #[no_mangle] static mut DEVICE_PERIPHERALS: bool = false; -#[doc = r" All the peripherals"] +#[doc = r"All the peripherals"] #[allow(non_snake_case)] pub struct Peripherals { #[doc = "ADC0"] @@ -958,7 +1008,7 @@ pub struct Peripherals { pub WWDGT: WWDGT, } impl Peripherals { - #[doc = r" Returns all the peripherals *once*"] + #[doc = r"Returns all the peripherals *once*"] #[inline] pub fn take() -> Option { riscv::interrupt::free(|_| { @@ -969,7 +1019,7 @@ impl Peripherals { } }) } - #[doc = r" Unchecked version of `Peripherals::take`"] + #[doc = r"Unchecked version of `Peripherals::take`"] pub unsafe fn steal() -> Self { DEVICE_PERIPHERALS = true; Peripherals { diff --git a/src/pmu.rs b/src/pmu.rs index 2235eb32929772ed3f5eb6bcbf17d7e208e681a1..1f686a6a603b4eb373479496a12f41c7c62828d5 100644 --- a/src/pmu.rs +++ b/src/pmu.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - power control register"] @@ -6,15 +6,25 @@ pub struct RegisterBlock { #[doc = "0x04 - power control/status register"] pub cs: CS, } -#[doc = "power control register"] -pub struct CTL { - register: ::vcell::VolatileCell, -} +#[doc = "power control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl](ctl) module"] +pub type CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL; +#[doc = "`read()` method returns [ctl::R](ctl::R) reader structure"] +impl crate::Readable for CTL {} +#[doc = "`write(|w| ..)` method takes [ctl::W](ctl::W) writer structure"] +impl crate::Writable for CTL {} #[doc = "power control register"] pub mod ctl; -#[doc = "power control/status register"] -pub struct CS { - register: ::vcell::VolatileCell, -} +#[doc = "power control/status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cs](cs) module"] +pub type CS = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CS; +#[doc = "`read()` method returns [cs::R](cs::R) reader structure"] +impl crate::Readable for CS {} +#[doc = "`write(|w| ..)` method takes [cs::W](cs::W) writer structure"] +impl crate::Writable for CS {} #[doc = "power control/status register"] pub mod cs; diff --git a/src/pmu/cs.rs b/src/pmu/cs.rs index 2507da4621ee1afc2a6d5d7d4f77c9d250ef4648..473f3e193a5cac4150d65233e6223e9326bd2cf5 100644 --- a/src/pmu/cs.rs +++ b/src/pmu/cs.rs @@ -1,216 +1,71 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CS { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct WUPENR { - bits: bool, -} -impl WUPENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LVDFR { - bits: bool, -} -impl LVDFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() +#[doc = "Reader of register CS"] +pub type R = crate::R; +#[doc = "Writer for register CS"] +pub type W = crate::W; +#[doc = "Register CS `reset()`'s with value 0"] +impl crate::ResetValue for super::CS { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STBFR { - bits: bool, -} -impl STBFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WUFR { - bits: bool, } -impl WUFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _WUPENW<'a> { +#[doc = "Reader of field `WUPEN`"] +pub type WUPEN_R = crate::R; +#[doc = "Write proxy for field `WUPEN`"] +pub struct WUPEN_W<'a> { w: &'a mut W, } -impl<'a> _WUPENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WUPEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } +#[doc = "Reader of field `LVDF`"] +pub type LVDF_R = crate::R; +#[doc = "Reader of field `STBF`"] +pub type STBF_R = crate::R; +#[doc = "Reader of field `WUF`"] +pub type WUF_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 8 - Enable WKUP pin"] - #[inline] - pub fn wupen(&self) -> WUPENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WUPENR { bits } + #[inline(always)] + pub fn wupen(&self) -> WUPEN_R { + WUPEN_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 2 - Low Voltage Detector Status Flag"] - #[inline] - pub fn lvdf(&self) -> LVDFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LVDFR { bits } + #[inline(always)] + pub fn lvdf(&self) -> LVDF_R { + LVDF_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Standby flag"] - #[inline] - pub fn stbf(&self) -> STBFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STBFR { bits } + #[inline(always)] + pub fn stbf(&self) -> STBF_R { + STBF_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Wakeup flag"] - #[inline] - pub fn wuf(&self) -> WUFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WUFR { bits } + #[inline(always)] + pub fn wuf(&self) -> WUF_R { + WUF_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 8 - Enable WKUP pin"] - #[inline] - pub fn wupen(&mut self) -> _WUPENW { - _WUPENW { w: self } + #[inline(always)] + pub fn wupen(&mut self) -> WUPEN_W { + WUPEN_W { w: self } } } diff --git a/src/pmu/ctl.rs b/src/pmu/ctl.rs index a9fedd99a665ef6663853f0b2e1f97fcf69f1cb6..6a57143666d01b77a8021475be5d63475fb73ca8 100644 --- a/src/pmu/ctl.rs +++ b/src/pmu/ctl.rs @@ -1,459 +1,244 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct BKPWENR { - bits: bool, -} -impl BKPWENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LVDTR { - bits: u8, -} -impl LVDTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct LVDENR { - bits: bool, -} -impl LVDENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STBRSTR { - bits: bool, -} -impl STBRSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WURSTR { - bits: bool, -} -impl WURSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STBMODR { - bits: bool, -} -impl STBMODR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LDOLPR { - bits: bool, -} -impl LDOLPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _BKPWENW<'a> { +#[doc = "Reader of register CTL"] +pub type R = crate::R; +#[doc = "Writer for register CTL"] +pub type W = crate::W; +#[doc = "Register CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `BKPWEN`"] +pub type BKPWEN_R = crate::R; +#[doc = "Write proxy for field `BKPWEN`"] +pub struct BKPWEN_W<'a> { w: &'a mut W, } -impl<'a> _BKPWENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BKPWEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _LVDTW<'a> { +#[doc = "Reader of field `LVDT`"] +pub type LVDT_R = crate::R; +#[doc = "Write proxy for field `LVDT`"] +pub struct LVDT_W<'a> { w: &'a mut W, } -impl<'a> _LVDTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> LVDT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 5)) | (((value as u32) & 0x07) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _LVDENW<'a> { +#[doc = "Reader of field `LVDEN`"] +pub type LVDEN_R = crate::R; +#[doc = "Write proxy for field `LVDEN`"] +pub struct LVDEN_W<'a> { w: &'a mut W, } -impl<'a> _LVDENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LVDEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _STBRSTW<'a> { +#[doc = "Reader of field `STBRST`"] +pub type STBRST_R = crate::R; +#[doc = "Write proxy for field `STBRST`"] +pub struct STBRST_W<'a> { w: &'a mut W, } -impl<'a> _STBRSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STBRST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _WURSTW<'a> { +#[doc = "Reader of field `WURST`"] +pub type WURST_R = crate::R; +#[doc = "Write proxy for field `WURST`"] +pub struct WURST_W<'a> { w: &'a mut W, } -impl<'a> _WURSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WURST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _STBMODW<'a> { +#[doc = "Reader of field `STBMOD`"] +pub type STBMOD_R = crate::R; +#[doc = "Write proxy for field `STBMOD`"] +pub struct STBMOD_W<'a> { w: &'a mut W, } -impl<'a> _STBMODW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STBMOD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _LDOLPW<'a> { +#[doc = "Reader of field `LDOLP`"] +pub type LDOLP_R = crate::R; +#[doc = "Write proxy for field `LDOLP`"] +pub struct LDOLP_W<'a> { w: &'a mut W, } -impl<'a> _LDOLPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LDOLP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 8 - Backup Domain Write Enable"] - #[inline] - pub fn bkpwen(&self) -> BKPWENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BKPWENR { bits } + #[inline(always)] + pub fn bkpwen(&self) -> BKPWEN_R { + BKPWEN_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bits 5:7 - Low Voltage Detector Threshold"] - #[inline] - pub fn lvdt(&self) -> LVDTR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - LVDTR { bits } + #[inline(always)] + pub fn lvdt(&self) -> LVDT_R { + LVDT_R::new(((self.bits >> 5) & 0x07) as u8) } #[doc = "Bit 4 - Low Voltage Detector Enable"] - #[inline] - pub fn lvden(&self) -> LVDENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LVDENR { bits } + #[inline(always)] + pub fn lvden(&self) -> LVDEN_R { + LVDEN_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Standby Flag Reset"] - #[inline] - pub fn stbrst(&self) -> STBRSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STBRSTR { bits } + #[inline(always)] + pub fn stbrst(&self) -> STBRST_R { + STBRST_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Wakeup Flag Reset"] - #[inline] - pub fn wurst(&self) -> WURSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WURSTR { bits } + #[inline(always)] + pub fn wurst(&self) -> WURST_R { + WURST_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Standby Mode"] - #[inline] - pub fn stbmod(&self) -> STBMODR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STBMODR { bits } + #[inline(always)] + pub fn stbmod(&self) -> STBMOD_R { + STBMOD_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - LDO Low Power Mode"] - #[inline] - pub fn ldolp(&self) -> LDOLPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LDOLPR { bits } + #[inline(always)] + pub fn ldolp(&self) -> LDOLP_R { + LDOLP_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 8 - Backup Domain Write Enable"] - #[inline] - pub fn bkpwen(&mut self) -> _BKPWENW { - _BKPWENW { w: self } + #[inline(always)] + pub fn bkpwen(&mut self) -> BKPWEN_W { + BKPWEN_W { w: self } } #[doc = "Bits 5:7 - Low Voltage Detector Threshold"] - #[inline] - pub fn lvdt(&mut self) -> _LVDTW { - _LVDTW { w: self } + #[inline(always)] + pub fn lvdt(&mut self) -> LVDT_W { + LVDT_W { w: self } } #[doc = "Bit 4 - Low Voltage Detector Enable"] - #[inline] - pub fn lvden(&mut self) -> _LVDENW { - _LVDENW { w: self } + #[inline(always)] + pub fn lvden(&mut self) -> LVDEN_W { + LVDEN_W { w: self } } #[doc = "Bit 3 - Standby Flag Reset"] - #[inline] - pub fn stbrst(&mut self) -> _STBRSTW { - _STBRSTW { w: self } + #[inline(always)] + pub fn stbrst(&mut self) -> STBRST_W { + STBRST_W { w: self } } #[doc = "Bit 2 - Wakeup Flag Reset"] - #[inline] - pub fn wurst(&mut self) -> _WURSTW { - _WURSTW { w: self } + #[inline(always)] + pub fn wurst(&mut self) -> WURST_W { + WURST_W { w: self } } #[doc = "Bit 1 - Standby Mode"] - #[inline] - pub fn stbmod(&mut self) -> _STBMODW { - _STBMODW { w: self } + #[inline(always)] + pub fn stbmod(&mut self) -> STBMOD_W { + STBMOD_W { w: self } } #[doc = "Bit 0 - LDO Low Power Mode"] - #[inline] - pub fn ldolp(&mut self) -> _LDOLPW { - _LDOLPW { w: self } + #[inline(always)] + pub fn ldolp(&mut self) -> LDOLP_W { + LDOLP_W { w: self } } } diff --git a/src/rcu.rs b/src/rcu.rs index e936dbe483d9d28013988ba575f088b0a3ab8e1e..30e18ba8c73a752e6b6bc5f0d26bb79bfba7b898 100644 --- a/src/rcu.rs +++ b/src/rcu.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Control register"] @@ -25,85 +25,150 @@ pub struct RegisterBlock { pub ahbrst: AHBRST, #[doc = "0x2c - Clock Configuration register 1"] pub cfg1: CFG1, - _reserved0: [u8; 4usize], + _reserved12: [u8; 4usize], #[doc = "0x34 - Deep sleep mode Voltage register"] pub dsv: DSV, } -#[doc = "Control register"] -pub struct CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl](ctl) module"] +pub type CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL; +#[doc = "`read()` method returns [ctl::R](ctl::R) reader structure"] +impl crate::Readable for CTL {} +#[doc = "`write(|w| ..)` method takes [ctl::W](ctl::W) writer structure"] +impl crate::Writable for CTL {} #[doc = "Control register"] pub mod ctl; -#[doc = "Clock configuration register 0 (RCU_CFG0)"] -pub struct CFG0 { - register: ::vcell::VolatileCell, -} +#[doc = "Clock configuration register 0 (RCU_CFG0)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cfg0](cfg0) module"] +pub type CFG0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CFG0; +#[doc = "`read()` method returns [cfg0::R](cfg0::R) reader structure"] +impl crate::Readable for CFG0 {} +#[doc = "`write(|w| ..)` method takes [cfg0::W](cfg0::W) writer structure"] +impl crate::Writable for CFG0 {} #[doc = "Clock configuration register 0 (RCU_CFG0)"] pub mod cfg0; -#[doc = "Clock interrupt register (RCU_INT)"] -pub struct INT { - register: ::vcell::VolatileCell, -} +#[doc = "Clock interrupt register (RCU_INT)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [int](int) module"] +pub type INT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _INT; +#[doc = "`read()` method returns [int::R](int::R) reader structure"] +impl crate::Readable for INT {} +#[doc = "`write(|w| ..)` method takes [int::W](int::W) writer structure"] +impl crate::Writable for INT {} #[doc = "Clock interrupt register (RCU_INT)"] pub mod int; -#[doc = "APB2 reset register (RCU_APB2RST)"] -pub struct APB2RST { - register: ::vcell::VolatileCell, -} +#[doc = "APB2 reset register (RCU_APB2RST)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [apb2rst](apb2rst) module"] +pub type APB2RST = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _APB2RST; +#[doc = "`read()` method returns [apb2rst::R](apb2rst::R) reader structure"] +impl crate::Readable for APB2RST {} +#[doc = "`write(|w| ..)` method takes [apb2rst::W](apb2rst::W) writer structure"] +impl crate::Writable for APB2RST {} #[doc = "APB2 reset register (RCU_APB2RST)"] pub mod apb2rst; -#[doc = "APB1 reset register (RCU_APB1RST)"] -pub struct APB1RST { - register: ::vcell::VolatileCell, -} +#[doc = "APB1 reset register (RCU_APB1RST)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [apb1rst](apb1rst) module"] +pub type APB1RST = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _APB1RST; +#[doc = "`read()` method returns [apb1rst::R](apb1rst::R) reader structure"] +impl crate::Readable for APB1RST {} +#[doc = "`write(|w| ..)` method takes [apb1rst::W](apb1rst::W) writer structure"] +impl crate::Writable for APB1RST {} #[doc = "APB1 reset register (RCU_APB1RST)"] pub mod apb1rst; -#[doc = "AHB enable register"] -pub struct AHBEN { - register: ::vcell::VolatileCell, -} +#[doc = "AHB enable register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ahben](ahben) module"] +pub type AHBEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _AHBEN; +#[doc = "`read()` method returns [ahben::R](ahben::R) reader structure"] +impl crate::Readable for AHBEN {} +#[doc = "`write(|w| ..)` method takes [ahben::W](ahben::W) writer structure"] +impl crate::Writable for AHBEN {} #[doc = "AHB enable register"] pub mod ahben; -#[doc = "APB2 clock enable register (RCU_APB2EN)"] -pub struct APB2EN { - register: ::vcell::VolatileCell, -} +#[doc = "APB2 clock enable register (RCU_APB2EN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [apb2en](apb2en) module"] +pub type APB2EN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _APB2EN; +#[doc = "`read()` method returns [apb2en::R](apb2en::R) reader structure"] +impl crate::Readable for APB2EN {} +#[doc = "`write(|w| ..)` method takes [apb2en::W](apb2en::W) writer structure"] +impl crate::Writable for APB2EN {} #[doc = "APB2 clock enable register (RCU_APB2EN)"] pub mod apb2en; -#[doc = "APB1 clock enable register (RCU_APB1EN)"] -pub struct APB1EN { - register: ::vcell::VolatileCell, -} +#[doc = "APB1 clock enable register (RCU_APB1EN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [apb1en](apb1en) module"] +pub type APB1EN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _APB1EN; +#[doc = "`read()` method returns [apb1en::R](apb1en::R) reader structure"] +impl crate::Readable for APB1EN {} +#[doc = "`write(|w| ..)` method takes [apb1en::W](apb1en::W) writer structure"] +impl crate::Writable for APB1EN {} #[doc = "APB1 clock enable register (RCU_APB1EN)"] pub mod apb1en; -#[doc = "Backup domain control register (RCU_BDCTL)"] -pub struct BDCTL { - register: ::vcell::VolatileCell, -} +#[doc = "Backup domain control register (RCU_BDCTL)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [bdctl](bdctl) module"] +pub type BDCTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _BDCTL; +#[doc = "`read()` method returns [bdctl::R](bdctl::R) reader structure"] +impl crate::Readable for BDCTL {} +#[doc = "`write(|w| ..)` method takes [bdctl::W](bdctl::W) writer structure"] +impl crate::Writable for BDCTL {} #[doc = "Backup domain control register (RCU_BDCTL)"] pub mod bdctl; -#[doc = "Reset source /clock register (RCU_RSTSCK)"] -pub struct RSTSCK { - register: ::vcell::VolatileCell, -} +#[doc = "Reset source /clock register (RCU_RSTSCK)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rstsck](rstsck) module"] +pub type RSTSCK = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RSTSCK; +#[doc = "`read()` method returns [rstsck::R](rstsck::R) reader structure"] +impl crate::Readable for RSTSCK {} +#[doc = "`write(|w| ..)` method takes [rstsck::W](rstsck::W) writer structure"] +impl crate::Writable for RSTSCK {} #[doc = "Reset source /clock register (RCU_RSTSCK)"] pub mod rstsck; -#[doc = "AHB reset register"] -pub struct AHBRST { - register: ::vcell::VolatileCell, -} +#[doc = "AHB reset register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ahbrst](ahbrst) module"] +pub type AHBRST = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _AHBRST; +#[doc = "`read()` method returns [ahbrst::R](ahbrst::R) reader structure"] +impl crate::Readable for AHBRST {} +#[doc = "`write(|w| ..)` method takes [ahbrst::W](ahbrst::W) writer structure"] +impl crate::Writable for AHBRST {} #[doc = "AHB reset register"] pub mod ahbrst; -#[doc = "Clock Configuration register 1"] -pub struct CFG1 { - register: ::vcell::VolatileCell, -} +#[doc = "Clock Configuration register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cfg1](cfg1) module"] +pub type CFG1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CFG1; +#[doc = "`read()` method returns [cfg1::R](cfg1::R) reader structure"] +impl crate::Readable for CFG1 {} +#[doc = "`write(|w| ..)` method takes [cfg1::W](cfg1::W) writer structure"] +impl crate::Writable for CFG1 {} #[doc = "Clock Configuration register 1"] pub mod cfg1; -#[doc = "Deep sleep mode Voltage register"] -pub struct DSV { - register: ::vcell::VolatileCell, -} +#[doc = "Deep sleep mode Voltage register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dsv](dsv) module"] +pub type DSV = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DSV; +#[doc = "`read()` method returns [dsv::R](dsv::R) reader structure"] +impl crate::Readable for DSV {} +#[doc = "`write(|w| ..)` method takes [dsv::W](dsv::W) writer structure"] +impl crate::Writable for DSV {} #[doc = "Deep sleep mode Voltage register"] pub mod dsv; diff --git a/src/rcu/ahben.rs b/src/rcu/ahben.rs index c724acc3d9de8257912ea1507d368f368ee95c96..90e33f4e6ceea0bb7b9b36e3932b1031276ebe57 100644 --- a/src/rcu/ahben.rs +++ b/src/rcu/ahben.rs @@ -1,477 +1,254 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::AHBEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DMA0ENR { - bits: bool, -} -impl DMA0ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DMA1ENR { - bits: bool, -} -impl DMA1ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SRAMSPENR { - bits: bool, -} -impl SRAMSPENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FMCSPENR { - bits: bool, -} -impl FMCSPENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CRCENR { - bits: bool, -} -impl CRCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EXMCENR { - bits: bool, -} -impl EXMCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBFSENR { - bits: bool, -} -impl USBFSENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _DMA0ENW<'a> { +#[doc = "Reader of register AHBEN"] +pub type R = crate::R; +#[doc = "Writer for register AHBEN"] +pub type W = crate::W; +#[doc = "Register AHBEN `reset()`'s with value 0x14"] +impl crate::ResetValue for super::AHBEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x14 + } +} +#[doc = "Reader of field `DMA0EN`"] +pub type DMA0EN_R = crate::R; +#[doc = "Write proxy for field `DMA0EN`"] +pub struct DMA0EN_W<'a> { w: &'a mut W, } -impl<'a> _DMA0ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DMA0EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _DMA1ENW<'a> { +#[doc = "Reader of field `DMA1EN`"] +pub type DMA1EN_R = crate::R; +#[doc = "Write proxy for field `DMA1EN`"] +pub struct DMA1EN_W<'a> { w: &'a mut W, } -impl<'a> _DMA1ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DMA1EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _SRAMSPENW<'a> { +#[doc = "Reader of field `SRAMSPEN`"] +pub type SRAMSPEN_R = crate::R; +#[doc = "Write proxy for field `SRAMSPEN`"] +pub struct SRAMSPEN_W<'a> { w: &'a mut W, } -impl<'a> _SRAMSPENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SRAMSPEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _FMCSPENW<'a> { +#[doc = "Reader of field `FMCSPEN`"] +pub type FMCSPEN_R = crate::R; +#[doc = "Write proxy for field `FMCSPEN`"] +pub struct FMCSPEN_W<'a> { w: &'a mut W, } -impl<'a> _FMCSPENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FMCSPEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CRCENW<'a> { +#[doc = "Reader of field `CRCEN`"] +pub type CRCEN_R = crate::R; +#[doc = "Write proxy for field `CRCEN`"] +pub struct CRCEN_W<'a> { w: &'a mut W, } -impl<'a> _CRCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CRCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _EXMCENW<'a> { +#[doc = "Reader of field `EXMCEN`"] +pub type EXMCEN_R = crate::R; +#[doc = "Write proxy for field `EXMCEN`"] +pub struct EXMCEN_W<'a> { w: &'a mut W, } -impl<'a> _EXMCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EXMCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _USBFSENW<'a> { +#[doc = "Reader of field `USBFSEN`"] +pub type USBFSEN_R = crate::R; +#[doc = "Write proxy for field `USBFSEN`"] +pub struct USBFSEN_W<'a> { w: &'a mut W, } -impl<'a> _USBFSENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBFSEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - DMA0 clock enable"] - #[inline] - pub fn dma0en(&self) -> DMA0ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DMA0ENR { bits } + #[inline(always)] + pub fn dma0en(&self) -> DMA0EN_R { + DMA0EN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - DMA1 clock enable"] - #[inline] - pub fn dma1en(&self) -> DMA1ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DMA1ENR { bits } + #[inline(always)] + pub fn dma1en(&self) -> DMA1EN_R { + DMA1EN_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - SRAM interface clock enable when sleep mode"] - #[inline] - pub fn sramspen(&self) -> SRAMSPENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SRAMSPENR { bits } + #[inline(always)] + pub fn sramspen(&self) -> SRAMSPEN_R { + SRAMSPEN_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 4 - FMC clock enable when sleep mode"] - #[inline] - pub fn fmcspen(&self) -> FMCSPENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FMCSPENR { bits } + #[inline(always)] + pub fn fmcspen(&self) -> FMCSPEN_R { + FMCSPEN_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 6 - CRC clock enable"] - #[inline] - pub fn crcen(&self) -> CRCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CRCENR { bits } + #[inline(always)] + pub fn crcen(&self) -> CRCEN_R { + CRCEN_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 8 - EXMC clock enable"] - #[inline] - pub fn exmcen(&self) -> EXMCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EXMCENR { bits } + #[inline(always)] + pub fn exmcen(&self) -> EXMCEN_R { + EXMCEN_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 12 - USBFS clock enable"] - #[inline] - pub fn usbfsen(&self) -> USBFSENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBFSENR { bits } + #[inline(always)] + pub fn usbfsen(&self) -> USBFSEN_R { + USBFSEN_R::new(((self.bits >> 12) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x14 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - DMA0 clock enable"] - #[inline] - pub fn dma0en(&mut self) -> _DMA0ENW { - _DMA0ENW { w: self } + #[inline(always)] + pub fn dma0en(&mut self) -> DMA0EN_W { + DMA0EN_W { w: self } } #[doc = "Bit 1 - DMA1 clock enable"] - #[inline] - pub fn dma1en(&mut self) -> _DMA1ENW { - _DMA1ENW { w: self } + #[inline(always)] + pub fn dma1en(&mut self) -> DMA1EN_W { + DMA1EN_W { w: self } } #[doc = "Bit 2 - SRAM interface clock enable when sleep mode"] - #[inline] - pub fn sramspen(&mut self) -> _SRAMSPENW { - _SRAMSPENW { w: self } + #[inline(always)] + pub fn sramspen(&mut self) -> SRAMSPEN_W { + SRAMSPEN_W { w: self } } #[doc = "Bit 4 - FMC clock enable when sleep mode"] - #[inline] - pub fn fmcspen(&mut self) -> _FMCSPENW { - _FMCSPENW { w: self } + #[inline(always)] + pub fn fmcspen(&mut self) -> FMCSPEN_W { + FMCSPEN_W { w: self } } #[doc = "Bit 6 - CRC clock enable"] - #[inline] - pub fn crcen(&mut self) -> _CRCENW { - _CRCENW { w: self } + #[inline(always)] + pub fn crcen(&mut self) -> CRCEN_W { + CRCEN_W { w: self } } #[doc = "Bit 8 - EXMC clock enable"] - #[inline] - pub fn exmcen(&mut self) -> _EXMCENW { - _EXMCENW { w: self } + #[inline(always)] + pub fn exmcen(&mut self) -> EXMCEN_W { + EXMCEN_W { w: self } } #[doc = "Bit 12 - USBFS clock enable"] - #[inline] - pub fn usbfsen(&mut self) -> _USBFSENW { - _USBFSENW { w: self } + #[inline(always)] + pub fn usbfsen(&mut self) -> USBFSEN_W { + USBFSEN_W { w: self } } } diff --git a/src/rcu/ahbrst.rs b/src/rcu/ahbrst.rs index dd26528ac31541834439a53ace53fb3a15a3f60c..7af4a8fdde2311bac278831e722b3fed2f643ee8 100644 --- a/src/rcu/ahbrst.rs +++ b/src/rcu/ahbrst.rs @@ -1,123 +1,50 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::AHBRST { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct USBFSRSTR { - bits: bool, -} -impl USBFSRSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _USBFSRSTW<'a> { +#[doc = "Reader of register AHBRST"] +pub type R = crate::R; +#[doc = "Writer for register AHBRST"] +pub type W = crate::W; +#[doc = "Register AHBRST `reset()`'s with value 0"] +impl crate::ResetValue for super::AHBRST { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `USBFSRST`"] +pub type USBFSRST_R = crate::R; +#[doc = "Write proxy for field `USBFSRST`"] +pub struct USBFSRST_W<'a> { w: &'a mut W, } -impl<'a> _USBFSRSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBFSRST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 12 - USBFS reset"] - #[inline] - pub fn usbfsrst(&self) -> USBFSRSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBFSRSTR { bits } + #[inline(always)] + pub fn usbfsrst(&self) -> USBFSRST_R { + USBFSRST_R::new(((self.bits >> 12) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 12 - USBFS reset"] - #[inline] - pub fn usbfsrst(&mut self) -> _USBFSRSTW { - _USBFSRSTW { w: self } + #[inline(always)] + pub fn usbfsrst(&mut self) -> USBFSRST_W { + USBFSRST_W { w: self } } } diff --git a/src/rcu/apb1en.rs b/src/rcu/apb1en.rs index 65bd360273666a47670df1fc06e358b20ca7df30..5772cb4ac8a64068472052376ee243d2164f70d0 100644 --- a/src/rcu/apb1en.rs +++ b/src/rcu/apb1en.rs @@ -1,1244 +1,696 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::APB1EN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TIMER1ENR { - bits: bool, -} -impl TIMER1ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER2ENR { - bits: bool, -} -impl TIMER2ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER3ENR { - bits: bool, -} -impl TIMER3ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER4ENR { - bits: bool, -} -impl TIMER4ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER5ENR { - bits: bool, -} -impl TIMER5ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER6ENR { - bits: bool, -} -impl TIMER6ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WWDGTENR { - bits: bool, -} -impl WWDGTENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SPI1ENR { - bits: bool, -} -impl SPI1ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SPI2ENR { - bits: bool, -} -impl SPI2ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USART1ENR { - bits: bool, -} -impl USART1ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USART2ENR { - bits: bool, -} -impl USART2ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UART3ENR { - bits: bool, -} -impl UART3ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UART4ENR { - bits: bool, -} -impl UART4ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct I2C0ENR { - bits: bool, -} -impl I2C0ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct I2C1ENR { - bits: bool, -} -impl I2C1ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CAN0ENR { - bits: bool, -} -impl CAN0ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CAN1ENR { - bits: bool, -} -impl CAN1ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BKPIENR { - bits: bool, -} -impl BKPIENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PMUENR { - bits: bool, -} -impl PMUENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DACENR { - bits: bool, -} -impl DACENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TIMER1ENW<'a> { +#[doc = "Reader of register APB1EN"] +pub type R = crate::R; +#[doc = "Writer for register APB1EN"] +pub type W = crate::W; +#[doc = "Register APB1EN `reset()`'s with value 0"] +impl crate::ResetValue for super::APB1EN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TIMER1EN`"] +pub type TIMER1EN_R = crate::R; +#[doc = "Write proxy for field `TIMER1EN`"] +pub struct TIMER1EN_W<'a> { w: &'a mut W, } -impl<'a> _TIMER1ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER1EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER2ENW<'a> { +#[doc = "Reader of field `TIMER2EN`"] +pub type TIMER2EN_R = crate::R; +#[doc = "Write proxy for field `TIMER2EN`"] +pub struct TIMER2EN_W<'a> { w: &'a mut W, } -impl<'a> _TIMER2ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER2EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER3ENW<'a> { +#[doc = "Reader of field `TIMER3EN`"] +pub type TIMER3EN_R = crate::R; +#[doc = "Write proxy for field `TIMER3EN`"] +pub struct TIMER3EN_W<'a> { w: &'a mut W, } -impl<'a> _TIMER3ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER3EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER4ENW<'a> { +#[doc = "Reader of field `TIMER4EN`"] +pub type TIMER4EN_R = crate::R; +#[doc = "Write proxy for field `TIMER4EN`"] +pub struct TIMER4EN_W<'a> { w: &'a mut W, } -impl<'a> _TIMER4ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER4EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER5ENW<'a> { +#[doc = "Reader of field `TIMER5EN`"] +pub type TIMER5EN_R = crate::R; +#[doc = "Write proxy for field `TIMER5EN`"] +pub struct TIMER5EN_W<'a> { w: &'a mut W, } -impl<'a> _TIMER5ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER5EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER6ENW<'a> { +#[doc = "Reader of field `TIMER6EN`"] +pub type TIMER6EN_R = crate::R; +#[doc = "Write proxy for field `TIMER6EN`"] +pub struct TIMER6EN_W<'a> { w: &'a mut W, } -impl<'a> _TIMER6ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER6EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _WWDGTENW<'a> { +#[doc = "Reader of field `WWDGTEN`"] +pub type WWDGTEN_R = crate::R; +#[doc = "Write proxy for field `WWDGTEN`"] +pub struct WWDGTEN_W<'a> { w: &'a mut W, } -impl<'a> _WWDGTENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WWDGTEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _SPI1ENW<'a> { +#[doc = "Reader of field `SPI1EN`"] +pub type SPI1EN_R = crate::R; +#[doc = "Write proxy for field `SPI1EN`"] +pub struct SPI1EN_W<'a> { w: &'a mut W, } -impl<'a> _SPI1ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SPI1EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _SPI2ENW<'a> { +#[doc = "Reader of field `SPI2EN`"] +pub type SPI2EN_R = crate::R; +#[doc = "Write proxy for field `SPI2EN`"] +pub struct SPI2EN_W<'a> { w: &'a mut W, } -impl<'a> _SPI2ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SPI2EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _USART1ENW<'a> { +#[doc = "Reader of field `USART1EN`"] +pub type USART1EN_R = crate::R; +#[doc = "Write proxy for field `USART1EN`"] +pub struct USART1EN_W<'a> { w: &'a mut W, } -impl<'a> _USART1ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USART1EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _USART2ENW<'a> { +#[doc = "Reader of field `USART2EN`"] +pub type USART2EN_R = crate::R; +#[doc = "Write proxy for field `USART2EN`"] +pub struct USART2EN_W<'a> { w: &'a mut W, } -impl<'a> _USART2ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USART2EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _UART3ENW<'a> { +#[doc = "Reader of field `UART3EN`"] +pub type UART3EN_R = crate::R; +#[doc = "Write proxy for field `UART3EN`"] +pub struct UART3EN_W<'a> { w: &'a mut W, } -impl<'a> _UART3ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UART3EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _UART4ENW<'a> { +#[doc = "Reader of field `UART4EN`"] +pub type UART4EN_R = crate::R; +#[doc = "Write proxy for field `UART4EN`"] +pub struct UART4EN_W<'a> { w: &'a mut W, } -impl<'a> _UART4ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UART4EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _I2C0ENW<'a> { +#[doc = "Reader of field `I2C0EN`"] +pub type I2C0EN_R = crate::R; +#[doc = "Write proxy for field `I2C0EN`"] +pub struct I2C0EN_W<'a> { w: &'a mut W, } -impl<'a> _I2C0ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> I2C0EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _I2C1ENW<'a> { +#[doc = "Reader of field `I2C1EN`"] +pub type I2C1EN_R = crate::R; +#[doc = "Write proxy for field `I2C1EN`"] +pub struct I2C1EN_W<'a> { w: &'a mut W, } -impl<'a> _I2C1ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> I2C1EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _CAN0ENW<'a> { +#[doc = "Reader of field `CAN0EN`"] +pub type CAN0EN_R = crate::R; +#[doc = "Write proxy for field `CAN0EN`"] +pub struct CAN0EN_W<'a> { w: &'a mut W, } -impl<'a> _CAN0ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CAN0EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _CAN1ENW<'a> { +#[doc = "Reader of field `CAN1EN`"] +pub type CAN1EN_R = crate::R; +#[doc = "Write proxy for field `CAN1EN`"] +pub struct CAN1EN_W<'a> { w: &'a mut W, } -impl<'a> _CAN1ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CAN1EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _BKPIENW<'a> { +#[doc = "Reader of field `BKPIEN`"] +pub type BKPIEN_R = crate::R; +#[doc = "Write proxy for field `BKPIEN`"] +pub struct BKPIEN_W<'a> { w: &'a mut W, } -impl<'a> _BKPIENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BKPIEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _PMUENW<'a> { +#[doc = "Reader of field `PMUEN`"] +pub type PMUEN_R = crate::R; +#[doc = "Write proxy for field `PMUEN`"] +pub struct PMUEN_W<'a> { w: &'a mut W, } -impl<'a> _PMUENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PMUEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _DACENW<'a> { +#[doc = "Reader of field `DACEN`"] +pub type DACEN_R = crate::R; +#[doc = "Write proxy for field `DACEN`"] +pub struct DACEN_W<'a> { w: &'a mut W, } -impl<'a> _DACENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DACEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - TIMER1 timer clock enable"] - #[inline] - pub fn timer1en(&self) -> TIMER1ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER1ENR { bits } + #[inline(always)] + pub fn timer1en(&self) -> TIMER1EN_R { + TIMER1EN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - TIMER2 timer clock enable"] - #[inline] - pub fn timer2en(&self) -> TIMER2ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER2ENR { bits } + #[inline(always)] + pub fn timer2en(&self) -> TIMER2EN_R { + TIMER2EN_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - TIMER3 timer clock enable"] - #[inline] - pub fn timer3en(&self) -> TIMER3ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER3ENR { bits } + #[inline(always)] + pub fn timer3en(&self) -> TIMER3EN_R { + TIMER3EN_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - TIMER4 timer clock enable"] - #[inline] - pub fn timer4en(&self) -> TIMER4ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER4ENR { bits } + #[inline(always)] + pub fn timer4en(&self) -> TIMER4EN_R { + TIMER4EN_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - TIMER5 timer clock enable"] - #[inline] - pub fn timer5en(&self) -> TIMER5ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER5ENR { bits } + #[inline(always)] + pub fn timer5en(&self) -> TIMER5EN_R { + TIMER5EN_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - TIMER6 timer clock enable"] - #[inline] - pub fn timer6en(&self) -> TIMER6ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER6ENR { bits } + #[inline(always)] + pub fn timer6en(&self) -> TIMER6EN_R { + TIMER6EN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 11 - Window watchdog timer clock enable"] - #[inline] - pub fn wwdgten(&self) -> WWDGTENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WWDGTENR { bits } + #[inline(always)] + pub fn wwdgten(&self) -> WWDGTEN_R { + WWDGTEN_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 14 - SPI1 clock enable"] - #[inline] - pub fn spi1en(&self) -> SPI1ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SPI1ENR { bits } + #[inline(always)] + pub fn spi1en(&self) -> SPI1EN_R { + SPI1EN_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - SPI2 clock enable"] - #[inline] - pub fn spi2en(&self) -> SPI2ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SPI2ENR { bits } + #[inline(always)] + pub fn spi2en(&self) -> SPI2EN_R { + SPI2EN_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 17 - USART1 clock enable"] - #[inline] - pub fn usart1en(&self) -> USART1ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USART1ENR { bits } + #[inline(always)] + pub fn usart1en(&self) -> USART1EN_R { + USART1EN_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - USART2 clock enable"] - #[inline] - pub fn usart2en(&self) -> USART2ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USART2ENR { bits } + #[inline(always)] + pub fn usart2en(&self) -> USART2EN_R { + USART2EN_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - UART3 clock enable"] - #[inline] - pub fn uart3en(&self) -> UART3ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - UART3ENR { bits } + #[inline(always)] + pub fn uart3en(&self) -> UART3EN_R { + UART3EN_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - UART4 clock enable"] - #[inline] - pub fn uart4en(&self) -> UART4ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - UART4ENR { bits } + #[inline(always)] + pub fn uart4en(&self) -> UART4EN_R { + UART4EN_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - I2C0 clock enable"] - #[inline] - pub fn i2c0en(&self) -> I2C0ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - I2C0ENR { bits } + #[inline(always)] + pub fn i2c0en(&self) -> I2C0EN_R { + I2C0EN_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - I2C1 clock enable"] - #[inline] - pub fn i2c1en(&self) -> I2C1ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - I2C1ENR { bits } + #[inline(always)] + pub fn i2c1en(&self) -> I2C1EN_R { + I2C1EN_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 25 - CAN0 clock enable"] - #[inline] - pub fn can0en(&self) -> CAN0ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CAN0ENR { bits } + #[inline(always)] + pub fn can0en(&self) -> CAN0EN_R { + CAN0EN_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - CAN1 clock enable"] - #[inline] - pub fn can1en(&self) -> CAN1ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CAN1ENR { bits } + #[inline(always)] + pub fn can1en(&self) -> CAN1EN_R { + CAN1EN_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Backup interface clock enable"] - #[inline] - pub fn bkpien(&self) -> BKPIENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BKPIENR { bits } + #[inline(always)] + pub fn bkpien(&self) -> BKPIEN_R { + BKPIEN_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Power control clock enable"] - #[inline] - pub fn pmuen(&self) -> PMUENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PMUENR { bits } + #[inline(always)] + pub fn pmuen(&self) -> PMUEN_R { + PMUEN_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - DAC clock enable"] - #[inline] - pub fn dacen(&self) -> DACENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DACENR { bits } + #[inline(always)] + pub fn dacen(&self) -> DACEN_R { + DACEN_R::new(((self.bits >> 29) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - TIMER1 timer clock enable"] - #[inline] - pub fn timer1en(&mut self) -> _TIMER1ENW { - _TIMER1ENW { w: self } + #[inline(always)] + pub fn timer1en(&mut self) -> TIMER1EN_W { + TIMER1EN_W { w: self } } #[doc = "Bit 1 - TIMER2 timer clock enable"] - #[inline] - pub fn timer2en(&mut self) -> _TIMER2ENW { - _TIMER2ENW { w: self } + #[inline(always)] + pub fn timer2en(&mut self) -> TIMER2EN_W { + TIMER2EN_W { w: self } } #[doc = "Bit 2 - TIMER3 timer clock enable"] - #[inline] - pub fn timer3en(&mut self) -> _TIMER3ENW { - _TIMER3ENW { w: self } + #[inline(always)] + pub fn timer3en(&mut self) -> TIMER3EN_W { + TIMER3EN_W { w: self } } #[doc = "Bit 3 - TIMER4 timer clock enable"] - #[inline] - pub fn timer4en(&mut self) -> _TIMER4ENW { - _TIMER4ENW { w: self } + #[inline(always)] + pub fn timer4en(&mut self) -> TIMER4EN_W { + TIMER4EN_W { w: self } } #[doc = "Bit 4 - TIMER5 timer clock enable"] - #[inline] - pub fn timer5en(&mut self) -> _TIMER5ENW { - _TIMER5ENW { w: self } + #[inline(always)] + pub fn timer5en(&mut self) -> TIMER5EN_W { + TIMER5EN_W { w: self } } #[doc = "Bit 5 - TIMER6 timer clock enable"] - #[inline] - pub fn timer6en(&mut self) -> _TIMER6ENW { - _TIMER6ENW { w: self } + #[inline(always)] + pub fn timer6en(&mut self) -> TIMER6EN_W { + TIMER6EN_W { w: self } } #[doc = "Bit 11 - Window watchdog timer clock enable"] - #[inline] - pub fn wwdgten(&mut self) -> _WWDGTENW { - _WWDGTENW { w: self } + #[inline(always)] + pub fn wwdgten(&mut self) -> WWDGTEN_W { + WWDGTEN_W { w: self } } #[doc = "Bit 14 - SPI1 clock enable"] - #[inline] - pub fn spi1en(&mut self) -> _SPI1ENW { - _SPI1ENW { w: self } + #[inline(always)] + pub fn spi1en(&mut self) -> SPI1EN_W { + SPI1EN_W { w: self } } #[doc = "Bit 15 - SPI2 clock enable"] - #[inline] - pub fn spi2en(&mut self) -> _SPI2ENW { - _SPI2ENW { w: self } + #[inline(always)] + pub fn spi2en(&mut self) -> SPI2EN_W { + SPI2EN_W { w: self } } #[doc = "Bit 17 - USART1 clock enable"] - #[inline] - pub fn usart1en(&mut self) -> _USART1ENW { - _USART1ENW { w: self } + #[inline(always)] + pub fn usart1en(&mut self) -> USART1EN_W { + USART1EN_W { w: self } } #[doc = "Bit 18 - USART2 clock enable"] - #[inline] - pub fn usart2en(&mut self) -> _USART2ENW { - _USART2ENW { w: self } + #[inline(always)] + pub fn usart2en(&mut self) -> USART2EN_W { + USART2EN_W { w: self } } #[doc = "Bit 19 - UART3 clock enable"] - #[inline] - pub fn uart3en(&mut self) -> _UART3ENW { - _UART3ENW { w: self } + #[inline(always)] + pub fn uart3en(&mut self) -> UART3EN_W { + UART3EN_W { w: self } } #[doc = "Bit 20 - UART4 clock enable"] - #[inline] - pub fn uart4en(&mut self) -> _UART4ENW { - _UART4ENW { w: self } + #[inline(always)] + pub fn uart4en(&mut self) -> UART4EN_W { + UART4EN_W { w: self } } #[doc = "Bit 21 - I2C0 clock enable"] - #[inline] - pub fn i2c0en(&mut self) -> _I2C0ENW { - _I2C0ENW { w: self } + #[inline(always)] + pub fn i2c0en(&mut self) -> I2C0EN_W { + I2C0EN_W { w: self } } #[doc = "Bit 22 - I2C1 clock enable"] - #[inline] - pub fn i2c1en(&mut self) -> _I2C1ENW { - _I2C1ENW { w: self } + #[inline(always)] + pub fn i2c1en(&mut self) -> I2C1EN_W { + I2C1EN_W { w: self } } #[doc = "Bit 25 - CAN0 clock enable"] - #[inline] - pub fn can0en(&mut self) -> _CAN0ENW { - _CAN0ENW { w: self } + #[inline(always)] + pub fn can0en(&mut self) -> CAN0EN_W { + CAN0EN_W { w: self } } #[doc = "Bit 26 - CAN1 clock enable"] - #[inline] - pub fn can1en(&mut self) -> _CAN1ENW { - _CAN1ENW { w: self } + #[inline(always)] + pub fn can1en(&mut self) -> CAN1EN_W { + CAN1EN_W { w: self } } #[doc = "Bit 27 - Backup interface clock enable"] - #[inline] - pub fn bkpien(&mut self) -> _BKPIENW { - _BKPIENW { w: self } + #[inline(always)] + pub fn bkpien(&mut self) -> BKPIEN_W { + BKPIEN_W { w: self } } #[doc = "Bit 28 - Power control clock enable"] - #[inline] - pub fn pmuen(&mut self) -> _PMUENW { - _PMUENW { w: self } + #[inline(always)] + pub fn pmuen(&mut self) -> PMUEN_W { + PMUEN_W { w: self } } #[doc = "Bit 29 - DAC clock enable"] - #[inline] - pub fn dacen(&mut self) -> _DACENW { - _DACENW { w: self } + #[inline(always)] + pub fn dacen(&mut self) -> DACEN_W { + DACEN_W { w: self } } } diff --git a/src/rcu/apb1rst.rs b/src/rcu/apb1rst.rs index 77830bc9101e8129c15b5c434e3eefb0a49f3101..ec0ec7e323b1a260de150ab416c82244b27fa17e 100644 --- a/src/rcu/apb1rst.rs +++ b/src/rcu/apb1rst.rs @@ -1,1244 +1,696 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::APB1RST { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TIMER1RSTR { - bits: bool, -} -impl TIMER1RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER2RSTR { - bits: bool, -} -impl TIMER2RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER3RSTR { - bits: bool, -} -impl TIMER3RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER4RSTR { - bits: bool, -} -impl TIMER4RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER5RSTR { - bits: bool, -} -impl TIMER5RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER6RSTR { - bits: bool, -} -impl TIMER6RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WWDGTRSTR { - bits: bool, -} -impl WWDGTRSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SPI1RSTR { - bits: bool, -} -impl SPI1RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SPI2RSTR { - bits: bool, -} -impl SPI2RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USART1RSTR { - bits: bool, -} -impl USART1RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USART2RSTR { - bits: bool, -} -impl USART2RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UART3RSTR { - bits: bool, -} -impl UART3RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UART4RSTR { - bits: bool, -} -impl UART4RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct I2C0RSTR { - bits: bool, -} -impl I2C0RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct I2C1RSTR { - bits: bool, -} -impl I2C1RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CAN0RSTR { - bits: bool, -} -impl CAN0RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CAN1RSTR { - bits: bool, -} -impl CAN1RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BKPIRSTR { - bits: bool, -} -impl BKPIRSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PMURSTR { - bits: bool, -} -impl PMURSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DACRSTR { - bits: bool, -} -impl DACRSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TIMER1RSTW<'a> { +#[doc = "Reader of register APB1RST"] +pub type R = crate::R; +#[doc = "Writer for register APB1RST"] +pub type W = crate::W; +#[doc = "Register APB1RST `reset()`'s with value 0"] +impl crate::ResetValue for super::APB1RST { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TIMER1RST`"] +pub type TIMER1RST_R = crate::R; +#[doc = "Write proxy for field `TIMER1RST`"] +pub struct TIMER1RST_W<'a> { w: &'a mut W, } -impl<'a> _TIMER1RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER1RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER2RSTW<'a> { +#[doc = "Reader of field `TIMER2RST`"] +pub type TIMER2RST_R = crate::R; +#[doc = "Write proxy for field `TIMER2RST`"] +pub struct TIMER2RST_W<'a> { w: &'a mut W, } -impl<'a> _TIMER2RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER2RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER3RSTW<'a> { +#[doc = "Reader of field `TIMER3RST`"] +pub type TIMER3RST_R = crate::R; +#[doc = "Write proxy for field `TIMER3RST`"] +pub struct TIMER3RST_W<'a> { w: &'a mut W, } -impl<'a> _TIMER3RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER3RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER4RSTW<'a> { +#[doc = "Reader of field `TIMER4RST`"] +pub type TIMER4RST_R = crate::R; +#[doc = "Write proxy for field `TIMER4RST`"] +pub struct TIMER4RST_W<'a> { w: &'a mut W, } -impl<'a> _TIMER4RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER4RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER5RSTW<'a> { +#[doc = "Reader of field `TIMER5RST`"] +pub type TIMER5RST_R = crate::R; +#[doc = "Write proxy for field `TIMER5RST`"] +pub struct TIMER5RST_W<'a> { w: &'a mut W, } -impl<'a> _TIMER5RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER5RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER6RSTW<'a> { +#[doc = "Reader of field `TIMER6RST`"] +pub type TIMER6RST_R = crate::R; +#[doc = "Write proxy for field `TIMER6RST`"] +pub struct TIMER6RST_W<'a> { w: &'a mut W, } -impl<'a> _TIMER6RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER6RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _WWDGTRSTW<'a> { +#[doc = "Reader of field `WWDGTRST`"] +pub type WWDGTRST_R = crate::R; +#[doc = "Write proxy for field `WWDGTRST`"] +pub struct WWDGTRST_W<'a> { w: &'a mut W, } -impl<'a> _WWDGTRSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WWDGTRST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _SPI1RSTW<'a> { +#[doc = "Reader of field `SPI1RST`"] +pub type SPI1RST_R = crate::R; +#[doc = "Write proxy for field `SPI1RST`"] +pub struct SPI1RST_W<'a> { w: &'a mut W, } -impl<'a> _SPI1RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SPI1RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _SPI2RSTW<'a> { +#[doc = "Reader of field `SPI2RST`"] +pub type SPI2RST_R = crate::R; +#[doc = "Write proxy for field `SPI2RST`"] +pub struct SPI2RST_W<'a> { w: &'a mut W, } -impl<'a> _SPI2RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SPI2RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _USART1RSTW<'a> { +#[doc = "Reader of field `USART1RST`"] +pub type USART1RST_R = crate::R; +#[doc = "Write proxy for field `USART1RST`"] +pub struct USART1RST_W<'a> { w: &'a mut W, } -impl<'a> _USART1RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USART1RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _USART2RSTW<'a> { +#[doc = "Reader of field `USART2RST`"] +pub type USART2RST_R = crate::R; +#[doc = "Write proxy for field `USART2RST`"] +pub struct USART2RST_W<'a> { w: &'a mut W, } -impl<'a> _USART2RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USART2RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _UART3RSTW<'a> { +#[doc = "Reader of field `UART3RST`"] +pub type UART3RST_R = crate::R; +#[doc = "Write proxy for field `UART3RST`"] +pub struct UART3RST_W<'a> { w: &'a mut W, } -impl<'a> _UART3RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UART3RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _UART4RSTW<'a> { +#[doc = "Reader of field `UART4RST`"] +pub type UART4RST_R = crate::R; +#[doc = "Write proxy for field `UART4RST`"] +pub struct UART4RST_W<'a> { w: &'a mut W, } -impl<'a> _UART4RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UART4RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _I2C0RSTW<'a> { +#[doc = "Reader of field `I2C0RST`"] +pub type I2C0RST_R = crate::R; +#[doc = "Write proxy for field `I2C0RST`"] +pub struct I2C0RST_W<'a> { w: &'a mut W, } -impl<'a> _I2C0RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> I2C0RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _I2C1RSTW<'a> { +#[doc = "Reader of field `I2C1RST`"] +pub type I2C1RST_R = crate::R; +#[doc = "Write proxy for field `I2C1RST`"] +pub struct I2C1RST_W<'a> { w: &'a mut W, } -impl<'a> _I2C1RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> I2C1RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _CAN0RSTW<'a> { +#[doc = "Reader of field `CAN0RST`"] +pub type CAN0RST_R = crate::R; +#[doc = "Write proxy for field `CAN0RST`"] +pub struct CAN0RST_W<'a> { w: &'a mut W, } -impl<'a> _CAN0RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CAN0RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _CAN1RSTW<'a> { +#[doc = "Reader of field `CAN1RST`"] +pub type CAN1RST_R = crate::R; +#[doc = "Write proxy for field `CAN1RST`"] +pub struct CAN1RST_W<'a> { w: &'a mut W, } -impl<'a> _CAN1RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CAN1RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _BKPIRSTW<'a> { +#[doc = "Reader of field `BKPIRST`"] +pub type BKPIRST_R = crate::R; +#[doc = "Write proxy for field `BKPIRST`"] +pub struct BKPIRST_W<'a> { w: &'a mut W, } -impl<'a> _BKPIRSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BKPIRST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _PMURSTW<'a> { +#[doc = "Reader of field `PMURST`"] +pub type PMURST_R = crate::R; +#[doc = "Write proxy for field `PMURST`"] +pub struct PMURST_W<'a> { w: &'a mut W, } -impl<'a> _PMURSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PMURST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _DACRSTW<'a> { +#[doc = "Reader of field `DACRST`"] +pub type DACRST_R = crate::R; +#[doc = "Write proxy for field `DACRST`"] +pub struct DACRST_W<'a> { w: &'a mut W, } -impl<'a> _DACRSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DACRST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - TIMER1 timer reset"] - #[inline] - pub fn timer1rst(&self) -> TIMER1RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER1RSTR { bits } + #[inline(always)] + pub fn timer1rst(&self) -> TIMER1RST_R { + TIMER1RST_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - TIMER2 timer reset"] - #[inline] - pub fn timer2rst(&self) -> TIMER2RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER2RSTR { bits } + #[inline(always)] + pub fn timer2rst(&self) -> TIMER2RST_R { + TIMER2RST_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - TIMER3 timer reset"] - #[inline] - pub fn timer3rst(&self) -> TIMER3RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER3RSTR { bits } + #[inline(always)] + pub fn timer3rst(&self) -> TIMER3RST_R { + TIMER3RST_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - TIMER4 timer reset"] - #[inline] - pub fn timer4rst(&self) -> TIMER4RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER4RSTR { bits } + #[inline(always)] + pub fn timer4rst(&self) -> TIMER4RST_R { + TIMER4RST_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - TIMER5 timer reset"] - #[inline] - pub fn timer5rst(&self) -> TIMER5RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER5RSTR { bits } + #[inline(always)] + pub fn timer5rst(&self) -> TIMER5RST_R { + TIMER5RST_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - TIMER6 timer reset"] - #[inline] - pub fn timer6rst(&self) -> TIMER6RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER6RSTR { bits } + #[inline(always)] + pub fn timer6rst(&self) -> TIMER6RST_R { + TIMER6RST_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 11 - Window watchdog timer reset"] - #[inline] - pub fn wwdgtrst(&self) -> WWDGTRSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WWDGTRSTR { bits } + #[inline(always)] + pub fn wwdgtrst(&self) -> WWDGTRST_R { + WWDGTRST_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 14 - SPI1 reset"] - #[inline] - pub fn spi1rst(&self) -> SPI1RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SPI1RSTR { bits } + #[inline(always)] + pub fn spi1rst(&self) -> SPI1RST_R { + SPI1RST_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - SPI2 reset"] - #[inline] - pub fn spi2rst(&self) -> SPI2RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SPI2RSTR { bits } + #[inline(always)] + pub fn spi2rst(&self) -> SPI2RST_R { + SPI2RST_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 17 - USART1 reset"] - #[inline] - pub fn usart1rst(&self) -> USART1RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USART1RSTR { bits } + #[inline(always)] + pub fn usart1rst(&self) -> USART1RST_R { + USART1RST_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - USART2 reset"] - #[inline] - pub fn usart2rst(&self) -> USART2RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USART2RSTR { bits } + #[inline(always)] + pub fn usart2rst(&self) -> USART2RST_R { + USART2RST_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - UART3 reset"] - #[inline] - pub fn uart3rst(&self) -> UART3RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - UART3RSTR { bits } + #[inline(always)] + pub fn uart3rst(&self) -> UART3RST_R { + UART3RST_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - UART4 reset"] - #[inline] - pub fn uart4rst(&self) -> UART4RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - UART4RSTR { bits } + #[inline(always)] + pub fn uart4rst(&self) -> UART4RST_R { + UART4RST_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - I2C0 reset"] - #[inline] - pub fn i2c0rst(&self) -> I2C0RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - I2C0RSTR { bits } + #[inline(always)] + pub fn i2c0rst(&self) -> I2C0RST_R { + I2C0RST_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 22 - I2C1 reset"] - #[inline] - pub fn i2c1rst(&self) -> I2C1RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - I2C1RSTR { bits } + #[inline(always)] + pub fn i2c1rst(&self) -> I2C1RST_R { + I2C1RST_R::new(((self.bits >> 22) & 0x01) != 0) } #[doc = "Bit 25 - CAN0 reset"] - #[inline] - pub fn can0rst(&self) -> CAN0RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CAN0RSTR { bits } + #[inline(always)] + pub fn can0rst(&self) -> CAN0RST_R { + CAN0RST_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - CAN1 reset"] - #[inline] - pub fn can1rst(&self) -> CAN1RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CAN1RSTR { bits } + #[inline(always)] + pub fn can1rst(&self) -> CAN1RST_R { + CAN1RST_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Backup interface reset"] - #[inline] - pub fn bkpirst(&self) -> BKPIRSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BKPIRSTR { bits } + #[inline(always)] + pub fn bkpirst(&self) -> BKPIRST_R { + BKPIRST_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Power control reset"] - #[inline] - pub fn pmurst(&self) -> PMURSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PMURSTR { bits } + #[inline(always)] + pub fn pmurst(&self) -> PMURST_R { + PMURST_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - DAC reset"] - #[inline] - pub fn dacrst(&self) -> DACRSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DACRSTR { bits } + #[inline(always)] + pub fn dacrst(&self) -> DACRST_R { + DACRST_R::new(((self.bits >> 29) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - TIMER1 timer reset"] - #[inline] - pub fn timer1rst(&mut self) -> _TIMER1RSTW { - _TIMER1RSTW { w: self } + #[inline(always)] + pub fn timer1rst(&mut self) -> TIMER1RST_W { + TIMER1RST_W { w: self } } #[doc = "Bit 1 - TIMER2 timer reset"] - #[inline] - pub fn timer2rst(&mut self) -> _TIMER2RSTW { - _TIMER2RSTW { w: self } + #[inline(always)] + pub fn timer2rst(&mut self) -> TIMER2RST_W { + TIMER2RST_W { w: self } } #[doc = "Bit 2 - TIMER3 timer reset"] - #[inline] - pub fn timer3rst(&mut self) -> _TIMER3RSTW { - _TIMER3RSTW { w: self } + #[inline(always)] + pub fn timer3rst(&mut self) -> TIMER3RST_W { + TIMER3RST_W { w: self } } #[doc = "Bit 3 - TIMER4 timer reset"] - #[inline] - pub fn timer4rst(&mut self) -> _TIMER4RSTW { - _TIMER4RSTW { w: self } + #[inline(always)] + pub fn timer4rst(&mut self) -> TIMER4RST_W { + TIMER4RST_W { w: self } } #[doc = "Bit 4 - TIMER5 timer reset"] - #[inline] - pub fn timer5rst(&mut self) -> _TIMER5RSTW { - _TIMER5RSTW { w: self } + #[inline(always)] + pub fn timer5rst(&mut self) -> TIMER5RST_W { + TIMER5RST_W { w: self } } #[doc = "Bit 5 - TIMER6 timer reset"] - #[inline] - pub fn timer6rst(&mut self) -> _TIMER6RSTW { - _TIMER6RSTW { w: self } + #[inline(always)] + pub fn timer6rst(&mut self) -> TIMER6RST_W { + TIMER6RST_W { w: self } } #[doc = "Bit 11 - Window watchdog timer reset"] - #[inline] - pub fn wwdgtrst(&mut self) -> _WWDGTRSTW { - _WWDGTRSTW { w: self } + #[inline(always)] + pub fn wwdgtrst(&mut self) -> WWDGTRST_W { + WWDGTRST_W { w: self } } #[doc = "Bit 14 - SPI1 reset"] - #[inline] - pub fn spi1rst(&mut self) -> _SPI1RSTW { - _SPI1RSTW { w: self } + #[inline(always)] + pub fn spi1rst(&mut self) -> SPI1RST_W { + SPI1RST_W { w: self } } #[doc = "Bit 15 - SPI2 reset"] - #[inline] - pub fn spi2rst(&mut self) -> _SPI2RSTW { - _SPI2RSTW { w: self } + #[inline(always)] + pub fn spi2rst(&mut self) -> SPI2RST_W { + SPI2RST_W { w: self } } #[doc = "Bit 17 - USART1 reset"] - #[inline] - pub fn usart1rst(&mut self) -> _USART1RSTW { - _USART1RSTW { w: self } + #[inline(always)] + pub fn usart1rst(&mut self) -> USART1RST_W { + USART1RST_W { w: self } } #[doc = "Bit 18 - USART2 reset"] - #[inline] - pub fn usart2rst(&mut self) -> _USART2RSTW { - _USART2RSTW { w: self } + #[inline(always)] + pub fn usart2rst(&mut self) -> USART2RST_W { + USART2RST_W { w: self } } #[doc = "Bit 19 - UART3 reset"] - #[inline] - pub fn uart3rst(&mut self) -> _UART3RSTW { - _UART3RSTW { w: self } + #[inline(always)] + pub fn uart3rst(&mut self) -> UART3RST_W { + UART3RST_W { w: self } } #[doc = "Bit 20 - UART4 reset"] - #[inline] - pub fn uart4rst(&mut self) -> _UART4RSTW { - _UART4RSTW { w: self } + #[inline(always)] + pub fn uart4rst(&mut self) -> UART4RST_W { + UART4RST_W { w: self } } #[doc = "Bit 21 - I2C0 reset"] - #[inline] - pub fn i2c0rst(&mut self) -> _I2C0RSTW { - _I2C0RSTW { w: self } + #[inline(always)] + pub fn i2c0rst(&mut self) -> I2C0RST_W { + I2C0RST_W { w: self } } #[doc = "Bit 22 - I2C1 reset"] - #[inline] - pub fn i2c1rst(&mut self) -> _I2C1RSTW { - _I2C1RSTW { w: self } + #[inline(always)] + pub fn i2c1rst(&mut self) -> I2C1RST_W { + I2C1RST_W { w: self } } #[doc = "Bit 25 - CAN0 reset"] - #[inline] - pub fn can0rst(&mut self) -> _CAN0RSTW { - _CAN0RSTW { w: self } + #[inline(always)] + pub fn can0rst(&mut self) -> CAN0RST_W { + CAN0RST_W { w: self } } #[doc = "Bit 26 - CAN1 reset"] - #[inline] - pub fn can1rst(&mut self) -> _CAN1RSTW { - _CAN1RSTW { w: self } + #[inline(always)] + pub fn can1rst(&mut self) -> CAN1RST_W { + CAN1RST_W { w: self } } #[doc = "Bit 27 - Backup interface reset"] - #[inline] - pub fn bkpirst(&mut self) -> _BKPIRSTW { - _BKPIRSTW { w: self } + #[inline(always)] + pub fn bkpirst(&mut self) -> BKPIRST_W { + BKPIRST_W { w: self } } #[doc = "Bit 28 - Power control reset"] - #[inline] - pub fn pmurst(&mut self) -> _PMURSTW { - _PMURSTW { w: self } + #[inline(always)] + pub fn pmurst(&mut self) -> PMURST_W { + PMURST_W { w: self } } #[doc = "Bit 29 - DAC reset"] - #[inline] - pub fn dacrst(&mut self) -> _DACRSTW { - _DACRSTW { w: self } + #[inline(always)] + pub fn dacrst(&mut self) -> DACRST_W { + DACRST_W { w: self } } } diff --git a/src/rcu/apb2en.rs b/src/rcu/apb2en.rs index 775e00a2eac6a6f64d0742ea31268e421a250a38..bd7c442553a2e8b12a994978e5f3d6e63e0ae9be 100644 --- a/src/rcu/apb2en.rs +++ b/src/rcu/apb2en.rs @@ -1,713 +1,390 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::APB2EN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct AFENR { - bits: bool, -} -impl AFENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PAENR { - bits: bool, -} -impl PAENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PBENR { - bits: bool, -} -impl PBENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PCENR { - bits: bool, -} -impl PCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PDENR { - bits: bool, -} -impl PDENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PEENR { - bits: bool, -} -impl PEENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ADC0ENR { - bits: bool, -} -impl ADC0ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ADC1ENR { - bits: bool, -} -impl ADC1ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER0ENR { - bits: bool, -} -impl TIMER0ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SPI0ENR { - bits: bool, -} -impl SPI0ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USART0ENR { - bits: bool, -} -impl USART0ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _AFENW<'a> { +#[doc = "Reader of register APB2EN"] +pub type R = crate::R; +#[doc = "Writer for register APB2EN"] +pub type W = crate::W; +#[doc = "Register APB2EN `reset()`'s with value 0"] +impl crate::ResetValue for super::APB2EN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `AFEN`"] +pub type AFEN_R = crate::R; +#[doc = "Write proxy for field `AFEN`"] +pub struct AFEN_W<'a> { w: &'a mut W, } -impl<'a> _AFENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> AFEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _PAENW<'a> { +#[doc = "Reader of field `PAEN`"] +pub type PAEN_R = crate::R; +#[doc = "Write proxy for field `PAEN`"] +pub struct PAEN_W<'a> { w: &'a mut W, } -impl<'a> _PAENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PAEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _PBENW<'a> { +#[doc = "Reader of field `PBEN`"] +pub type PBEN_R = crate::R; +#[doc = "Write proxy for field `PBEN`"] +pub struct PBEN_W<'a> { w: &'a mut W, } -impl<'a> _PBENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PBEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _PCENW<'a> { +#[doc = "Reader of field `PCEN`"] +pub type PCEN_R = crate::R; +#[doc = "Write proxy for field `PCEN`"] +pub struct PCEN_W<'a> { w: &'a mut W, } -impl<'a> _PCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _PDENW<'a> { +#[doc = "Reader of field `PDEN`"] +pub type PDEN_R = crate::R; +#[doc = "Write proxy for field `PDEN`"] +pub struct PDEN_W<'a> { w: &'a mut W, } -impl<'a> _PDENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PDEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _PEENW<'a> { +#[doc = "Reader of field `PEEN`"] +pub type PEEN_R = crate::R; +#[doc = "Write proxy for field `PEEN`"] +pub struct PEEN_W<'a> { w: &'a mut W, } -impl<'a> _PEENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PEEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _ADC0ENW<'a> { +#[doc = "Reader of field `ADC0EN`"] +pub type ADC0EN_R = crate::R; +#[doc = "Write proxy for field `ADC0EN`"] +pub struct ADC0EN_W<'a> { w: &'a mut W, } -impl<'a> _ADC0ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ADC0EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _ADC1ENW<'a> { +#[doc = "Reader of field `ADC1EN`"] +pub type ADC1EN_R = crate::R; +#[doc = "Write proxy for field `ADC1EN`"] +pub struct ADC1EN_W<'a> { w: &'a mut W, } -impl<'a> _ADC1ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ADC1EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER0ENW<'a> { +#[doc = "Reader of field `TIMER0EN`"] +pub type TIMER0EN_R = crate::R; +#[doc = "Write proxy for field `TIMER0EN`"] +pub struct TIMER0EN_W<'a> { w: &'a mut W, } -impl<'a> _TIMER0ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER0EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _SPI0ENW<'a> { +#[doc = "Reader of field `SPI0EN`"] +pub type SPI0EN_R = crate::R; +#[doc = "Write proxy for field `SPI0EN`"] +pub struct SPI0EN_W<'a> { w: &'a mut W, } -impl<'a> _SPI0ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SPI0EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _USART0ENW<'a> { +#[doc = "Reader of field `USART0EN`"] +pub type USART0EN_R = crate::R; +#[doc = "Write proxy for field `USART0EN`"] +pub struct USART0EN_W<'a> { w: &'a mut W, } -impl<'a> _USART0ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USART0EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Alternate function IO clock enable"] - #[inline] - pub fn afen(&self) -> AFENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - AFENR { bits } + #[inline(always)] + pub fn afen(&self) -> AFEN_R { + AFEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 2 - GPIO port A clock enable"] - #[inline] - pub fn paen(&self) -> PAENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PAENR { bits } + #[inline(always)] + pub fn paen(&self) -> PAEN_R { + PAEN_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - GPIO port B clock enable"] - #[inline] - pub fn pben(&self) -> PBENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PBENR { bits } + #[inline(always)] + pub fn pben(&self) -> PBEN_R { + PBEN_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - GPIO port C clock enable"] - #[inline] - pub fn pcen(&self) -> PCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PCENR { bits } + #[inline(always)] + pub fn pcen(&self) -> PCEN_R { + PCEN_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - GPIO port D clock enable"] - #[inline] - pub fn pden(&self) -> PDENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PDENR { bits } + #[inline(always)] + pub fn pden(&self) -> PDEN_R { + PDEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - GPIO port E clock enable"] - #[inline] - pub fn peen(&self) -> PEENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PEENR { bits } + #[inline(always)] + pub fn peen(&self) -> PEEN_R { + PEEN_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 9 - ADC0 clock enable"] - #[inline] - pub fn adc0en(&self) -> ADC0ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ADC0ENR { bits } + #[inline(always)] + pub fn adc0en(&self) -> ADC0EN_R { + ADC0EN_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - ADC1 clock enable"] - #[inline] - pub fn adc1en(&self) -> ADC1ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ADC1ENR { bits } + #[inline(always)] + pub fn adc1en(&self) -> ADC1EN_R { + ADC1EN_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - TIMER0 clock enable"] - #[inline] - pub fn timer0en(&self) -> TIMER0ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER0ENR { bits } + #[inline(always)] + pub fn timer0en(&self) -> TIMER0EN_R { + TIMER0EN_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - SPI0 clock enable"] - #[inline] - pub fn spi0en(&self) -> SPI0ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SPI0ENR { bits } + #[inline(always)] + pub fn spi0en(&self) -> SPI0EN_R { + SPI0EN_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 14 - USART0 clock enable"] - #[inline] - pub fn usart0en(&self) -> USART0ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USART0ENR { bits } + #[inline(always)] + pub fn usart0en(&self) -> USART0EN_R { + USART0EN_R::new(((self.bits >> 14) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Alternate function IO clock enable"] - #[inline] - pub fn afen(&mut self) -> _AFENW { - _AFENW { w: self } + #[inline(always)] + pub fn afen(&mut self) -> AFEN_W { + AFEN_W { w: self } } #[doc = "Bit 2 - GPIO port A clock enable"] - #[inline] - pub fn paen(&mut self) -> _PAENW { - _PAENW { w: self } + #[inline(always)] + pub fn paen(&mut self) -> PAEN_W { + PAEN_W { w: self } } #[doc = "Bit 3 - GPIO port B clock enable"] - #[inline] - pub fn pben(&mut self) -> _PBENW { - _PBENW { w: self } + #[inline(always)] + pub fn pben(&mut self) -> PBEN_W { + PBEN_W { w: self } } #[doc = "Bit 4 - GPIO port C clock enable"] - #[inline] - pub fn pcen(&mut self) -> _PCENW { - _PCENW { w: self } + #[inline(always)] + pub fn pcen(&mut self) -> PCEN_W { + PCEN_W { w: self } } #[doc = "Bit 5 - GPIO port D clock enable"] - #[inline] - pub fn pden(&mut self) -> _PDENW { - _PDENW { w: self } + #[inline(always)] + pub fn pden(&mut self) -> PDEN_W { + PDEN_W { w: self } } #[doc = "Bit 6 - GPIO port E clock enable"] - #[inline] - pub fn peen(&mut self) -> _PEENW { - _PEENW { w: self } + #[inline(always)] + pub fn peen(&mut self) -> PEEN_W { + PEEN_W { w: self } } #[doc = "Bit 9 - ADC0 clock enable"] - #[inline] - pub fn adc0en(&mut self) -> _ADC0ENW { - _ADC0ENW { w: self } + #[inline(always)] + pub fn adc0en(&mut self) -> ADC0EN_W { + ADC0EN_W { w: self } } #[doc = "Bit 10 - ADC1 clock enable"] - #[inline] - pub fn adc1en(&mut self) -> _ADC1ENW { - _ADC1ENW { w: self } + #[inline(always)] + pub fn adc1en(&mut self) -> ADC1EN_W { + ADC1EN_W { w: self } } #[doc = "Bit 11 - TIMER0 clock enable"] - #[inline] - pub fn timer0en(&mut self) -> _TIMER0ENW { - _TIMER0ENW { w: self } + #[inline(always)] + pub fn timer0en(&mut self) -> TIMER0EN_W { + TIMER0EN_W { w: self } } #[doc = "Bit 12 - SPI0 clock enable"] - #[inline] - pub fn spi0en(&mut self) -> _SPI0ENW { - _SPI0ENW { w: self } + #[inline(always)] + pub fn spi0en(&mut self) -> SPI0EN_W { + SPI0EN_W { w: self } } #[doc = "Bit 14 - USART0 clock enable"] - #[inline] - pub fn usart0en(&mut self) -> _USART0ENW { - _USART0ENW { w: self } + #[inline(always)] + pub fn usart0en(&mut self) -> USART0EN_W { + USART0EN_W { w: self } } } diff --git a/src/rcu/apb2rst.rs b/src/rcu/apb2rst.rs index 83dbdf637e0078c47fedd9f7ba516d094a029868..cd08fdf529742113aad9358ed07750ecf7398484 100644 --- a/src/rcu/apb2rst.rs +++ b/src/rcu/apb2rst.rs @@ -1,713 +1,390 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::APB2RST { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct AFRSTR { - bits: bool, -} -impl AFRSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PARSTR { - bits: bool, -} -impl PARSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PBRSTR { - bits: bool, -} -impl PBRSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PCRSTR { - bits: bool, -} -impl PCRSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PDRSTR { - bits: bool, -} -impl PDRSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PERSTR { - bits: bool, -} -impl PERSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ADC0RSTR { - bits: bool, -} -impl ADC0RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ADC1RSTR { - bits: bool, -} -impl ADC1RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TIMER0RSTR { - bits: bool, -} -impl TIMER0RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SPI0RSTR { - bits: bool, -} -impl SPI0RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USART0RSTR { - bits: bool, -} -impl USART0RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _AFRSTW<'a> { +#[doc = "Reader of register APB2RST"] +pub type R = crate::R; +#[doc = "Writer for register APB2RST"] +pub type W = crate::W; +#[doc = "Register APB2RST `reset()`'s with value 0"] +impl crate::ResetValue for super::APB2RST { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `AFRST`"] +pub type AFRST_R = crate::R; +#[doc = "Write proxy for field `AFRST`"] +pub struct AFRST_W<'a> { w: &'a mut W, } -impl<'a> _AFRSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> AFRST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _PARSTW<'a> { +#[doc = "Reader of field `PARST`"] +pub type PARST_R = crate::R; +#[doc = "Write proxy for field `PARST`"] +pub struct PARST_W<'a> { w: &'a mut W, } -impl<'a> _PARSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PARST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _PBRSTW<'a> { +#[doc = "Reader of field `PBRST`"] +pub type PBRST_R = crate::R; +#[doc = "Write proxy for field `PBRST`"] +pub struct PBRST_W<'a> { w: &'a mut W, } -impl<'a> _PBRSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PBRST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _PCRSTW<'a> { +#[doc = "Reader of field `PCRST`"] +pub type PCRST_R = crate::R; +#[doc = "Write proxy for field `PCRST`"] +pub struct PCRST_W<'a> { w: &'a mut W, } -impl<'a> _PCRSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PCRST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _PDRSTW<'a> { +#[doc = "Reader of field `PDRST`"] +pub type PDRST_R = crate::R; +#[doc = "Write proxy for field `PDRST`"] +pub struct PDRST_W<'a> { w: &'a mut W, } -impl<'a> _PDRSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PDRST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _PERSTW<'a> { +#[doc = "Reader of field `PERST`"] +pub type PERST_R = crate::R; +#[doc = "Write proxy for field `PERST`"] +pub struct PERST_W<'a> { w: &'a mut W, } -impl<'a> _PERSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PERST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _ADC0RSTW<'a> { +#[doc = "Reader of field `ADC0RST`"] +pub type ADC0RST_R = crate::R; +#[doc = "Write proxy for field `ADC0RST`"] +pub struct ADC0RST_W<'a> { w: &'a mut W, } -impl<'a> _ADC0RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ADC0RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _ADC1RSTW<'a> { +#[doc = "Reader of field `ADC1RST`"] +pub type ADC1RST_R = crate::R; +#[doc = "Write proxy for field `ADC1RST`"] +pub struct ADC1RST_W<'a> { w: &'a mut W, } -impl<'a> _ADC1RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ADC1RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _TIMER0RSTW<'a> { +#[doc = "Reader of field `TIMER0RST`"] +pub type TIMER0RST_R = crate::R; +#[doc = "Write proxy for field `TIMER0RST`"] +pub struct TIMER0RST_W<'a> { w: &'a mut W, } -impl<'a> _TIMER0RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TIMER0RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _SPI0RSTW<'a> { +#[doc = "Reader of field `SPI0RST`"] +pub type SPI0RST_R = crate::R; +#[doc = "Write proxy for field `SPI0RST`"] +pub struct SPI0RST_W<'a> { w: &'a mut W, } -impl<'a> _SPI0RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SPI0RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _USART0RSTW<'a> { +#[doc = "Reader of field `USART0RST`"] +pub type USART0RST_R = crate::R; +#[doc = "Write proxy for field `USART0RST`"] +pub struct USART0RST_W<'a> { w: &'a mut W, } -impl<'a> _USART0RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USART0RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Alternate function I/O reset"] - #[inline] - pub fn afrst(&self) -> AFRSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - AFRSTR { bits } + #[inline(always)] + pub fn afrst(&self) -> AFRST_R { + AFRST_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 2 - GPIO port A reset"] - #[inline] - pub fn parst(&self) -> PARSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PARSTR { bits } + #[inline(always)] + pub fn parst(&self) -> PARST_R { + PARST_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - GPIO port B reset"] - #[inline] - pub fn pbrst(&self) -> PBRSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PBRSTR { bits } + #[inline(always)] + pub fn pbrst(&self) -> PBRST_R { + PBRST_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - GPIO port C reset"] - #[inline] - pub fn pcrst(&self) -> PCRSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PCRSTR { bits } + #[inline(always)] + pub fn pcrst(&self) -> PCRST_R { + PCRST_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - GPIO port D reset"] - #[inline] - pub fn pdrst(&self) -> PDRSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PDRSTR { bits } + #[inline(always)] + pub fn pdrst(&self) -> PDRST_R { + PDRST_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - GPIO port E reset"] - #[inline] - pub fn perst(&self) -> PERSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PERSTR { bits } + #[inline(always)] + pub fn perst(&self) -> PERST_R { + PERST_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 9 - ADC0 reset"] - #[inline] - pub fn adc0rst(&self) -> ADC0RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ADC0RSTR { bits } + #[inline(always)] + pub fn adc0rst(&self) -> ADC0RST_R { + ADC0RST_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - ADC1 reset"] - #[inline] - pub fn adc1rst(&self) -> ADC1RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ADC1RSTR { bits } + #[inline(always)] + pub fn adc1rst(&self) -> ADC1RST_R { + ADC1RST_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Timer 0 reset"] - #[inline] - pub fn timer0rst(&self) -> TIMER0RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TIMER0RSTR { bits } + #[inline(always)] + pub fn timer0rst(&self) -> TIMER0RST_R { + TIMER0RST_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - SPI0 reset"] - #[inline] - pub fn spi0rst(&self) -> SPI0RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SPI0RSTR { bits } + #[inline(always)] + pub fn spi0rst(&self) -> SPI0RST_R { + SPI0RST_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 14 - USART0 Reset"] - #[inline] - pub fn usart0rst(&self) -> USART0RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USART0RSTR { bits } + #[inline(always)] + pub fn usart0rst(&self) -> USART0RST_R { + USART0RST_R::new(((self.bits >> 14) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Alternate function I/O reset"] - #[inline] - pub fn afrst(&mut self) -> _AFRSTW { - _AFRSTW { w: self } + #[inline(always)] + pub fn afrst(&mut self) -> AFRST_W { + AFRST_W { w: self } } #[doc = "Bit 2 - GPIO port A reset"] - #[inline] - pub fn parst(&mut self) -> _PARSTW { - _PARSTW { w: self } + #[inline(always)] + pub fn parst(&mut self) -> PARST_W { + PARST_W { w: self } } #[doc = "Bit 3 - GPIO port B reset"] - #[inline] - pub fn pbrst(&mut self) -> _PBRSTW { - _PBRSTW { w: self } + #[inline(always)] + pub fn pbrst(&mut self) -> PBRST_W { + PBRST_W { w: self } } #[doc = "Bit 4 - GPIO port C reset"] - #[inline] - pub fn pcrst(&mut self) -> _PCRSTW { - _PCRSTW { w: self } + #[inline(always)] + pub fn pcrst(&mut self) -> PCRST_W { + PCRST_W { w: self } } #[doc = "Bit 5 - GPIO port D reset"] - #[inline] - pub fn pdrst(&mut self) -> _PDRSTW { - _PDRSTW { w: self } + #[inline(always)] + pub fn pdrst(&mut self) -> PDRST_W { + PDRST_W { w: self } } #[doc = "Bit 6 - GPIO port E reset"] - #[inline] - pub fn perst(&mut self) -> _PERSTW { - _PERSTW { w: self } + #[inline(always)] + pub fn perst(&mut self) -> PERST_W { + PERST_W { w: self } } #[doc = "Bit 9 - ADC0 reset"] - #[inline] - pub fn adc0rst(&mut self) -> _ADC0RSTW { - _ADC0RSTW { w: self } + #[inline(always)] + pub fn adc0rst(&mut self) -> ADC0RST_W { + ADC0RST_W { w: self } } #[doc = "Bit 10 - ADC1 reset"] - #[inline] - pub fn adc1rst(&mut self) -> _ADC1RSTW { - _ADC1RSTW { w: self } + #[inline(always)] + pub fn adc1rst(&mut self) -> ADC1RST_W { + ADC1RST_W { w: self } } #[doc = "Bit 11 - Timer 0 reset"] - #[inline] - pub fn timer0rst(&mut self) -> _TIMER0RSTW { - _TIMER0RSTW { w: self } + #[inline(always)] + pub fn timer0rst(&mut self) -> TIMER0RST_W { + TIMER0RST_W { w: self } } #[doc = "Bit 12 - SPI0 reset"] - #[inline] - pub fn spi0rst(&mut self) -> _SPI0RSTW { - _SPI0RSTW { w: self } + #[inline(always)] + pub fn spi0rst(&mut self) -> SPI0RST_W { + SPI0RST_W { w: self } } #[doc = "Bit 14 - USART0 Reset"] - #[inline] - pub fn usart0rst(&mut self) -> _USART0RSTW { - _USART0RSTW { w: self } + #[inline(always)] + pub fn usart0rst(&mut self) -> USART0RST_W { + USART0RST_W { w: self } } } diff --git a/src/rcu/bdctl.rs b/src/rcu/bdctl.rs index b62d93c4385174b2a2d443ca1fb474b3d06b1759..d595abd8826e096341240f7f3a82ed46716a269f 100644 --- a/src/rcu/bdctl.rs +++ b/src/rcu/bdctl.rs @@ -1,372 +1,183 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::BDCTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct LXTALENR { - bits: bool, -} -impl LXTALENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LXTALSTBR { - bits: bool, -} -impl LXTALSTBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LXTALBPSR { - bits: bool, -} -impl LXTALBPSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTCSRCR { - bits: u8, -} -impl RTCSRCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RTCENR { - bits: bool, -} -impl RTCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BKPRSTR { - bits: bool, -} -impl BKPRSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _LXTALENW<'a> { +#[doc = "Reader of register BDCTL"] +pub type R = crate::R; +#[doc = "Writer for register BDCTL"] +pub type W = crate::W; +#[doc = "Register BDCTL `reset()`'s with value 0x18"] +impl crate::ResetValue for super::BDCTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x18 + } +} +#[doc = "Reader of field `LXTALEN`"] +pub type LXTALEN_R = crate::R; +#[doc = "Write proxy for field `LXTALEN`"] +pub struct LXTALEN_W<'a> { w: &'a mut W, } -impl<'a> _LXTALENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LXTALEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _LXTALBPSW<'a> { +#[doc = "Reader of field `LXTALSTB`"] +pub type LXTALSTB_R = crate::R; +#[doc = "Reader of field `LXTALBPS`"] +pub type LXTALBPS_R = crate::R; +#[doc = "Write proxy for field `LXTALBPS`"] +pub struct LXTALBPS_W<'a> { w: &'a mut W, } -impl<'a> _LXTALBPSW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LXTALBPS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _RTCSRCW<'a> { +#[doc = "Reader of field `RTCSRC`"] +pub type RTCSRC_R = crate::R; +#[doc = "Write proxy for field `RTCSRC`"] +pub struct RTCSRC_W<'a> { w: &'a mut W, } -impl<'a> _RTCSRCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RTCSRC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u32) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _RTCENW<'a> { +#[doc = "Reader of field `RTCEN`"] +pub type RTCEN_R = crate::R; +#[doc = "Write proxy for field `RTCEN`"] +pub struct RTCEN_W<'a> { w: &'a mut W, } -impl<'a> _RTCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _BKPRSTW<'a> { +#[doc = "Reader of field `BKPRST`"] +pub type BKPRST_R = crate::R; +#[doc = "Write proxy for field `BKPRST`"] +pub struct BKPRST_W<'a> { w: &'a mut W, } -impl<'a> _BKPRSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BKPRST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - LXTAL enable"] - #[inline] - pub fn lxtalen(&self) -> LXTALENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LXTALENR { bits } + #[inline(always)] + pub fn lxtalen(&self) -> LXTALEN_R { + LXTALEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - External low-speed oscillator stabilization"] - #[inline] - pub fn lxtalstb(&self) -> LXTALSTBR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LXTALSTBR { bits } + #[inline(always)] + pub fn lxtalstb(&self) -> LXTALSTB_R { + LXTALSTB_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - LXTAL bypass mode enable"] - #[inline] - pub fn lxtalbps(&self) -> LXTALBPSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LXTALBPSR { bits } + #[inline(always)] + pub fn lxtalbps(&self) -> LXTALBPS_R { + LXTALBPS_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bits 8:9 - RTC clock entry selection"] - #[inline] - pub fn rtcsrc(&self) -> RTCSRCR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RTCSRCR { bits } + #[inline(always)] + pub fn rtcsrc(&self) -> RTCSRC_R { + RTCSRC_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bit 15 - RTC clock enable"] - #[inline] - pub fn rtcen(&self) -> RTCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTCENR { bits } + #[inline(always)] + pub fn rtcen(&self) -> RTCEN_R { + RTCEN_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 16 - Backup domain reset"] - #[inline] - pub fn bkprst(&self) -> BKPRSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BKPRSTR { bits } + #[inline(always)] + pub fn bkprst(&self) -> BKPRST_R { + BKPRST_R::new(((self.bits >> 16) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x18 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - LXTAL enable"] - #[inline] - pub fn lxtalen(&mut self) -> _LXTALENW { - _LXTALENW { w: self } + #[inline(always)] + pub fn lxtalen(&mut self) -> LXTALEN_W { + LXTALEN_W { w: self } } #[doc = "Bit 2 - LXTAL bypass mode enable"] - #[inline] - pub fn lxtalbps(&mut self) -> _LXTALBPSW { - _LXTALBPSW { w: self } + #[inline(always)] + pub fn lxtalbps(&mut self) -> LXTALBPS_W { + LXTALBPS_W { w: self } } #[doc = "Bits 8:9 - RTC clock entry selection"] - #[inline] - pub fn rtcsrc(&mut self) -> _RTCSRCW { - _RTCSRCW { w: self } + #[inline(always)] + pub fn rtcsrc(&mut self) -> RTCSRC_W { + RTCSRC_W { w: self } } #[doc = "Bit 15 - RTC clock enable"] - #[inline] - pub fn rtcen(&mut self) -> _RTCENW { - _RTCENW { w: self } + #[inline(always)] + pub fn rtcen(&mut self) -> RTCEN_W { + RTCEN_W { w: self } } #[doc = "Bit 16 - Backup domain reset"] - #[inline] - pub fn bkprst(&mut self) -> _BKPRSTW { - _BKPRSTW { w: self } + #[inline(always)] + pub fn bkprst(&mut self) -> BKPRST_W { + BKPRST_W { w: self } } } diff --git a/src/rcu/cfg0.rs b/src/rcu/cfg0.rs index 4053a0842cd91b398459c4e6098aff21e95a44d7..59ccbbfc234fc516a777c5318992dcf7ad088d10 100644 --- a/src/rcu/cfg0.rs +++ b/src/rcu/cfg0.rs @@ -1,649 +1,351 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CFG0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SCSR { - bits: u8, -} -impl SCSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SCSSR { - bits: u8, -} -impl SCSSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct AHBPSCR { - bits: u8, -} -impl AHBPSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct APB1PSCR { - bits: u8, -} -impl APB1PSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct APB2PSCR { - bits: u8, -} -impl APB2PSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ADCPSC_1_0R { - bits: u8, -} -impl ADCPSC_1_0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PLLSELR { - bits: bool, -} -impl PLLSELR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PREDV0_LSBR { - bits: bool, -} -impl PREDV0_LSBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PLLMF_3_0R { - bits: u8, -} -impl PLLMF_3_0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct USBFSPSCR { - bits: u8, -} -impl USBFSPSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CKOUT0SELR { - bits: u8, -} -impl CKOUT0SELR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ADCPSC_2R { - bits: bool, -} -impl ADCPSC_2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PLLMF_4R { - bits: bool, -} -impl PLLMF_4R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _SCSW<'a> { +#[doc = "Reader of register CFG0"] +pub type R = crate::R; +#[doc = "Writer for register CFG0"] +pub type W = crate::W; +#[doc = "Register CFG0 `reset()`'s with value 0"] +impl crate::ResetValue for super::CFG0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `SCS`"] +pub type SCS_R = crate::R; +#[doc = "Write proxy for field `SCS`"] +pub struct SCS_W<'a> { w: &'a mut W, } -impl<'a> _SCSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SCS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x03) | ((value as u32) & 0x03); self.w } } -#[doc = r" Proxy"] -pub struct _AHBPSCW<'a> { +#[doc = "Reader of field `SCSS`"] +pub type SCSS_R = crate::R; +#[doc = "Reader of field `AHBPSC`"] +pub type AHBPSC_R = crate::R; +#[doc = "Write proxy for field `AHBPSC`"] +pub struct AHBPSC_W<'a> { w: &'a mut W, } -impl<'a> _AHBPSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> AHBPSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 4)) | (((value as u32) & 0x0f) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _APB1PSCW<'a> { +#[doc = "Reader of field `APB1PSC`"] +pub type APB1PSC_R = crate::R; +#[doc = "Write proxy for field `APB1PSC`"] +pub struct APB1PSC_W<'a> { w: &'a mut W, } -impl<'a> _APB1PSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> APB1PSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 8)) | (((value as u32) & 0x07) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _APB2PSCW<'a> { +#[doc = "Reader of field `APB2PSC`"] +pub type APB2PSC_R = crate::R; +#[doc = "Write proxy for field `APB2PSC`"] +pub struct APB2PSC_W<'a> { w: &'a mut W, } -impl<'a> _APB2PSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> APB2PSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 11)) | (((value as u32) & 0x07) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _ADCPSC_1_0W<'a> { +#[doc = "Reader of field `ADCPSC_1_0`"] +pub type ADCPSC_1_0_R = crate::R; +#[doc = "Write proxy for field `ADCPSC_1_0`"] +pub struct ADCPSC_1_0_W<'a> { w: &'a mut W, } -impl<'a> _ADCPSC_1_0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ADCPSC_1_0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 14)) | (((value as u32) & 0x03) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _PLLSELW<'a> { +#[doc = "Reader of field `PLLSEL`"] +pub type PLLSEL_R = crate::R; +#[doc = "Write proxy for field `PLLSEL`"] +pub struct PLLSEL_W<'a> { w: &'a mut W, } -impl<'a> _PLLSELW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PLLSEL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _PREDV0_LSBW<'a> { +#[doc = "Reader of field `PREDV0_LSB`"] +pub type PREDV0_LSB_R = crate::R; +#[doc = "Write proxy for field `PREDV0_LSB`"] +pub struct PREDV0_LSB_W<'a> { w: &'a mut W, } -impl<'a> _PREDV0_LSBW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PREDV0_LSB_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _PLLMF_3_0W<'a> { +#[doc = "Reader of field `PLLMF_3_0`"] +pub type PLLMF_3_0_R = crate::R; +#[doc = "Write proxy for field `PLLMF_3_0`"] +pub struct PLLMF_3_0_W<'a> { w: &'a mut W, } -impl<'a> _PLLMF_3_0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PLLMF_3_0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 18)) | (((value as u32) & 0x0f) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _USBFSPSCW<'a> { +#[doc = "Reader of field `USBFSPSC`"] +pub type USBFSPSC_R = crate::R; +#[doc = "Write proxy for field `USBFSPSC`"] +pub struct USBFSPSC_W<'a> { w: &'a mut W, } -impl<'a> _USBFSPSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> USBFSPSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 22)) | (((value as u32) & 0x03) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _CKOUT0SELW<'a> { +#[doc = "Reader of field `CKOUT0SEL`"] +pub type CKOUT0SEL_R = crate::R; +#[doc = "Write proxy for field `CKOUT0SEL`"] +pub struct CKOUT0SEL_W<'a> { w: &'a mut W, } -impl<'a> _CKOUT0SELW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CKOUT0SEL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 24)) | (((value as u32) & 0x0f) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _ADCPSC_2W<'a> { +#[doc = "Reader of field `ADCPSC_2`"] +pub type ADCPSC_2_R = crate::R; +#[doc = "Write proxy for field `ADCPSC_2`"] +pub struct ADCPSC_2_W<'a> { w: &'a mut W, } -impl<'a> _ADCPSC_2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ADCPSC_2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _PLLMF_4W<'a> { +#[doc = "Reader of field `PLLMF_4`"] +pub type PLLMF_4_R = crate::R; +#[doc = "Write proxy for field `PLLMF_4`"] +pub struct PLLMF_4_W<'a> { w: &'a mut W, } -impl<'a> _PLLMF_4W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PLLMF_4_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:1 - System clock switch"] - #[inline] - pub fn scs(&self) -> SCSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SCSR { bits } + #[inline(always)] + pub fn scs(&self) -> SCS_R { + SCS_R::new((self.bits & 0x03) as u8) } #[doc = "Bits 2:3 - System clock switch status"] - #[inline] - pub fn scss(&self) -> SCSSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - SCSSR { bits } + #[inline(always)] + pub fn scss(&self) -> SCSS_R { + SCSS_R::new(((self.bits >> 2) & 0x03) as u8) } #[doc = "Bits 4:7 - AHB prescaler selection"] - #[inline] - pub fn ahbpsc(&self) -> AHBPSCR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - AHBPSCR { bits } + #[inline(always)] + pub fn ahbpsc(&self) -> AHBPSC_R { + AHBPSC_R::new(((self.bits >> 4) & 0x0f) as u8) } #[doc = "Bits 8:10 - APB1 prescaler selection"] - #[inline] - pub fn apb1psc(&self) -> APB1PSCR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - APB1PSCR { bits } + #[inline(always)] + pub fn apb1psc(&self) -> APB1PSC_R { + APB1PSC_R::new(((self.bits >> 8) & 0x07) as u8) } #[doc = "Bits 11:13 - APB2 prescaler selection"] - #[inline] - pub fn apb2psc(&self) -> APB2PSCR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - APB2PSCR { bits } + #[inline(always)] + pub fn apb2psc(&self) -> APB2PSC_R { + APB2PSC_R::new(((self.bits >> 11) & 0x07) as u8) } #[doc = "Bits 14:15 - ADC clock prescaler selection"] - #[inline] - pub fn adcpsc_1_0(&self) -> ADCPSC_1_0R { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ADCPSC_1_0R { bits } + #[inline(always)] + pub fn adcpsc_1_0(&self) -> ADCPSC_1_0_R { + ADCPSC_1_0_R::new(((self.bits >> 14) & 0x03) as u8) } #[doc = "Bit 16 - PLL Clock Source Selection"] - #[inline] - pub fn pllsel(&self) -> PLLSELR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PLLSELR { bits } + #[inline(always)] + pub fn pllsel(&self) -> PLLSEL_R { + PLLSEL_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - The LSB of PREDV0 division factor"] - #[inline] - pub fn predv0_lsb(&self) -> PREDV0_LSBR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PREDV0_LSBR { bits } + #[inline(always)] + pub fn predv0_lsb(&self) -> PREDV0_LSB_R { + PREDV0_LSB_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bits 18:21 - The PLL clock multiplication factor"] - #[inline] - pub fn pllmf_3_0(&self) -> PLLMF_3_0R { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PLLMF_3_0R { bits } + #[inline(always)] + pub fn pllmf_3_0(&self) -> PLLMF_3_0_R { + PLLMF_3_0_R::new(((self.bits >> 18) & 0x0f) as u8) } #[doc = "Bits 22:23 - USBFS clock prescaler selection"] - #[inline] - pub fn usbfspsc(&self) -> USBFSPSCR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - USBFSPSCR { bits } + #[inline(always)] + pub fn usbfspsc(&self) -> USBFSPSC_R { + USBFSPSC_R::new(((self.bits >> 22) & 0x03) as u8) } #[doc = "Bits 24:27 - CKOUT0 Clock Source Selection"] - #[inline] - pub fn ckout0sel(&self) -> CKOUT0SELR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CKOUT0SELR { bits } + #[inline(always)] + pub fn ckout0sel(&self) -> CKOUT0SEL_R { + CKOUT0SEL_R::new(((self.bits >> 24) & 0x0f) as u8) } #[doc = "Bit 28 - Bit 2 of ADCPSC"] - #[inline] - pub fn adcpsc_2(&self) -> ADCPSC_2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ADCPSC_2R { bits } + #[inline(always)] + pub fn adcpsc_2(&self) -> ADCPSC_2_R { + ADCPSC_2_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Bit 4 of PLLMF"] - #[inline] - pub fn pllmf_4(&self) -> PLLMF_4R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PLLMF_4R { bits } + #[inline(always)] + pub fn pllmf_4(&self) -> PLLMF_4_R { + PLLMF_4_R::new(((self.bits >> 29) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:1 - System clock switch"] - #[inline] - pub fn scs(&mut self) -> _SCSW { - _SCSW { w: self } + #[inline(always)] + pub fn scs(&mut self) -> SCS_W { + SCS_W { w: self } } #[doc = "Bits 4:7 - AHB prescaler selection"] - #[inline] - pub fn ahbpsc(&mut self) -> _AHBPSCW { - _AHBPSCW { w: self } + #[inline(always)] + pub fn ahbpsc(&mut self) -> AHBPSC_W { + AHBPSC_W { w: self } } #[doc = "Bits 8:10 - APB1 prescaler selection"] - #[inline] - pub fn apb1psc(&mut self) -> _APB1PSCW { - _APB1PSCW { w: self } + #[inline(always)] + pub fn apb1psc(&mut self) -> APB1PSC_W { + APB1PSC_W { w: self } } #[doc = "Bits 11:13 - APB2 prescaler selection"] - #[inline] - pub fn apb2psc(&mut self) -> _APB2PSCW { - _APB2PSCW { w: self } + #[inline(always)] + pub fn apb2psc(&mut self) -> APB2PSC_W { + APB2PSC_W { w: self } } #[doc = "Bits 14:15 - ADC clock prescaler selection"] - #[inline] - pub fn adcpsc_1_0(&mut self) -> _ADCPSC_1_0W { - _ADCPSC_1_0W { w: self } + #[inline(always)] + pub fn adcpsc_1_0(&mut self) -> ADCPSC_1_0_W { + ADCPSC_1_0_W { w: self } } #[doc = "Bit 16 - PLL Clock Source Selection"] - #[inline] - pub fn pllsel(&mut self) -> _PLLSELW { - _PLLSELW { w: self } + #[inline(always)] + pub fn pllsel(&mut self) -> PLLSEL_W { + PLLSEL_W { w: self } } #[doc = "Bit 17 - The LSB of PREDV0 division factor"] - #[inline] - pub fn predv0_lsb(&mut self) -> _PREDV0_LSBW { - _PREDV0_LSBW { w: self } + #[inline(always)] + pub fn predv0_lsb(&mut self) -> PREDV0_LSB_W { + PREDV0_LSB_W { w: self } } #[doc = "Bits 18:21 - The PLL clock multiplication factor"] - #[inline] - pub fn pllmf_3_0(&mut self) -> _PLLMF_3_0W { - _PLLMF_3_0W { w: self } + #[inline(always)] + pub fn pllmf_3_0(&mut self) -> PLLMF_3_0_W { + PLLMF_3_0_W { w: self } } #[doc = "Bits 22:23 - USBFS clock prescaler selection"] - #[inline] - pub fn usbfspsc(&mut self) -> _USBFSPSCW { - _USBFSPSCW { w: self } + #[inline(always)] + pub fn usbfspsc(&mut self) -> USBFSPSC_W { + USBFSPSC_W { w: self } } #[doc = "Bits 24:27 - CKOUT0 Clock Source Selection"] - #[inline] - pub fn ckout0sel(&mut self) -> _CKOUT0SELW { - _CKOUT0SELW { w: self } + #[inline(always)] + pub fn ckout0sel(&mut self) -> CKOUT0SEL_W { + CKOUT0SEL_W { w: self } } #[doc = "Bit 28 - Bit 2 of ADCPSC"] - #[inline] - pub fn adcpsc_2(&mut self) -> _ADCPSC_2W { - _ADCPSC_2W { w: self } + #[inline(always)] + pub fn adcpsc_2(&mut self) -> ADCPSC_2_W { + ADCPSC_2_W { w: self } } #[doc = "Bit 29 - Bit 4 of PLLMF"] - #[inline] - pub fn pllmf_4(&mut self) -> _PLLMF_4W { - _PLLMF_4W { w: self } + #[inline(always)] + pub fn pllmf_4(&mut self) -> PLLMF_4_W { + PLLMF_4_W { w: self } } } diff --git a/src/rcu/cfg1.rs b/src/rcu/cfg1.rs index 3a00bfdff11f99958d8c6215aac1989a236b67f1..5412de86d984ba3f4a83928091e6ccf8c3301c81 100644 --- a/src/rcu/cfg1.rs +++ b/src/rcu/cfg1.rs @@ -1,405 +1,214 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CFG1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PREDV0R { - bits: u8, -} -impl PREDV0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PREDV1R { - bits: u8, -} -impl PREDV1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PLL1MFR { - bits: u8, -} -impl PLL1MFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PLL2MFR { - bits: u8, -} -impl PLL2MFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PREDV0SELR { - bits: bool, -} -impl PREDV0SELR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct I2S1SELR { - bits: bool, -} -impl I2S1SELR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct I2S2SELR { - bits: bool, -} -impl I2S2SELR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _PREDV0W<'a> { +#[doc = "Reader of register CFG1"] +pub type R = crate::R; +#[doc = "Writer for register CFG1"] +pub type W = crate::W; +#[doc = "Register CFG1 `reset()`'s with value 0"] +impl crate::ResetValue for super::CFG1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PREDV0`"] +pub type PREDV0_R = crate::R; +#[doc = "Write proxy for field `PREDV0`"] +pub struct PREDV0_W<'a> { w: &'a mut W, } -impl<'a> _PREDV0W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PREDV0_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } -#[doc = r" Proxy"] -pub struct _PREDV1W<'a> { +#[doc = "Reader of field `PREDV1`"] +pub type PREDV1_R = crate::R; +#[doc = "Write proxy for field `PREDV1`"] +pub struct PREDV1_W<'a> { w: &'a mut W, } -impl<'a> _PREDV1W<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PREDV1_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 4)) | (((value as u32) & 0x0f) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _PLL1MFW<'a> { +#[doc = "Reader of field `PLL1MF`"] +pub type PLL1MF_R = crate::R; +#[doc = "Write proxy for field `PLL1MF`"] +pub struct PLL1MF_W<'a> { w: &'a mut W, } -impl<'a> _PLL1MFW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PLL1MF_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 8)) | (((value as u32) & 0x0f) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _PLL2MFW<'a> { +#[doc = "Reader of field `PLL2MF`"] +pub type PLL2MF_R = crate::R; +#[doc = "Write proxy for field `PLL2MF`"] +pub struct PLL2MF_W<'a> { w: &'a mut W, } -impl<'a> _PLL2MFW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PLL2MF_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 12)) | (((value as u32) & 0x0f) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _PREDV0SELW<'a> { +#[doc = "Reader of field `PREDV0SEL`"] +pub type PREDV0SEL_R = crate::R; +#[doc = "Write proxy for field `PREDV0SEL`"] +pub struct PREDV0SEL_W<'a> { w: &'a mut W, } -impl<'a> _PREDV0SELW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PREDV0SEL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _I2S1SELW<'a> { +#[doc = "Reader of field `I2S1SEL`"] +pub type I2S1SEL_R = crate::R; +#[doc = "Write proxy for field `I2S1SEL`"] +pub struct I2S1SEL_W<'a> { w: &'a mut W, } -impl<'a> _I2S1SELW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> I2S1SEL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _I2S2SELW<'a> { +#[doc = "Reader of field `I2S2SEL`"] +pub type I2S2SEL_R = crate::R; +#[doc = "Write proxy for field `I2S2SEL`"] +pub struct I2S2SEL_W<'a> { w: &'a mut W, } -impl<'a> _I2S2SELW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> I2S2SEL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:3 - PREDV0 division factor"] - #[inline] - pub fn predv0(&self) -> PREDV0R { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PREDV0R { bits } + #[inline(always)] + pub fn predv0(&self) -> PREDV0_R { + PREDV0_R::new((self.bits & 0x0f) as u8) } #[doc = "Bits 4:7 - PREDV1 division factor"] - #[inline] - pub fn predv1(&self) -> PREDV1R { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PREDV1R { bits } + #[inline(always)] + pub fn predv1(&self) -> PREDV1_R { + PREDV1_R::new(((self.bits >> 4) & 0x0f) as u8) } #[doc = "Bits 8:11 - The PLL1 clock multiplication factor"] - #[inline] - pub fn pll1mf(&self) -> PLL1MFR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PLL1MFR { bits } + #[inline(always)] + pub fn pll1mf(&self) -> PLL1MF_R { + PLL1MF_R::new(((self.bits >> 8) & 0x0f) as u8) } #[doc = "Bits 12:15 - The PLL2 clock multiplication factor"] - #[inline] - pub fn pll2mf(&self) -> PLL2MFR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PLL2MFR { bits } + #[inline(always)] + pub fn pll2mf(&self) -> PLL2MF_R { + PLL2MF_R::new(((self.bits >> 12) & 0x0f) as u8) } #[doc = "Bit 16 - PREDV0 input Clock Source Selection"] - #[inline] - pub fn predv0sel(&self) -> PREDV0SELR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PREDV0SELR { bits } + #[inline(always)] + pub fn predv0sel(&self) -> PREDV0SEL_R { + PREDV0SEL_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - I2S1 Clock Source Selection"] - #[inline] - pub fn i2s1sel(&self) -> I2S1SELR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - I2S1SELR { bits } + #[inline(always)] + pub fn i2s1sel(&self) -> I2S1SEL_R { + I2S1SEL_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - I2S2 Clock Source Selection"] - #[inline] - pub fn i2s2sel(&self) -> I2S2SELR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - I2S2SELR { bits } + #[inline(always)] + pub fn i2s2sel(&self) -> I2S2SEL_R { + I2S2SEL_R::new(((self.bits >> 18) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:3 - PREDV0 division factor"] - #[inline] - pub fn predv0(&mut self) -> _PREDV0W { - _PREDV0W { w: self } + #[inline(always)] + pub fn predv0(&mut self) -> PREDV0_W { + PREDV0_W { w: self } } #[doc = "Bits 4:7 - PREDV1 division factor"] - #[inline] - pub fn predv1(&mut self) -> _PREDV1W { - _PREDV1W { w: self } + #[inline(always)] + pub fn predv1(&mut self) -> PREDV1_W { + PREDV1_W { w: self } } #[doc = "Bits 8:11 - The PLL1 clock multiplication factor"] - #[inline] - pub fn pll1mf(&mut self) -> _PLL1MFW { - _PLL1MFW { w: self } + #[inline(always)] + pub fn pll1mf(&mut self) -> PLL1MF_W { + PLL1MF_W { w: self } } #[doc = "Bits 12:15 - The PLL2 clock multiplication factor"] - #[inline] - pub fn pll2mf(&mut self) -> _PLL2MFW { - _PLL2MFW { w: self } + #[inline(always)] + pub fn pll2mf(&mut self) -> PLL2MF_W { + PLL2MF_W { w: self } } #[doc = "Bit 16 - PREDV0 input Clock Source Selection"] - #[inline] - pub fn predv0sel(&mut self) -> _PREDV0SELW { - _PREDV0SELW { w: self } + #[inline(always)] + pub fn predv0sel(&mut self) -> PREDV0SEL_W { + PREDV0SEL_W { w: self } } #[doc = "Bit 17 - I2S1 Clock Source Selection"] - #[inline] - pub fn i2s1sel(&mut self) -> _I2S1SELW { - _I2S1SELW { w: self } + #[inline(always)] + pub fn i2s1sel(&mut self) -> I2S1SEL_W { + I2S1SEL_W { w: self } } #[doc = "Bit 18 - I2S2 Clock Source Selection"] - #[inline] - pub fn i2s2sel(&mut self) -> _I2S2SELW { - _I2S2SELW { w: self } + #[inline(always)] + pub fn i2s2sel(&mut self) -> I2S2SEL_W { + I2S2SEL_W { w: self } } } diff --git a/src/rcu/ctl.rs b/src/rcu/ctl.rs index fa89b0c4c56b68191e1725303139153170cd024f..979ec38800e04a85608ce242f1285aa4f3182bce 100644 --- a/src/rcu/ctl.rs +++ b/src/rcu/ctl.rs @@ -1,694 +1,320 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IRC8MENR { - bits: bool, -} -impl IRC8MENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IRC8MSTBR { - bits: bool, -} -impl IRC8MSTBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IRC8MADJR { - bits: u8, -} -impl IRC8MADJR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct IRC8MCALIBR { - bits: u8, -} -impl IRC8MCALIBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct HXTALENR { - bits: bool, -} -impl HXTALENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HXTALSTBR { - bits: bool, -} -impl HXTALSTBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HXTALBPSR { - bits: bool, -} -impl HXTALBPSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CKMENR { - bits: bool, -} -impl CKMENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PLLENR { - bits: bool, -} -impl PLLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PLLSTBR { - bits: bool, -} -impl PLLSTBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PLL1ENR { - bits: bool, -} -impl PLL1ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PLL1STBR { - bits: bool, -} -impl PLL1STBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PLL2ENR { - bits: bool, -} -impl PLL2ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PLL2STBR { - bits: bool, -} -impl PLL2STBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _IRC8MENW<'a> { +#[doc = "Reader of register CTL"] +pub type R = crate::R; +#[doc = "Writer for register CTL"] +pub type W = crate::W; +#[doc = "Register CTL `reset()`'s with value 0x83"] +impl crate::ResetValue for super::CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x83 + } +} +#[doc = "Reader of field `IRC8MEN`"] +pub type IRC8MEN_R = crate::R; +#[doc = "Write proxy for field `IRC8MEN`"] +pub struct IRC8MEN_W<'a> { w: &'a mut W, } -impl<'a> _IRC8MENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IRC8MEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _IRC8MADJW<'a> { +#[doc = "Reader of field `IRC8MSTB`"] +pub type IRC8MSTB_R = crate::R; +#[doc = "Reader of field `IRC8MADJ`"] +pub type IRC8MADJ_R = crate::R; +#[doc = "Write proxy for field `IRC8MADJ`"] +pub struct IRC8MADJ_W<'a> { w: &'a mut W, } -impl<'a> _IRC8MADJW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IRC8MADJ_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 3)) | (((value as u32) & 0x1f) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _HXTALENW<'a> { +#[doc = "Reader of field `IRC8MCALIB`"] +pub type IRC8MCALIB_R = crate::R; +#[doc = "Reader of field `HXTALEN`"] +pub type HXTALEN_R = crate::R; +#[doc = "Write proxy for field `HXTALEN`"] +pub struct HXTALEN_W<'a> { w: &'a mut W, } -impl<'a> _HXTALENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HXTALEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _HXTALBPSW<'a> { +#[doc = "Reader of field `HXTALSTB`"] +pub type HXTALSTB_R = crate::R; +#[doc = "Reader of field `HXTALBPS`"] +pub type HXTALBPS_R = crate::R; +#[doc = "Write proxy for field `HXTALBPS`"] +pub struct HXTALBPS_W<'a> { w: &'a mut W, } -impl<'a> _HXTALBPSW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HXTALBPS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _CKMENW<'a> { +#[doc = "Reader of field `CKMEN`"] +pub type CKMEN_R = crate::R; +#[doc = "Write proxy for field `CKMEN`"] +pub struct CKMEN_W<'a> { w: &'a mut W, } -impl<'a> _CKMENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CKMEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _PLLENW<'a> { +#[doc = "Reader of field `PLLEN`"] +pub type PLLEN_R = crate::R; +#[doc = "Write proxy for field `PLLEN`"] +pub struct PLLEN_W<'a> { w: &'a mut W, } -impl<'a> _PLLENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PLLEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } -#[doc = r" Proxy"] -pub struct _PLL1ENW<'a> { +#[doc = "Reader of field `PLLSTB`"] +pub type PLLSTB_R = crate::R; +#[doc = "Reader of field `PLL1EN`"] +pub type PLL1EN_R = crate::R; +#[doc = "Write proxy for field `PLL1EN`"] +pub struct PLL1EN_W<'a> { w: &'a mut W, } -impl<'a> _PLL1ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PLL1EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _PLL2ENW<'a> { +#[doc = "Reader of field `PLL1STB`"] +pub type PLL1STB_R = crate::R; +#[doc = "Reader of field `PLL2EN`"] +pub type PLL2EN_R = crate::R; +#[doc = "Write proxy for field `PLL2EN`"] +pub struct PLL2EN_W<'a> { w: &'a mut W, } -impl<'a> _PLL2ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PLL2EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } +#[doc = "Reader of field `PLL2STB`"] +pub type PLL2STB_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Internal 8MHz RC oscillator Enable"] - #[inline] - pub fn irc8men(&self) -> IRC8MENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IRC8MENR { bits } + #[inline(always)] + pub fn irc8men(&self) -> IRC8MEN_R { + IRC8MEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - IRC8M Internal 8MHz RC Oscillator stabilization Flag"] - #[inline] - pub fn irc8mstb(&self) -> IRC8MSTBR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IRC8MSTBR { bits } + #[inline(always)] + pub fn irc8mstb(&self) -> IRC8MSTB_R { + IRC8MSTB_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bits 3:7 - Internal 8MHz RC Oscillator clock trim adjust value"] - #[inline] - pub fn irc8madj(&self) -> IRC8MADJR { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - IRC8MADJR { bits } + #[inline(always)] + pub fn irc8madj(&self) -> IRC8MADJ_R { + IRC8MADJ_R::new(((self.bits >> 3) & 0x1f) as u8) } #[doc = "Bits 8:15 - Internal 8MHz RC Oscillator calibration value register"] - #[inline] - pub fn irc8mcalib(&self) -> IRC8MCALIBR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - IRC8MCALIBR { bits } + #[inline(always)] + pub fn irc8mcalib(&self) -> IRC8MCALIB_R { + IRC8MCALIB_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bit 16 - External High Speed oscillator Enable"] - #[inline] - pub fn hxtalen(&self) -> HXTALENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HXTALENR { bits } + #[inline(always)] + pub fn hxtalen(&self) -> HXTALEN_R { + HXTALEN_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - External crystal oscillator (HXTAL) clock stabilization flag"] - #[inline] - pub fn hxtalstb(&self) -> HXTALSTBR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HXTALSTBR { bits } + #[inline(always)] + pub fn hxtalstb(&self) -> HXTALSTB_R { + HXTALSTB_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - External crystal oscillator (HXTAL) clock bypass mode enable"] - #[inline] - pub fn hxtalbps(&self) -> HXTALBPSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HXTALBPSR { bits } + #[inline(always)] + pub fn hxtalbps(&self) -> HXTALBPS_R { + HXTALBPS_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - HXTAL Clock Monitor Enable"] - #[inline] - pub fn ckmen(&self) -> CKMENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CKMENR { bits } + #[inline(always)] + pub fn ckmen(&self) -> CKMEN_R { + CKMEN_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 24 - PLL enable"] - #[inline] - pub fn pllen(&self) -> PLLENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PLLENR { bits } + #[inline(always)] + pub fn pllen(&self) -> PLLEN_R { + PLLEN_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - PLL Clock Stabilization Flag"] - #[inline] - pub fn pllstb(&self) -> PLLSTBR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PLLSTBR { bits } + #[inline(always)] + pub fn pllstb(&self) -> PLLSTB_R { + PLLSTB_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - PLL1 enable"] - #[inline] - pub fn pll1en(&self) -> PLL1ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PLL1ENR { bits } + #[inline(always)] + pub fn pll1en(&self) -> PLL1EN_R { + PLL1EN_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - PLL1 Clock Stabilization Flag"] - #[inline] - pub fn pll1stb(&self) -> PLL1STBR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PLL1STBR { bits } + #[inline(always)] + pub fn pll1stb(&self) -> PLL1STB_R { + PLL1STB_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - PLL2 enable"] - #[inline] - pub fn pll2en(&self) -> PLL2ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PLL2ENR { bits } + #[inline(always)] + pub fn pll2en(&self) -> PLL2EN_R { + PLL2EN_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - PLL2 Clock Stabilization Flag"] - #[inline] - pub fn pll2stb(&self) -> PLL2STBR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PLL2STBR { bits } + #[inline(always)] + pub fn pll2stb(&self) -> PLL2STB_R { + PLL2STB_R::new(((self.bits >> 29) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x83 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Internal 8MHz RC oscillator Enable"] - #[inline] - pub fn irc8men(&mut self) -> _IRC8MENW { - _IRC8MENW { w: self } + #[inline(always)] + pub fn irc8men(&mut self) -> IRC8MEN_W { + IRC8MEN_W { w: self } } #[doc = "Bits 3:7 - Internal 8MHz RC Oscillator clock trim adjust value"] - #[inline] - pub fn irc8madj(&mut self) -> _IRC8MADJW { - _IRC8MADJW { w: self } + #[inline(always)] + pub fn irc8madj(&mut self) -> IRC8MADJ_W { + IRC8MADJ_W { w: self } } #[doc = "Bit 16 - External High Speed oscillator Enable"] - #[inline] - pub fn hxtalen(&mut self) -> _HXTALENW { - _HXTALENW { w: self } + #[inline(always)] + pub fn hxtalen(&mut self) -> HXTALEN_W { + HXTALEN_W { w: self } } #[doc = "Bit 18 - External crystal oscillator (HXTAL) clock bypass mode enable"] - #[inline] - pub fn hxtalbps(&mut self) -> _HXTALBPSW { - _HXTALBPSW { w: self } + #[inline(always)] + pub fn hxtalbps(&mut self) -> HXTALBPS_W { + HXTALBPS_W { w: self } } #[doc = "Bit 19 - HXTAL Clock Monitor Enable"] - #[inline] - pub fn ckmen(&mut self) -> _CKMENW { - _CKMENW { w: self } + #[inline(always)] + pub fn ckmen(&mut self) -> CKMEN_W { + CKMEN_W { w: self } } #[doc = "Bit 24 - PLL enable"] - #[inline] - pub fn pllen(&mut self) -> _PLLENW { - _PLLENW { w: self } + #[inline(always)] + pub fn pllen(&mut self) -> PLLEN_W { + PLLEN_W { w: self } } #[doc = "Bit 26 - PLL1 enable"] - #[inline] - pub fn pll1en(&mut self) -> _PLL1ENW { - _PLL1ENW { w: self } + #[inline(always)] + pub fn pll1en(&mut self) -> PLL1EN_W { + PLL1EN_W { w: self } } #[doc = "Bit 28 - PLL2 enable"] - #[inline] - pub fn pll2en(&mut self) -> _PLL2ENW { - _PLL2ENW { w: self } + #[inline(always)] + pub fn pll2en(&mut self) -> PLL2EN_W { + PLL2EN_W { w: self } } } diff --git a/src/rcu/dsv.rs b/src/rcu/dsv.rs index f95408a9d888af6adb4db6fc177d3eb34c6ce119..0fb22df323cfbff78969d39a32050c04be8b0cfe 100644 --- a/src/rcu/dsv.rs +++ b/src/rcu/dsv.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DSV { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DSLPVSR { - bits: u8, -} -impl DSLPVSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DSLPVSW<'a> { +#[doc = "Reader of register DSV"] +pub type R = crate::R; +#[doc = "Writer for register DSV"] +pub type W = crate::W; +#[doc = "Register DSV `reset()`'s with value 0"] +impl crate::ResetValue for super::DSV { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DSLPVS`"] +pub type DSLPVS_R = crate::R; +#[doc = "Write proxy for field `DSLPVS`"] +pub struct DSLPVS_W<'a> { w: &'a mut W, } -impl<'a> _DSLPVSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DSLPVS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x03) | ((value as u32) & 0x03); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:1 - Deep-sleep mode voltage select"] - #[inline] - pub fn dslpvs(&self) -> DSLPVSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DSLPVSR { bits } + #[inline(always)] + pub fn dslpvs(&self) -> DSLPVS_R { + DSLPVS_R::new((self.bits & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:1 - Deep-sleep mode voltage select"] - #[inline] - pub fn dslpvs(&mut self) -> _DSLPVSW { - _DSLPVSW { w: self } + #[inline(always)] + pub fn dslpvs(&mut self) -> DSLPVS_W { + DSLPVS_W { w: self } } } diff --git a/src/rcu/int.rs b/src/rcu/int.rs index ffe3020b8c6e0e70a502ded4413fa551641422c6..fb907730b9cae1df7b1917a8a9f6fa328635111e 100644 --- a/src/rcu/int.rs +++ b/src/rcu/int.rs @@ -1,949 +1,526 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::INT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IRC40KSTBIFR { - bits: bool, -} -impl IRC40KSTBIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LXTALSTBIFR { - bits: bool, -} -impl LXTALSTBIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IRC8MSTBIFR { - bits: bool, -} -impl IRC8MSTBIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HXTALSTBIFR { - bits: bool, -} -impl HXTALSTBIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PLLSTBIFR { - bits: bool, -} -impl PLLSTBIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PLL1STBIFR { - bits: bool, -} -impl PLL1STBIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PLL2STBIFR { - bits: bool, -} -impl PLL2STBIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CKMIFR { - bits: bool, -} -impl CKMIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IRC40KSTBIER { - bits: bool, -} -impl IRC40KSTBIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LXTALSTBIER { - bits: bool, -} -impl LXTALSTBIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IRC8MSTBIER { - bits: bool, -} -impl IRC8MSTBIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HXTALSTBIER { - bits: bool, -} -impl HXTALSTBIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PLLSTBIER { - bits: bool, -} -impl PLLSTBIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PLL1STBIER { - bits: bool, -} -impl PLL1STBIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PLL2STBIER { - bits: bool, -} -impl PLL2STBIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _IRC40KSTBIEW<'a> { +#[doc = "Reader of register INT"] +pub type R = crate::R; +#[doc = "Writer for register INT"] +pub type W = crate::W; +#[doc = "Register INT `reset()`'s with value 0"] +impl crate::ResetValue for super::INT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `IRC40KSTBIF`"] +pub type IRC40KSTBIF_R = crate::R; +#[doc = "Reader of field `LXTALSTBIF`"] +pub type LXTALSTBIF_R = crate::R; +#[doc = "Reader of field `IRC8MSTBIF`"] +pub type IRC8MSTBIF_R = crate::R; +#[doc = "Reader of field `HXTALSTBIF`"] +pub type HXTALSTBIF_R = crate::R; +#[doc = "Reader of field `PLLSTBIF`"] +pub type PLLSTBIF_R = crate::R; +#[doc = "Reader of field `PLL1STBIF`"] +pub type PLL1STBIF_R = crate::R; +#[doc = "Reader of field `PLL2STBIF`"] +pub type PLL2STBIF_R = crate::R; +#[doc = "Reader of field `CKMIF`"] +pub type CKMIF_R = crate::R; +#[doc = "Reader of field `IRC40KSTBIE`"] +pub type IRC40KSTBIE_R = crate::R; +#[doc = "Write proxy for field `IRC40KSTBIE`"] +pub struct IRC40KSTBIE_W<'a> { w: &'a mut W, } -impl<'a> _IRC40KSTBIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IRC40KSTBIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _LXTALSTBIEW<'a> { +#[doc = "Reader of field `LXTALSTBIE`"] +pub type LXTALSTBIE_R = crate::R; +#[doc = "Write proxy for field `LXTALSTBIE`"] +pub struct LXTALSTBIE_W<'a> { w: &'a mut W, } -impl<'a> _LXTALSTBIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LXTALSTBIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _IRC8MSTBIEW<'a> { +#[doc = "Reader of field `IRC8MSTBIE`"] +pub type IRC8MSTBIE_R = crate::R; +#[doc = "Write proxy for field `IRC8MSTBIE`"] +pub struct IRC8MSTBIE_W<'a> { w: &'a mut W, } -impl<'a> _IRC8MSTBIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IRC8MSTBIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _HXTALSTBIEW<'a> { +#[doc = "Reader of field `HXTALSTBIE`"] +pub type HXTALSTBIE_R = crate::R; +#[doc = "Write proxy for field `HXTALSTBIE`"] +pub struct HXTALSTBIE_W<'a> { w: &'a mut W, } -impl<'a> _HXTALSTBIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HXTALSTBIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _PLLSTBIEW<'a> { +#[doc = "Reader of field `PLLSTBIE`"] +pub type PLLSTBIE_R = crate::R; +#[doc = "Write proxy for field `PLLSTBIE`"] +pub struct PLLSTBIE_W<'a> { w: &'a mut W, } -impl<'a> _PLLSTBIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PLLSTBIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _PLL1STBIEW<'a> { +#[doc = "Reader of field `PLL1STBIE`"] +pub type PLL1STBIE_R = crate::R; +#[doc = "Write proxy for field `PLL1STBIE`"] +pub struct PLL1STBIE_W<'a> { w: &'a mut W, } -impl<'a> _PLL1STBIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PLL1STBIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _PLL2STBIEW<'a> { +#[doc = "Reader of field `PLL2STBIE`"] +pub type PLL2STBIE_R = crate::R; +#[doc = "Write proxy for field `PLL2STBIE`"] +pub struct PLL2STBIE_W<'a> { w: &'a mut W, } -impl<'a> _PLL2STBIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PLL2STBIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _IRC40KSTBICW<'a> { +#[doc = "Write proxy for field `IRC40KSTBIC`"] +pub struct IRC40KSTBIC_W<'a> { w: &'a mut W, } -impl<'a> _IRC40KSTBICW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IRC40KSTBIC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _LXTALSTBICW<'a> { +#[doc = "Write proxy for field `LXTALSTBIC`"] +pub struct LXTALSTBIC_W<'a> { w: &'a mut W, } -impl<'a> _LXTALSTBICW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LXTALSTBIC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _IRC8MSTBICW<'a> { +#[doc = "Write proxy for field `IRC8MSTBIC`"] +pub struct IRC8MSTBIC_W<'a> { w: &'a mut W, } -impl<'a> _IRC8MSTBICW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IRC8MSTBIC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _HXTALSTBICW<'a> { +#[doc = "Write proxy for field `HXTALSTBIC`"] +pub struct HXTALSTBIC_W<'a> { w: &'a mut W, } -impl<'a> _HXTALSTBICW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HXTALSTBIC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _PLLSTBICW<'a> { +#[doc = "Write proxy for field `PLLSTBIC`"] +pub struct PLLSTBIC_W<'a> { w: &'a mut W, } -impl<'a> _PLLSTBICW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PLLSTBIC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _PLL1STBICW<'a> { +#[doc = "Write proxy for field `PLL1STBIC`"] +pub struct PLL1STBIC_W<'a> { w: &'a mut W, } -impl<'a> _PLL1STBICW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PLL1STBIC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _PLL2STBICW<'a> { +#[doc = "Write proxy for field `PLL2STBIC`"] +pub struct PLL2STBIC_W<'a> { w: &'a mut W, } -impl<'a> _PLL2STBICW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PLL2STBIC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 22)) | (((value as u32) & 0x01) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _CKMICW<'a> { +#[doc = "Write proxy for field `CKMIC`"] +pub struct CKMIC_W<'a> { w: &'a mut W, } -impl<'a> _CKMICW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CKMIC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 23; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 23)) | (((value as u32) & 0x01) << 23); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - IRC40K stabilization interrupt flag"] - #[inline] - pub fn irc40kstbif(&self) -> IRC40KSTBIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IRC40KSTBIFR { bits } + #[inline(always)] + pub fn irc40kstbif(&self) -> IRC40KSTBIF_R { + IRC40KSTBIF_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - LXTAL stabilization interrupt flag"] - #[inline] - pub fn lxtalstbif(&self) -> LXTALSTBIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LXTALSTBIFR { bits } + #[inline(always)] + pub fn lxtalstbif(&self) -> LXTALSTBIF_R { + LXTALSTBIF_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - IRC8M stabilization interrupt flag"] - #[inline] - pub fn irc8mstbif(&self) -> IRC8MSTBIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IRC8MSTBIFR { bits } + #[inline(always)] + pub fn irc8mstbif(&self) -> IRC8MSTBIF_R { + IRC8MSTBIF_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - HXTAL stabilization interrupt flag"] - #[inline] - pub fn hxtalstbif(&self) -> HXTALSTBIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HXTALSTBIFR { bits } + #[inline(always)] + pub fn hxtalstbif(&self) -> HXTALSTBIF_R { + HXTALSTBIF_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - PLL stabilization interrupt flag"] - #[inline] - pub fn pllstbif(&self) -> PLLSTBIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PLLSTBIFR { bits } + #[inline(always)] + pub fn pllstbif(&self) -> PLLSTBIF_R { + PLLSTBIF_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - PLL1 stabilization interrupt flag"] - #[inline] - pub fn pll1stbif(&self) -> PLL1STBIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PLL1STBIFR { bits } + #[inline(always)] + pub fn pll1stbif(&self) -> PLL1STBIF_R { + PLL1STBIF_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - PLL2 stabilization interrupt flag"] - #[inline] - pub fn pll2stbif(&self) -> PLL2STBIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PLL2STBIFR { bits } + #[inline(always)] + pub fn pll2stbif(&self) -> PLL2STBIF_R { + PLL2STBIF_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - HXTAL Clock Stuck Interrupt Flag"] - #[inline] - pub fn ckmif(&self) -> CKMIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CKMIFR { bits } + #[inline(always)] + pub fn ckmif(&self) -> CKMIF_R { + CKMIF_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - IRC40K Stabilization interrupt enable"] - #[inline] - pub fn irc40kstbie(&self) -> IRC40KSTBIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IRC40KSTBIER { bits } + #[inline(always)] + pub fn irc40kstbie(&self) -> IRC40KSTBIE_R { + IRC40KSTBIE_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - LXTAL Stabilization Interrupt Enable"] - #[inline] - pub fn lxtalstbie(&self) -> LXTALSTBIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LXTALSTBIER { bits } + #[inline(always)] + pub fn lxtalstbie(&self) -> LXTALSTBIE_R { + LXTALSTBIE_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - IRC8M Stabilization Interrupt Enable"] - #[inline] - pub fn irc8mstbie(&self) -> IRC8MSTBIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IRC8MSTBIER { bits } + #[inline(always)] + pub fn irc8mstbie(&self) -> IRC8MSTBIE_R { + IRC8MSTBIE_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - HXTAL Stabilization Interrupt Enable"] - #[inline] - pub fn hxtalstbie(&self) -> HXTALSTBIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HXTALSTBIER { bits } + #[inline(always)] + pub fn hxtalstbie(&self) -> HXTALSTBIE_R { + HXTALSTBIE_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - PLL Stabilization Interrupt Enable"] - #[inline] - pub fn pllstbie(&self) -> PLLSTBIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PLLSTBIER { bits } + #[inline(always)] + pub fn pllstbie(&self) -> PLLSTBIE_R { + PLLSTBIE_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - PLL1 Stabilization Interrupt Enable"] - #[inline] - pub fn pll1stbie(&self) -> PLL1STBIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PLL1STBIER { bits } + #[inline(always)] + pub fn pll1stbie(&self) -> PLL1STBIE_R { + PLL1STBIE_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - PLL2 Stabilization Interrupt Enable"] - #[inline] - pub fn pll2stbie(&self) -> PLL2STBIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PLL2STBIER { bits } + #[inline(always)] + pub fn pll2stbie(&self) -> PLL2STBIE_R { + PLL2STBIE_R::new(((self.bits >> 14) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 8 - IRC40K Stabilization interrupt enable"] - #[inline] - pub fn irc40kstbie(&mut self) -> _IRC40KSTBIEW { - _IRC40KSTBIEW { w: self } + #[inline(always)] + pub fn irc40kstbie(&mut self) -> IRC40KSTBIE_W { + IRC40KSTBIE_W { w: self } } #[doc = "Bit 9 - LXTAL Stabilization Interrupt Enable"] - #[inline] - pub fn lxtalstbie(&mut self) -> _LXTALSTBIEW { - _LXTALSTBIEW { w: self } + #[inline(always)] + pub fn lxtalstbie(&mut self) -> LXTALSTBIE_W { + LXTALSTBIE_W { w: self } } #[doc = "Bit 10 - IRC8M Stabilization Interrupt Enable"] - #[inline] - pub fn irc8mstbie(&mut self) -> _IRC8MSTBIEW { - _IRC8MSTBIEW { w: self } + #[inline(always)] + pub fn irc8mstbie(&mut self) -> IRC8MSTBIE_W { + IRC8MSTBIE_W { w: self } } #[doc = "Bit 11 - HXTAL Stabilization Interrupt Enable"] - #[inline] - pub fn hxtalstbie(&mut self) -> _HXTALSTBIEW { - _HXTALSTBIEW { w: self } + #[inline(always)] + pub fn hxtalstbie(&mut self) -> HXTALSTBIE_W { + HXTALSTBIE_W { w: self } } #[doc = "Bit 12 - PLL Stabilization Interrupt Enable"] - #[inline] - pub fn pllstbie(&mut self) -> _PLLSTBIEW { - _PLLSTBIEW { w: self } + #[inline(always)] + pub fn pllstbie(&mut self) -> PLLSTBIE_W { + PLLSTBIE_W { w: self } } #[doc = "Bit 13 - PLL1 Stabilization Interrupt Enable"] - #[inline] - pub fn pll1stbie(&mut self) -> _PLL1STBIEW { - _PLL1STBIEW { w: self } + #[inline(always)] + pub fn pll1stbie(&mut self) -> PLL1STBIE_W { + PLL1STBIE_W { w: self } } #[doc = "Bit 14 - PLL2 Stabilization Interrupt Enable"] - #[inline] - pub fn pll2stbie(&mut self) -> _PLL2STBIEW { - _PLL2STBIEW { w: self } + #[inline(always)] + pub fn pll2stbie(&mut self) -> PLL2STBIE_W { + PLL2STBIE_W { w: self } } #[doc = "Bit 16 - IRC40K Stabilization Interrupt Clear"] - #[inline] - pub fn irc40kstbic(&mut self) -> _IRC40KSTBICW { - _IRC40KSTBICW { w: self } + #[inline(always)] + pub fn irc40kstbic(&mut self) -> IRC40KSTBIC_W { + IRC40KSTBIC_W { w: self } } #[doc = "Bit 17 - LXTAL Stabilization Interrupt Clear"] - #[inline] - pub fn lxtalstbic(&mut self) -> _LXTALSTBICW { - _LXTALSTBICW { w: self } + #[inline(always)] + pub fn lxtalstbic(&mut self) -> LXTALSTBIC_W { + LXTALSTBIC_W { w: self } } #[doc = "Bit 18 - IRC8M Stabilization Interrupt Clear"] - #[inline] - pub fn irc8mstbic(&mut self) -> _IRC8MSTBICW { - _IRC8MSTBICW { w: self } + #[inline(always)] + pub fn irc8mstbic(&mut self) -> IRC8MSTBIC_W { + IRC8MSTBIC_W { w: self } } #[doc = "Bit 19 - HXTAL Stabilization Interrupt Clear"] - #[inline] - pub fn hxtalstbic(&mut self) -> _HXTALSTBICW { - _HXTALSTBICW { w: self } + #[inline(always)] + pub fn hxtalstbic(&mut self) -> HXTALSTBIC_W { + HXTALSTBIC_W { w: self } } #[doc = "Bit 20 - PLL stabilization Interrupt Clear"] - #[inline] - pub fn pllstbic(&mut self) -> _PLLSTBICW { - _PLLSTBICW { w: self } + #[inline(always)] + pub fn pllstbic(&mut self) -> PLLSTBIC_W { + PLLSTBIC_W { w: self } } #[doc = "Bit 21 - PLL1 stabilization Interrupt Clear"] - #[inline] - pub fn pll1stbic(&mut self) -> _PLL1STBICW { - _PLL1STBICW { w: self } + #[inline(always)] + pub fn pll1stbic(&mut self) -> PLL1STBIC_W { + PLL1STBIC_W { w: self } } #[doc = "Bit 22 - PLL2 stabilization Interrupt Clear"] - #[inline] - pub fn pll2stbic(&mut self) -> _PLL2STBICW { - _PLL2STBICW { w: self } + #[inline(always)] + pub fn pll2stbic(&mut self) -> PLL2STBIC_W { + PLL2STBIC_W { w: self } } #[doc = "Bit 23 - HXTAL Clock Stuck Interrupt Clear"] - #[inline] - pub fn ckmic(&mut self) -> _CKMICW { - _CKMICW { w: self } + #[inline(always)] + pub fn ckmic(&mut self) -> CKMIC_W { + CKMIC_W { w: self } } } diff --git a/src/rcu/rstsck.rs b/src/rcu/rstsck.rs index 7fe9049ce2887046ed27d4f23769d67ce3dff3a7..161f3d05dda72d1f1ee2b0fbb4b77d9f977c920f 100644 --- a/src/rcu/rstsck.rs +++ b/src/rcu/rstsck.rs @@ -1,399 +1,133 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::RSTSCK { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IRC40KENR { - bits: bool, -} -impl IRC40KENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IRC40KSTBR { - bits: bool, -} -impl IRC40KSTBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RSTFCR { - bits: bool, -} -impl RSTFCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPRSTFR { - bits: bool, -} -impl EPRSTFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PORRSTFR { - bits: bool, -} -impl PORRSTFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWRSTFR { - bits: bool, -} -impl SWRSTFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FWDGTRSTFR { - bits: bool, -} -impl FWDGTRSTFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WWDGTRSTFR { - bits: bool, -} -impl WWDGTRSTFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LPRSTFR { - bits: bool, -} -impl LPRSTFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _IRC40KENW<'a> { +#[doc = "Reader of register RSTSCK"] +pub type R = crate::R; +#[doc = "Writer for register RSTSCK"] +pub type W = crate::W; +#[doc = "Register RSTSCK `reset()`'s with value 0x0c00_0000"] +impl crate::ResetValue for super::RSTSCK { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0c00_0000 + } +} +#[doc = "Reader of field `IRC40KEN`"] +pub type IRC40KEN_R = crate::R; +#[doc = "Write proxy for field `IRC40KEN`"] +pub struct IRC40KEN_W<'a> { w: &'a mut W, } -impl<'a> _IRC40KENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IRC40KEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _RSTFCW<'a> { +#[doc = "Reader of field `IRC40KSTB`"] +pub type IRC40KSTB_R = crate::R; +#[doc = "Reader of field `RSTFC`"] +pub type RSTFC_R = crate::R; +#[doc = "Write proxy for field `RSTFC`"] +pub struct RSTFC_W<'a> { w: &'a mut W, } -impl<'a> _RSTFCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RSTFC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 24; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 24)) | (((value as u32) & 0x01) << 24); self.w } } +#[doc = "Reader of field `EPRSTF`"] +pub type EPRSTF_R = crate::R; +#[doc = "Reader of field `PORRSTF`"] +pub type PORRSTF_R = crate::R; +#[doc = "Reader of field `SWRSTF`"] +pub type SWRSTF_R = crate::R; +#[doc = "Reader of field `FWDGTRSTF`"] +pub type FWDGTRSTF_R = crate::R; +#[doc = "Reader of field `WWDGTRSTF`"] +pub type WWDGTRSTF_R = crate::R; +#[doc = "Reader of field `LPRSTF`"] +pub type LPRSTF_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - IRC40K enable"] - #[inline] - pub fn irc40ken(&self) -> IRC40KENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IRC40KENR { bits } + #[inline(always)] + pub fn irc40ken(&self) -> IRC40KEN_R { + IRC40KEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - IRC40K stabilization"] - #[inline] - pub fn irc40kstb(&self) -> IRC40KSTBR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IRC40KSTBR { bits } + #[inline(always)] + pub fn irc40kstb(&self) -> IRC40KSTB_R { + IRC40KSTB_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 24 - Reset flag clear"] - #[inline] - pub fn rstfc(&self) -> RSTFCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RSTFCR { bits } + #[inline(always)] + pub fn rstfc(&self) -> RSTFC_R { + RSTFC_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 26 - External PIN reset flag"] - #[inline] - pub fn eprstf(&self) -> EPRSTFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPRSTFR { bits } + #[inline(always)] + pub fn eprstf(&self) -> EPRSTF_R { + EPRSTF_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 27 - Power reset flag"] - #[inline] - pub fn porrstf(&self) -> PORRSTFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 27; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PORRSTFR { bits } + #[inline(always)] + pub fn porrstf(&self) -> PORRSTF_R { + PORRSTF_R::new(((self.bits >> 27) & 0x01) != 0) } #[doc = "Bit 28 - Software reset flag"] - #[inline] - pub fn swrstf(&self) -> SWRSTFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SWRSTFR { bits } + #[inline(always)] + pub fn swrstf(&self) -> SWRSTF_R { + SWRSTF_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Free Watchdog timer reset flag"] - #[inline] - pub fn fwdgtrstf(&self) -> FWDGTRSTFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FWDGTRSTFR { bits } + #[inline(always)] + pub fn fwdgtrstf(&self) -> FWDGTRSTF_R { + FWDGTRSTF_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Window watchdog timer reset flag"] - #[inline] - pub fn wwdgtrstf(&self) -> WWDGTRSTFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WWDGTRSTFR { bits } + #[inline(always)] + pub fn wwdgtrstf(&self) -> WWDGTRSTF_R { + WWDGTRSTF_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Low-power reset flag"] - #[inline] - pub fn lprstf(&self) -> LPRSTFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LPRSTFR { bits } + #[inline(always)] + pub fn lprstf(&self) -> LPRSTF_R { + LPRSTF_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0c00_0000 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - IRC40K enable"] - #[inline] - pub fn irc40ken(&mut self) -> _IRC40KENW { - _IRC40KENW { w: self } + #[inline(always)] + pub fn irc40ken(&mut self) -> IRC40KEN_W { + IRC40KEN_W { w: self } } #[doc = "Bit 24 - Reset flag clear"] - #[inline] - pub fn rstfc(&mut self) -> _RSTFCW { - _RSTFCW { w: self } + #[inline(always)] + pub fn rstfc(&mut self) -> RSTFC_W { + RSTFC_W { w: self } } } diff --git a/src/rtc.rs b/src/rtc.rs index a99806d0a4dcab89d0ec7345acb201c9faa62341..82e61dc6339d770941efe99bb16f0c7353d4b348 100644 --- a/src/rtc.rs +++ b/src/rtc.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - RTC interrupt enable register"] @@ -22,63 +22,101 @@ pub struct RegisterBlock { #[doc = "0x24 - RTC alarm low register"] pub alrml: ALRML, } -#[doc = "RTC interrupt enable register"] -pub struct INTEN { - register: ::vcell::VolatileCell, -} +#[doc = "RTC interrupt enable register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [inten](inten) module"] +pub type INTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _INTEN; +#[doc = "`read()` method returns [inten::R](inten::R) reader structure"] +impl crate::Readable for INTEN {} +#[doc = "`write(|w| ..)` method takes [inten::W](inten::W) writer structure"] +impl crate::Writable for INTEN {} #[doc = "RTC interrupt enable register"] pub mod inten; -#[doc = "control register"] -pub struct CTL { - register: ::vcell::VolatileCell, -} +#[doc = "control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl](ctl) module"] +pub type CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL; +#[doc = "`read()` method returns [ctl::R](ctl::R) reader structure"] +impl crate::Readable for CTL {} +#[doc = "`write(|w| ..)` method takes [ctl::W](ctl::W) writer structure"] +impl crate::Writable for CTL {} #[doc = "control register"] pub mod ctl; -#[doc = "RTC prescaler high register"] -pub struct PSCH { - register: ::vcell::VolatileCell, -} +#[doc = "RTC prescaler high register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [psch](psch) module"] +pub type PSCH = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _PSCH; +#[doc = "`write(|w| ..)` method takes [psch::W](psch::W) writer structure"] +impl crate::Writable for PSCH {} #[doc = "RTC prescaler high register"] pub mod psch; -#[doc = "RTC prescaler low register"] -pub struct PSCL { - register: ::vcell::VolatileCell, -} +#[doc = "RTC prescaler low register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pscl](pscl) module"] +pub type PSCL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _PSCL; +#[doc = "`write(|w| ..)` method takes [pscl::W](pscl::W) writer structure"] +impl crate::Writable for PSCL {} #[doc = "RTC prescaler low register"] pub mod pscl; -#[doc = "RTC divider high register"] -pub struct DIVH { - register: ::vcell::VolatileCell, -} +#[doc = "RTC divider high register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [divh](divh) module"] +pub type DIVH = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIVH; +#[doc = "`read()` method returns [divh::R](divh::R) reader structure"] +impl crate::Readable for DIVH {} #[doc = "RTC divider high register"] pub mod divh; -#[doc = "RTC divider low register"] -pub struct DIVL { - register: ::vcell::VolatileCell, -} +#[doc = "RTC divider low register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [divl](divl) module"] +pub type DIVL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIVL; +#[doc = "`read()` method returns [divl::R](divl::R) reader structure"] +impl crate::Readable for DIVL {} #[doc = "RTC divider low register"] pub mod divl; -#[doc = "RTC counter high register"] -pub struct CNTH { - register: ::vcell::VolatileCell, -} +#[doc = "RTC counter high register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cnth](cnth) module"] +pub type CNTH = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CNTH; +#[doc = "`read()` method returns [cnth::R](cnth::R) reader structure"] +impl crate::Readable for CNTH {} +#[doc = "`write(|w| ..)` method takes [cnth::W](cnth::W) writer structure"] +impl crate::Writable for CNTH {} #[doc = "RTC counter high register"] pub mod cnth; -#[doc = "RTC counter low register"] -pub struct CNTL { - register: ::vcell::VolatileCell, -} +#[doc = "RTC counter low register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cntl](cntl) module"] +pub type CNTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CNTL; +#[doc = "`read()` method returns [cntl::R](cntl::R) reader structure"] +impl crate::Readable for CNTL {} +#[doc = "`write(|w| ..)` method takes [cntl::W](cntl::W) writer structure"] +impl crate::Writable for CNTL {} #[doc = "RTC counter low register"] pub mod cntl; -#[doc = "Alarm high register"] -pub struct ALRMH { - register: ::vcell::VolatileCell, -} +#[doc = "Alarm high register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [alrmh](alrmh) module"] +pub type ALRMH = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _ALRMH; +#[doc = "`write(|w| ..)` method takes [alrmh::W](alrmh::W) writer structure"] +impl crate::Writable for ALRMH {} #[doc = "Alarm high register"] pub mod alrmh; -#[doc = "RTC alarm low register"] -pub struct ALRML { - register: ::vcell::VolatileCell, -} +#[doc = "RTC alarm low register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [alrml](alrml) module"] +pub type ALRML = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _ALRML; +#[doc = "`write(|w| ..)` method takes [alrml::W](alrml::W) writer structure"] +impl crate::Writable for ALRML {} #[doc = "RTC alarm low register"] pub mod alrml; diff --git a/src/rtc/alrmh.rs b/src/rtc/alrmh.rs index b46ac55577412d759de46fc3fa6bd87eacb0fe63..85d0bb0a51122cf03cbad2ae22df1dfadc348ac0 100644 --- a/src/rtc/alrmh.rs +++ b/src/rtc/alrmh.rs @@ -1,49 +1,29 @@ -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::ALRMH { - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); +#[doc = "Writer for register ALRMH"] +pub type W = crate::W; +#[doc = "Register ALRMH `reset()`'s with value 0xffff"] +impl crate::ResetValue for super::ALRMH { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0xffff } } -#[doc = r" Proxy"] -pub struct _ALRMW<'a> { +#[doc = "Write proxy for field `ALRM`"] +pub struct ALRM_W<'a> { w: &'a mut W, } -impl<'a> _ALRMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ALRM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0xffff } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Alarm value high"] - #[inline] - pub fn alrm(&mut self) -> _ALRMW { - _ALRMW { w: self } + #[inline(always)] + pub fn alrm(&mut self) -> ALRM_W { + ALRM_W { w: self } } } diff --git a/src/rtc/alrml.rs b/src/rtc/alrml.rs index 88e69322a32c501597aa66fed6bc9b11e243334a..1fde907cdcdac2131db0906afad71e34e304a551 100644 --- a/src/rtc/alrml.rs +++ b/src/rtc/alrml.rs @@ -1,49 +1,29 @@ -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::ALRML { - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); +#[doc = "Writer for register ALRML"] +pub type W = crate::W; +#[doc = "Register ALRML `reset()`'s with value 0xffff"] +impl crate::ResetValue for super::ALRML { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0xffff } } -#[doc = r" Proxy"] -pub struct _ALRMW<'a> { +#[doc = "Write proxy for field `ALRM`"] +pub struct ALRM_W<'a> { w: &'a mut W, } -impl<'a> _ALRMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ALRM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0xffff } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - alarm value low"] - #[inline] - pub fn alrm(&mut self) -> _ALRMW { - _ALRMW { w: self } + #[inline(always)] + pub fn alrm(&mut self) -> ALRM_W { + ALRM_W { w: self } } } diff --git a/src/rtc/cnth.rs b/src/rtc/cnth.rs index 68dfcea03a5f38d6a46323fbddc67d8d969da9aa..3f0d1b9c16b68d9c9b7b8d186c147527c4b2d7f2 100644 --- a/src/rtc/cnth.rs +++ b/src/rtc/cnth.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CNTH { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CNTH"] +pub type R = crate::R; +#[doc = "Writer for register CNTH"] +pub type W = crate::W; +#[doc = "Register CNTH `reset()`'s with value 0"] +impl crate::ResetValue for super::CNTH { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - RTC counter value high"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - RTC counter value high"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/rtc/cntl.rs b/src/rtc/cntl.rs index 31575525169ec494a1a177bebedbb53cabf61d9b..8f938d1f3a587bb5991c0e97d07d6b228915e836 100644 --- a/src/rtc/cntl.rs +++ b/src/rtc/cntl.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CNTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CNTL"] +pub type R = crate::R; +#[doc = "Writer for register CNTL"] +pub type W = crate::W; +#[doc = "Register CNTL `reset()`'s with value 0"] +impl crate::ResetValue for super::CNTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - RTC counter value low"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - RTC counter value low"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/rtc/ctl.rs b/src/rtc/ctl.rs index 4f3101da6407f07c687ec9476b057363db84ee06..2cf6be335577a878539e8b3ae592b9441040dd00 100644 --- a/src/rtc/ctl.rs +++ b/src/rtc/ctl.rs @@ -1,418 +1,220 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct LWOFFR { - bits: bool, -} -impl LWOFFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CMFR { - bits: bool, -} -impl CMFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RSYNFR { - bits: bool, -} -impl RSYNFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OVIFR { - bits: bool, -} -impl OVIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ALRMIFR { - bits: bool, -} -impl ALRMIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SCIFR { - bits: bool, -} -impl SCIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _LWOFFW<'a> { +#[doc = "Reader of register CTL"] +pub type R = crate::R; +#[doc = "Writer for register CTL"] +pub type W = crate::W; +#[doc = "Register CTL `reset()`'s with value 0x20"] +impl crate::ResetValue for super::CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x20 + } +} +#[doc = "Reader of field `LWOFF`"] +pub type LWOFF_R = crate::R; +#[doc = "Write proxy for field `LWOFF`"] +pub struct LWOFF_W<'a> { w: &'a mut W, } -impl<'a> _LWOFFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LWOFF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _CMFW<'a> { +#[doc = "Reader of field `CMF`"] +pub type CMF_R = crate::R; +#[doc = "Write proxy for field `CMF`"] +pub struct CMF_W<'a> { w: &'a mut W, } -impl<'a> _CMFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _RSYNFW<'a> { +#[doc = "Reader of field `RSYNF`"] +pub type RSYNF_R = crate::R; +#[doc = "Write proxy for field `RSYNF`"] +pub struct RSYNF_W<'a> { w: &'a mut W, } -impl<'a> _RSYNFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RSYNF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _OVIFW<'a> { +#[doc = "Reader of field `OVIF`"] +pub type OVIF_R = crate::R; +#[doc = "Write proxy for field `OVIF`"] +pub struct OVIF_W<'a> { w: &'a mut W, } -impl<'a> _OVIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OVIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _ALRMIFW<'a> { +#[doc = "Reader of field `ALRMIF`"] +pub type ALRMIF_R = crate::R; +#[doc = "Write proxy for field `ALRMIF`"] +pub struct ALRMIF_W<'a> { w: &'a mut W, } -impl<'a> _ALRMIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ALRMIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _SCIFW<'a> { +#[doc = "Reader of field `SCIF`"] +pub type SCIF_R = crate::R; +#[doc = "Write proxy for field `SCIF`"] +pub struct SCIF_W<'a> { w: &'a mut W, } -impl<'a> _SCIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SCIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 5 - Last write operation finished flag"] - #[inline] - pub fn lwoff(&self) -> LWOFFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LWOFFR { bits } + #[inline(always)] + pub fn lwoff(&self) -> LWOFF_R { + LWOFF_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Configuration mode flag"] - #[inline] - pub fn cmf(&self) -> CMFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CMFR { bits } + #[inline(always)] + pub fn cmf(&self) -> CMF_R { + CMF_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Registers synchronized flag"] - #[inline] - pub fn rsynf(&self) -> RSYNFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RSYNFR { bits } + #[inline(always)] + pub fn rsynf(&self) -> RSYNF_R { + RSYNF_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Overflow interrupt flag"] - #[inline] - pub fn ovif(&self) -> OVIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OVIFR { bits } + #[inline(always)] + pub fn ovif(&self) -> OVIF_R { + OVIF_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Alarm interrupt flag"] - #[inline] - pub fn alrmif(&self) -> ALRMIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ALRMIFR { bits } + #[inline(always)] + pub fn alrmif(&self) -> ALRMIF_R { + ALRMIF_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Sencond interrupt flag"] - #[inline] - pub fn scif(&self) -> SCIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SCIFR { bits } + #[inline(always)] + pub fn scif(&self) -> SCIF_R { + SCIF_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x20 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 5 - Last write operation finished flag"] - #[inline] - pub fn lwoff(&mut self) -> _LWOFFW { - _LWOFFW { w: self } + #[inline(always)] + pub fn lwoff(&mut self) -> LWOFF_W { + LWOFF_W { w: self } } #[doc = "Bit 4 - Configuration mode flag"] - #[inline] - pub fn cmf(&mut self) -> _CMFW { - _CMFW { w: self } + #[inline(always)] + pub fn cmf(&mut self) -> CMF_W { + CMF_W { w: self } } #[doc = "Bit 3 - Registers synchronized flag"] - #[inline] - pub fn rsynf(&mut self) -> _RSYNFW { - _RSYNFW { w: self } + #[inline(always)] + pub fn rsynf(&mut self) -> RSYNF_W { + RSYNF_W { w: self } } #[doc = "Bit 2 - Overflow interrupt flag"] - #[inline] - pub fn ovif(&mut self) -> _OVIFW { - _OVIFW { w: self } + #[inline(always)] + pub fn ovif(&mut self) -> OVIF_W { + OVIF_W { w: self } } #[doc = "Bit 1 - Alarm interrupt flag"] - #[inline] - pub fn alrmif(&mut self) -> _ALRMIFW { - _ALRMIFW { w: self } + #[inline(always)] + pub fn alrmif(&mut self) -> ALRMIF_W { + ALRMIF_W { w: self } } #[doc = "Bit 0 - Sencond interrupt flag"] - #[inline] - pub fn scif(&mut self) -> _SCIFW { - _SCIFW { w: self } + #[inline(always)] + pub fn scif(&mut self) -> SCIF_W { + SCIF_W { w: self } } } diff --git a/src/rtc/divh.rs b/src/rtc/divh.rs index 43c766087c80fac8de40bd84b139e71c9e751630..38f7d29a0289a163ab76f4b2965bb3720cd94f1b 100644 --- a/src/rtc/divh.rs +++ b/src/rtc/divh.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::DIVH { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct DIVR { - bits: u8, -} -impl DIVR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} +#[doc = "Reader of register DIVH"] +pub type R = crate::R; +#[doc = "Reader of field `DIV`"] +pub type DIV_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:3 - RTC divider value high"] - #[inline] - pub fn div(&self) -> DIVR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DIVR { bits } + #[inline(always)] + pub fn div(&self) -> DIV_R { + DIV_R::new((self.bits & 0x0f) as u8) } } diff --git a/src/rtc/divl.rs b/src/rtc/divl.rs index 499f5b642636cc67834b8fad0f595c833292118a..751e80980f55be9cb7cb61bb0e8aabc8754dfc68 100644 --- a/src/rtc/divl.rs +++ b/src/rtc/divl.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::DIVL { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct DIVR { - bits: u16, -} -impl DIVR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register DIVL"] +pub type R = crate::R; +#[doc = "Reader of field `DIV`"] +pub type DIV_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - RTC divider value low"] - #[inline] - pub fn div(&self) -> DIVR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DIVR { bits } + #[inline(always)] + pub fn div(&self) -> DIV_R { + DIV_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/rtc/inten.rs b/src/rtc/inten.rs index 94e2e01ce29b164f7dea571764c73224713359a7..d91323513353af68e32cfa57d9a79d712aef61b7 100644 --- a/src/rtc/inten.rs +++ b/src/rtc/inten.rs @@ -1,241 +1,118 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::INTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct OVIER { - bits: bool, -} -impl OVIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ALRMIER { - bits: bool, -} -impl ALRMIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SCIER { - bits: bool, -} -impl SCIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _OVIEW<'a> { +#[doc = "Reader of register INTEN"] +pub type R = crate::R; +#[doc = "Writer for register INTEN"] +pub type W = crate::W; +#[doc = "Register INTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::INTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `OVIE`"] +pub type OVIE_R = crate::R; +#[doc = "Write proxy for field `OVIE`"] +pub struct OVIE_W<'a> { w: &'a mut W, } -impl<'a> _OVIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OVIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _ALRMIEW<'a> { +#[doc = "Reader of field `ALRMIE`"] +pub type ALRMIE_R = crate::R; +#[doc = "Write proxy for field `ALRMIE`"] +pub struct ALRMIE_W<'a> { w: &'a mut W, } -impl<'a> _ALRMIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ALRMIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _SCIEW<'a> { +#[doc = "Reader of field `SCIE`"] +pub type SCIE_R = crate::R; +#[doc = "Write proxy for field `SCIE`"] +pub struct SCIE_W<'a> { w: &'a mut W, } -impl<'a> _SCIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SCIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 2 - Overflow interrupt enable"] - #[inline] - pub fn ovie(&self) -> OVIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OVIER { bits } + #[inline(always)] + pub fn ovie(&self) -> OVIE_R { + OVIE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Alarm interrupt enable"] - #[inline] - pub fn alrmie(&self) -> ALRMIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ALRMIER { bits } + #[inline(always)] + pub fn alrmie(&self) -> ALRMIE_R { + ALRMIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Second interrupt"] - #[inline] - pub fn scie(&self) -> SCIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SCIER { bits } + #[inline(always)] + pub fn scie(&self) -> SCIE_R { + SCIE_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 2 - Overflow interrupt enable"] - #[inline] - pub fn ovie(&mut self) -> _OVIEW { - _OVIEW { w: self } + #[inline(always)] + pub fn ovie(&mut self) -> OVIE_W { + OVIE_W { w: self } } #[doc = "Bit 1 - Alarm interrupt enable"] - #[inline] - pub fn alrmie(&mut self) -> _ALRMIEW { - _ALRMIEW { w: self } + #[inline(always)] + pub fn alrmie(&mut self) -> ALRMIE_W { + ALRMIE_W { w: self } } #[doc = "Bit 0 - Second interrupt"] - #[inline] - pub fn scie(&mut self) -> _SCIEW { - _SCIEW { w: self } + #[inline(always)] + pub fn scie(&mut self) -> SCIE_W { + SCIE_W { w: self } } } diff --git a/src/rtc/psch.rs b/src/rtc/psch.rs index f9401bfaf6de481b283f0f37e95b60003fb96084..03f13b295ba33013ced9e37dfe6ef15a739c27d0 100644 --- a/src/rtc/psch.rs +++ b/src/rtc/psch.rs @@ -1,49 +1,29 @@ -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::PSCH { - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); +#[doc = "Writer for register PSCH"] +pub type W = crate::W; +#[doc = "Register PSCH `reset()`'s with value 0"] +impl crate::ResetValue for super::PSCH { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _PSCW<'a> { +#[doc = "Write proxy for field `PSC`"] +pub struct PSC_W<'a> { w: &'a mut W, } -impl<'a> _PSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:3 - RTC prescaler value high"] - #[inline] - pub fn psc(&mut self) -> _PSCW { - _PSCW { w: self } + #[inline(always)] + pub fn psc(&mut self) -> PSC_W { + PSC_W { w: self } } } diff --git a/src/rtc/pscl.rs b/src/rtc/pscl.rs index 86cf8c02fc834ad0c7061961a0d9e0a44eef4d74..aa6eb70328a2cfea8c0610e3d764a1077f474695 100644 --- a/src/rtc/pscl.rs +++ b/src/rtc/pscl.rs @@ -1,49 +1,29 @@ -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::PSCL { - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); +#[doc = "Writer for register PSCL"] +pub type W = crate::W; +#[doc = "Register PSCL `reset()`'s with value 0x8000"] +impl crate::ResetValue for super::PSCL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x8000 } } -#[doc = r" Proxy"] -pub struct _PSCW<'a> { +#[doc = "Write proxy for field `PSC`"] +pub struct PSC_W<'a> { w: &'a mut W, } -impl<'a> _PSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x8000 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - RTC prescaler value low"] - #[inline] - pub fn psc(&mut self) -> _PSCW { - _PSCW { w: self } + #[inline(always)] + pub fn psc(&mut self) -> PSC_W { + PSC_W { w: self } } } diff --git a/src/spi0.rs b/src/spi0.rs index d54ce9062bdd02e59c027db6cdb897b5458a00f6..25557ff6b84f3f3020fb21b62fb7bfd8d2f2de3f 100644 --- a/src/spi0.rs +++ b/src/spi0.rs @@ -1,84 +1,125 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - control register 0"] pub ctl0: CTL0, - _reserved0: [u8; 2usize], + _reserved1: [u8; 2usize], #[doc = "0x04 - control register 1"] pub ctl1: CTL1, - _reserved1: [u8; 2usize], + _reserved2: [u8; 2usize], #[doc = "0x08 - status register"] pub stat: STAT, - _reserved2: [u8; 2usize], + _reserved3: [u8; 2usize], #[doc = "0x0c - data register"] pub data: DATA, - _reserved3: [u8; 2usize], + _reserved4: [u8; 2usize], #[doc = "0x10 - CRC polynomial register"] pub crcpoly: CRCPOLY, - _reserved4: [u8; 2usize], + _reserved5: [u8; 2usize], #[doc = "0x14 - RX CRC register"] pub rcrc: RCRC, - _reserved5: [u8; 2usize], + _reserved6: [u8; 2usize], #[doc = "0x18 - TX CRC register"] pub tcrc: TCRC, - _reserved6: [u8; 2usize], + _reserved7: [u8; 2usize], #[doc = "0x1c - I2S control register"] pub i2sctl: I2SCTL, - _reserved7: [u8; 2usize], + _reserved8: [u8; 2usize], #[doc = "0x20 - I2S prescaler register"] pub i2spsc: I2SPSC, } -#[doc = "control register 0"] -pub struct CTL0 { - register: ::vcell::VolatileCell, -} +#[doc = "control register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl0](ctl0) module"] +pub type CTL0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL0; +#[doc = "`read()` method returns [ctl0::R](ctl0::R) reader structure"] +impl crate::Readable for CTL0 {} +#[doc = "`write(|w| ..)` method takes [ctl0::W](ctl0::W) writer structure"] +impl crate::Writable for CTL0 {} #[doc = "control register 0"] pub mod ctl0; -#[doc = "control register 1"] -pub struct CTL1 { - register: ::vcell::VolatileCell, -} +#[doc = "control register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl1](ctl1) module"] +pub type CTL1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL1; +#[doc = "`read()` method returns [ctl1::R](ctl1::R) reader structure"] +impl crate::Readable for CTL1 {} +#[doc = "`write(|w| ..)` method takes [ctl1::W](ctl1::W) writer structure"] +impl crate::Writable for CTL1 {} #[doc = "control register 1"] pub mod ctl1; -#[doc = "status register"] -pub struct STAT { - register: ::vcell::VolatileCell, -} +#[doc = "status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [stat](stat) module"] +pub type STAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _STAT; +#[doc = "`read()` method returns [stat::R](stat::R) reader structure"] +impl crate::Readable for STAT {} +#[doc = "`write(|w| ..)` method takes [stat::W](stat::W) writer structure"] +impl crate::Writable for STAT {} #[doc = "status register"] pub mod stat; -#[doc = "data register"] -pub struct DATA { - register: ::vcell::VolatileCell, -} +#[doc = "data register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data](data) module"] +pub type DATA = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA; +#[doc = "`read()` method returns [data::R](data::R) reader structure"] +impl crate::Readable for DATA {} +#[doc = "`write(|w| ..)` method takes [data::W](data::W) writer structure"] +impl crate::Writable for DATA {} #[doc = "data register"] pub mod data; -#[doc = "CRC polynomial register"] -pub struct CRCPOLY { - register: ::vcell::VolatileCell, -} +#[doc = "CRC polynomial register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [crcpoly](crcpoly) module"] +pub type CRCPOLY = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CRCPOLY; +#[doc = "`read()` method returns [crcpoly::R](crcpoly::R) reader structure"] +impl crate::Readable for CRCPOLY {} +#[doc = "`write(|w| ..)` method takes [crcpoly::W](crcpoly::W) writer structure"] +impl crate::Writable for CRCPOLY {} #[doc = "CRC polynomial register"] pub mod crcpoly; -#[doc = "RX CRC register"] -pub struct RCRC { - register: ::vcell::VolatileCell, -} +#[doc = "RX CRC register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [rcrc](rcrc) module"] +pub type RCRC = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _RCRC; +#[doc = "`read()` method returns [rcrc::R](rcrc::R) reader structure"] +impl crate::Readable for RCRC {} #[doc = "RX CRC register"] pub mod rcrc; -#[doc = "TX CRC register"] -pub struct TCRC { - register: ::vcell::VolatileCell, -} +#[doc = "TX CRC register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [tcrc](tcrc) module"] +pub type TCRC = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _TCRC; +#[doc = "`read()` method returns [tcrc::R](tcrc::R) reader structure"] +impl crate::Readable for TCRC {} #[doc = "TX CRC register"] pub mod tcrc; -#[doc = "I2S control register"] -pub struct I2SCTL { - register: ::vcell::VolatileCell, -} +#[doc = "I2S control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [i2sctl](i2sctl) module"] +pub type I2SCTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _I2SCTL; +#[doc = "`read()` method returns [i2sctl::R](i2sctl::R) reader structure"] +impl crate::Readable for I2SCTL {} +#[doc = "`write(|w| ..)` method takes [i2sctl::W](i2sctl::W) writer structure"] +impl crate::Writable for I2SCTL {} #[doc = "I2S control register"] pub mod i2sctl; -#[doc = "I2S prescaler register"] -pub struct I2SPSC { - register: ::vcell::VolatileCell, -} +#[doc = "I2S prescaler register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [i2spsc](i2spsc) module"] +pub type I2SPSC = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _I2SPSC; +#[doc = "`read()` method returns [i2spsc::R](i2spsc::R) reader structure"] +impl crate::Readable for I2SPSC {} +#[doc = "`write(|w| ..)` method takes [i2spsc::W](i2spsc::W) writer structure"] +impl crate::Writable for I2SPSC {} #[doc = "I2S prescaler register"] pub mod i2spsc; diff --git a/src/spi0/crcpoly.rs b/src/spi0/crcpoly.rs index 862050c26f57766705668ae39a170acf5a6f25be..756fb4d1e3e42ff3fc7c0bc41440ffa7890ca163 100644 --- a/src/spi0/crcpoly.rs +++ b/src/spi0/crcpoly.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CRCPOLY { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CRCPOLYR { - bits: u16, -} -impl CRCPOLYR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CRCPOLYW<'a> { +#[doc = "Reader of register CRCPOLY"] +pub type R = crate::R; +#[doc = "Writer for register CRCPOLY"] +pub type W = crate::W; +#[doc = "Register CRCPOLY `reset()`'s with value 0x07"] +impl crate::ResetValue for super::CRCPOLY { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x07 + } +} +#[doc = "Reader of field `CRCPOLY`"] +pub type CRCPOLY_R = crate::R; +#[doc = "Write proxy for field `CRCPOLY`"] +pub struct CRCPOLY_W<'a> { w: &'a mut W, } -impl<'a> _CRCPOLYW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CRCPOLY_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - CRC polynomial value"] - #[inline] - pub fn crcpoly(&self) -> CRCPOLYR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - CRCPOLYR { bits } + #[inline(always)] + pub fn crcpoly(&self) -> CRCPOLY_R { + CRCPOLY_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x07 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - CRC polynomial value"] - #[inline] - pub fn crcpoly(&mut self) -> _CRCPOLYW { - _CRCPOLYW { w: self } + #[inline(always)] + pub fn crcpoly(&mut self) -> CRCPOLY_W { + CRCPOLY_W { w: self } } } diff --git a/src/spi0/ctl0.rs b/src/spi0/ctl0.rs index 2226744a3aa0bca8351fa7be218957ff994dd78c..1e2be83c6d7a1f7df9b24046cfb4b32f6b8d0346 100644 --- a/src/spi0/ctl0.rs +++ b/src/spi0/ctl0.rs @@ -1,872 +1,482 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CTL0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct BDENR { - bits: bool, -} -impl BDENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BDOENR { - bits: bool, -} -impl BDOENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CRCENR { - bits: bool, -} -impl CRCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CRCNTR { - bits: bool, -} -impl CRCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FF16R { - bits: bool, -} -impl FF16R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ROR { - bits: bool, -} -impl ROR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWNSSENR { - bits: bool, -} -impl SWNSSENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SWNSSR { - bits: bool, -} -impl SWNSSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LFR { - bits: bool, -} -impl LFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SPIENR { - bits: bool, -} -impl SPIENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PSCR { - bits: u8, -} -impl PSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MSTMODR { - bits: bool, -} -impl MSTMODR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CKPLR { - bits: bool, -} -impl CKPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CKPHR { - bits: bool, -} -impl CKPHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _BDENW<'a> { +#[doc = "Reader of register CTL0"] +pub type R = crate::R; +#[doc = "Writer for register CTL0"] +pub type W = crate::W; +#[doc = "Register CTL0 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL0 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `BDEN`"] +pub type BDEN_R = crate::R; +#[doc = "Write proxy for field `BDEN`"] +pub struct BDEN_W<'a> { w: &'a mut W, } -impl<'a> _BDENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BDEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u16) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _BDOENW<'a> { +#[doc = "Reader of field `BDOEN`"] +pub type BDOEN_R = crate::R; +#[doc = "Write proxy for field `BDOEN`"] +pub struct BDOEN_W<'a> { w: &'a mut W, } -impl<'a> _BDOENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BDOEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u16) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _CRCENW<'a> { +#[doc = "Reader of field `CRCEN`"] +pub type CRCEN_R = crate::R; +#[doc = "Write proxy for field `CRCEN`"] +pub struct CRCEN_W<'a> { w: &'a mut W, } -impl<'a> _CRCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CRCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u16) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _CRCNTW<'a> { +#[doc = "Reader of field `CRCNT`"] +pub type CRCNT_R = crate::R; +#[doc = "Write proxy for field `CRCNT`"] +pub struct CRCNT_W<'a> { w: &'a mut W, } -impl<'a> _CRCNTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CRCNT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u16) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _FF16W<'a> { +#[doc = "Reader of field `FF16`"] +pub type FF16_R = crate::R; +#[doc = "Write proxy for field `FF16`"] +pub struct FF16_W<'a> { w: &'a mut W, } -impl<'a> _FF16W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FF16_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u16) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _ROW<'a> { +#[doc = "Reader of field `RO`"] +pub type RO_R = crate::R; +#[doc = "Write proxy for field `RO`"] +pub struct RO_W<'a> { w: &'a mut W, } -impl<'a> _ROW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RO_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u16) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _SWNSSENW<'a> { +#[doc = "Reader of field `SWNSSEN`"] +pub type SWNSSEN_R = crate::R; +#[doc = "Write proxy for field `SWNSSEN`"] +pub struct SWNSSEN_W<'a> { w: &'a mut W, } -impl<'a> _SWNSSENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWNSSEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u16) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _SWNSSW<'a> { +#[doc = "Reader of field `SWNSS`"] +pub type SWNSS_R = crate::R; +#[doc = "Write proxy for field `SWNSS`"] +pub struct SWNSS_W<'a> { w: &'a mut W, } -impl<'a> _SWNSSW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SWNSS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u16) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _LFW<'a> { +#[doc = "Reader of field `LF`"] +pub type LF_R = crate::R; +#[doc = "Write proxy for field `LF`"] +pub struct LF_W<'a> { w: &'a mut W, } -impl<'a> _LFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _SPIENW<'a> { +#[doc = "Reader of field `SPIEN`"] +pub type SPIEN_R = crate::R; +#[doc = "Write proxy for field `SPIEN`"] +pub struct SPIEN_W<'a> { w: &'a mut W, } -impl<'a> _SPIENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SPIEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u16) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _PSCW<'a> { +#[doc = "Reader of field `PSC`"] +pub type PSC_R = crate::R; +#[doc = "Write proxy for field `PSC`"] +pub struct PSC_W<'a> { w: &'a mut W, } -impl<'a> _PSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 3)) | (((value as u16) & 0x07) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _MSTMODW<'a> { +#[doc = "Reader of field `MSTMOD`"] +pub type MSTMOD_R = crate::R; +#[doc = "Write proxy for field `MSTMOD`"] +pub struct MSTMOD_W<'a> { w: &'a mut W, } -impl<'a> _MSTMODW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MSTMOD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CKPLW<'a> { +#[doc = "Reader of field `CKPL`"] +pub type CKPL_R = crate::R; +#[doc = "Write proxy for field `CKPL`"] +pub struct CKPL_W<'a> { w: &'a mut W, } -impl<'a> _CKPLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CKPL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _CKPHW<'a> { +#[doc = "Reader of field `CKPH`"] +pub type CKPH_R = crate::R; +#[doc = "Write proxy for field `CKPH`"] +pub struct CKPH_W<'a> { w: &'a mut W, } -impl<'a> _CKPHW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CKPH_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 15 - Bidirectional enable"] - #[inline] - pub fn bden(&self) -> BDENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - BDENR { bits } + #[inline(always)] + pub fn bden(&self) -> BDEN_R { + BDEN_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 14 - Bidirectional Transmit output enable"] - #[inline] - pub fn bdoen(&self) -> BDOENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - BDOENR { bits } + #[inline(always)] + pub fn bdoen(&self) -> BDOEN_R { + BDOEN_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 13 - CRC Calculation Enable"] - #[inline] - pub fn crcen(&self) -> CRCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CRCENR { bits } + #[inline(always)] + pub fn crcen(&self) -> CRCEN_R { + CRCEN_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - CRC Next Transfer"] - #[inline] - pub fn crcnt(&self) -> CRCNTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CRCNTR { bits } + #[inline(always)] + pub fn crcnt(&self) -> CRCNT_R { + CRCNT_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Data frame format"] - #[inline] - pub fn ff16(&self) -> FF16R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - FF16R { bits } + #[inline(always)] + pub fn ff16(&self) -> FF16_R { + FF16_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Receive only"] - #[inline] - pub fn ro(&self) -> ROR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ROR { bits } + #[inline(always)] + pub fn ro(&self) -> RO_R { + RO_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - NSS Software Mode Selection"] - #[inline] - pub fn swnssen(&self) -> SWNSSENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - SWNSSENR { bits } + #[inline(always)] + pub fn swnssen(&self) -> SWNSSEN_R { + SWNSSEN_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - NSS Pin Selection In NSS Software Mode"] - #[inline] - pub fn swnss(&self) -> SWNSSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - SWNSSR { bits } + #[inline(always)] + pub fn swnss(&self) -> SWNSS_R { + SWNSS_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - LSB First Mode"] - #[inline] - pub fn lf(&self) -> LFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - LFR { bits } + #[inline(always)] + pub fn lf(&self) -> LF_R { + LF_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - SPI enable"] - #[inline] - pub fn spien(&self) -> SPIENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - SPIENR { bits } + #[inline(always)] + pub fn spien(&self) -> SPIEN_R { + SPIEN_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bits 3:5 - Master Clock Prescaler Selection"] - #[inline] - pub fn psc(&self) -> PSCR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - PSCR { bits } + #[inline(always)] + pub fn psc(&self) -> PSC_R { + PSC_R::new(((self.bits >> 3) & 0x07) as u8) } #[doc = "Bit 2 - Master Mode Enable"] - #[inline] - pub fn mstmod(&self) -> MSTMODR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - MSTMODR { bits } + #[inline(always)] + pub fn mstmod(&self) -> MSTMOD_R { + MSTMOD_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Clock polarity Selection"] - #[inline] - pub fn ckpl(&self) -> CKPLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CKPLR { bits } + #[inline(always)] + pub fn ckpl(&self) -> CKPL_R { + CKPL_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Clock Phase Selection"] - #[inline] - pub fn ckph(&self) -> CKPHR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CKPHR { bits } + #[inline(always)] + pub fn ckph(&self) -> CKPH_R { + CKPH_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 15 - Bidirectional enable"] - #[inline] - pub fn bden(&mut self) -> _BDENW { - _BDENW { w: self } + #[inline(always)] + pub fn bden(&mut self) -> BDEN_W { + BDEN_W { w: self } } #[doc = "Bit 14 - Bidirectional Transmit output enable"] - #[inline] - pub fn bdoen(&mut self) -> _BDOENW { - _BDOENW { w: self } + #[inline(always)] + pub fn bdoen(&mut self) -> BDOEN_W { + BDOEN_W { w: self } } #[doc = "Bit 13 - CRC Calculation Enable"] - #[inline] - pub fn crcen(&mut self) -> _CRCENW { - _CRCENW { w: self } + #[inline(always)] + pub fn crcen(&mut self) -> CRCEN_W { + CRCEN_W { w: self } } #[doc = "Bit 12 - CRC Next Transfer"] - #[inline] - pub fn crcnt(&mut self) -> _CRCNTW { - _CRCNTW { w: self } + #[inline(always)] + pub fn crcnt(&mut self) -> CRCNT_W { + CRCNT_W { w: self } } #[doc = "Bit 11 - Data frame format"] - #[inline] - pub fn ff16(&mut self) -> _FF16W { - _FF16W { w: self } + #[inline(always)] + pub fn ff16(&mut self) -> FF16_W { + FF16_W { w: self } } #[doc = "Bit 10 - Receive only"] - #[inline] - pub fn ro(&mut self) -> _ROW { - _ROW { w: self } + #[inline(always)] + pub fn ro(&mut self) -> RO_W { + RO_W { w: self } } #[doc = "Bit 9 - NSS Software Mode Selection"] - #[inline] - pub fn swnssen(&mut self) -> _SWNSSENW { - _SWNSSENW { w: self } + #[inline(always)] + pub fn swnssen(&mut self) -> SWNSSEN_W { + SWNSSEN_W { w: self } } #[doc = "Bit 8 - NSS Pin Selection In NSS Software Mode"] - #[inline] - pub fn swnss(&mut self) -> _SWNSSW { - _SWNSSW { w: self } + #[inline(always)] + pub fn swnss(&mut self) -> SWNSS_W { + SWNSS_W { w: self } } #[doc = "Bit 7 - LSB First Mode"] - #[inline] - pub fn lf(&mut self) -> _LFW { - _LFW { w: self } + #[inline(always)] + pub fn lf(&mut self) -> LF_W { + LF_W { w: self } } #[doc = "Bit 6 - SPI enable"] - #[inline] - pub fn spien(&mut self) -> _SPIENW { - _SPIENW { w: self } + #[inline(always)] + pub fn spien(&mut self) -> SPIEN_W { + SPIEN_W { w: self } } #[doc = "Bits 3:5 - Master Clock Prescaler Selection"] - #[inline] - pub fn psc(&mut self) -> _PSCW { - _PSCW { w: self } + #[inline(always)] + pub fn psc(&mut self) -> PSC_W { + PSC_W { w: self } } #[doc = "Bit 2 - Master Mode Enable"] - #[inline] - pub fn mstmod(&mut self) -> _MSTMODW { - _MSTMODW { w: self } + #[inline(always)] + pub fn mstmod(&mut self) -> MSTMOD_W { + MSTMOD_W { w: self } } #[doc = "Bit 1 - Clock polarity Selection"] - #[inline] - pub fn ckpl(&mut self) -> _CKPLW { - _CKPLW { w: self } + #[inline(always)] + pub fn ckpl(&mut self) -> CKPL_W { + CKPL_W { w: self } } #[doc = "Bit 0 - Clock Phase Selection"] - #[inline] - pub fn ckph(&mut self) -> _CKPHW { - _CKPHW { w: self } + #[inline(always)] + pub fn ckph(&mut self) -> CKPH_W { + CKPH_W { w: self } } } diff --git a/src/spi0/ctl1.rs b/src/spi0/ctl1.rs index c6050c557c568ec4f8339dc9c7f0f68b9405f3f7..75da4003813e77070673aa10e08b9cd3e494a907 100644 --- a/src/spi0/ctl1.rs +++ b/src/spi0/ctl1.rs @@ -1,536 +1,288 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CTL1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TBEIER { - bits: bool, -} -impl TBEIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RBNEIER { - bits: bool, -} -impl RBNEIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TMODR { - bits: bool, -} -impl TMODR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NSSPR { - bits: bool, -} -impl NSSPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NSSDRVR { - bits: bool, -} -impl NSSDRVR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DMATENR { - bits: bool, -} -impl DMATENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DMARENR { - bits: bool, -} -impl DMARENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TBEIEW<'a> { +#[doc = "Reader of register CTL1"] +pub type R = crate::R; +#[doc = "Writer for register CTL1"] +pub type W = crate::W; +#[doc = "Register CTL1 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL1 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TBEIE`"] +pub type TBEIE_R = crate::R; +#[doc = "Write proxy for field `TBEIE`"] +pub struct TBEIE_W<'a> { w: &'a mut W, } -impl<'a> _TBEIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TBEIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _RBNEIEW<'a> { +#[doc = "Reader of field `RBNEIE`"] +pub type RBNEIE_R = crate::R; +#[doc = "Write proxy for field `RBNEIE`"] +pub struct RBNEIE_W<'a> { w: &'a mut W, } -impl<'a> _RBNEIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RBNEIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u16) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u16) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _TMODW<'a> { +#[doc = "Reader of field `TMOD`"] +pub type TMOD_R = crate::R; +#[doc = "Write proxy for field `TMOD`"] +pub struct TMOD_W<'a> { w: &'a mut W, } -impl<'a> _TMODW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TMOD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u16) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _NSSPW<'a> { +#[doc = "Reader of field `NSSP`"] +pub type NSSP_R = crate::R; +#[doc = "Write proxy for field `NSSP`"] +pub struct NSSP_W<'a> { w: &'a mut W, } -impl<'a> _NSSPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NSSP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NSSDRVW<'a> { +#[doc = "Reader of field `NSSDRV`"] +pub type NSSDRV_R = crate::R; +#[doc = "Write proxy for field `NSSDRV`"] +pub struct NSSDRV_W<'a> { w: &'a mut W, } -impl<'a> _NSSDRVW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NSSDRV_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _DMATENW<'a> { +#[doc = "Reader of field `DMATEN`"] +pub type DMATEN_R = crate::R; +#[doc = "Write proxy for field `DMATEN`"] +pub struct DMATEN_W<'a> { w: &'a mut W, } -impl<'a> _DMATENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DMATEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _DMARENW<'a> { +#[doc = "Reader of field `DMAREN`"] +pub type DMAREN_R = crate::R; +#[doc = "Write proxy for field `DMAREN`"] +pub struct DMAREN_W<'a> { w: &'a mut W, } -impl<'a> _DMARENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DMAREN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 7 - Tx buffer empty interrupt enable"] - #[inline] - pub fn tbeie(&self) -> TBEIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TBEIER { bits } + #[inline(always)] + pub fn tbeie(&self) -> TBEIE_R { + TBEIE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - RX buffer not empty interrupt enable"] - #[inline] - pub fn rbneie(&self) -> RBNEIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - RBNEIER { bits } + #[inline(always)] + pub fn rbneie(&self) -> RBNEIE_R { + RBNEIE_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Error interrupt enable"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - SPI TI mode enable"] - #[inline] - pub fn tmod(&self) -> TMODR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TMODR { bits } + #[inline(always)] + pub fn tmod(&self) -> TMOD_R { + TMOD_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - SPI NSS pulse mode enable"] - #[inline] - pub fn nssp(&self) -> NSSPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - NSSPR { bits } + #[inline(always)] + pub fn nssp(&self) -> NSSP_R { + NSSP_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Drive NSS Output"] - #[inline] - pub fn nssdrv(&self) -> NSSDRVR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - NSSDRVR { bits } + #[inline(always)] + pub fn nssdrv(&self) -> NSSDRV_R { + NSSDRV_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Transmit Buffer DMA Enable"] - #[inline] - pub fn dmaten(&self) -> DMATENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - DMATENR { bits } + #[inline(always)] + pub fn dmaten(&self) -> DMATEN_R { + DMATEN_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Rx buffer DMA enable"] - #[inline] - pub fn dmaren(&self) -> DMARENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - DMARENR { bits } + #[inline(always)] + pub fn dmaren(&self) -> DMAREN_R { + DMAREN_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 7 - Tx buffer empty interrupt enable"] - #[inline] - pub fn tbeie(&mut self) -> _TBEIEW { - _TBEIEW { w: self } + #[inline(always)] + pub fn tbeie(&mut self) -> TBEIE_W { + TBEIE_W { w: self } } #[doc = "Bit 6 - RX buffer not empty interrupt enable"] - #[inline] - pub fn rbneie(&mut self) -> _RBNEIEW { - _RBNEIEW { w: self } + #[inline(always)] + pub fn rbneie(&mut self) -> RBNEIE_W { + RBNEIE_W { w: self } } #[doc = "Bit 5 - Error interrupt enable"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } #[doc = "Bit 4 - SPI TI mode enable"] - #[inline] - pub fn tmod(&mut self) -> _TMODW { - _TMODW { w: self } + #[inline(always)] + pub fn tmod(&mut self) -> TMOD_W { + TMOD_W { w: self } } #[doc = "Bit 3 - SPI NSS pulse mode enable"] - #[inline] - pub fn nssp(&mut self) -> _NSSPW { - _NSSPW { w: self } + #[inline(always)] + pub fn nssp(&mut self) -> NSSP_W { + NSSP_W { w: self } } #[doc = "Bit 2 - Drive NSS Output"] - #[inline] - pub fn nssdrv(&mut self) -> _NSSDRVW { - _NSSDRVW { w: self } + #[inline(always)] + pub fn nssdrv(&mut self) -> NSSDRV_W { + NSSDRV_W { w: self } } #[doc = "Bit 1 - Transmit Buffer DMA Enable"] - #[inline] - pub fn dmaten(&mut self) -> _DMATENW { - _DMATENW { w: self } + #[inline(always)] + pub fn dmaten(&mut self) -> DMATEN_W { + DMATEN_W { w: self } } #[doc = "Bit 0 - Rx buffer DMA enable"] - #[inline] - pub fn dmaren(&mut self) -> _DMARENW { - _DMARENW { w: self } + #[inline(always)] + pub fn dmaren(&mut self) -> DMAREN_W { + DMAREN_W { w: self } } } diff --git a/src/spi0/data.rs b/src/spi0/data.rs index 97fba71cf976ee5b88aced8fb7b67f572211bfc4..9397824d80256b57275376033941b25769e82865 100644 --- a/src/spi0/data.rs +++ b/src/spi0/data.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DATA { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SPI_DATAR { - bits: u16, -} -impl SPI_DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _SPI_DATAW<'a> { +#[doc = "Reader of register DATA"] +pub type R = crate::R; +#[doc = "Writer for register DATA"] +pub type W = crate::W; +#[doc = "Register DATA `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `SPI_DATA`"] +pub type SPI_DATA_R = crate::R; +#[doc = "Write proxy for field `SPI_DATA`"] +pub struct SPI_DATA_W<'a> { w: &'a mut W, } -impl<'a> _SPI_DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SPI_DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Data transfer register"] - #[inline] - pub fn spi_data(&self) -> SPI_DATAR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - SPI_DATAR { bits } + #[inline(always)] + pub fn spi_data(&self) -> SPI_DATA_R { + SPI_DATA_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Data transfer register"] - #[inline] - pub fn spi_data(&mut self) -> _SPI_DATAW { - _SPI_DATAW { w: self } + #[inline(always)] + pub fn spi_data(&mut self) -> SPI_DATA_W { + SPI_DATA_W { w: self } } } diff --git a/src/spi0/i2sctl.rs b/src/spi0/i2sctl.rs index 2646370755e4497729a61a3eac2dce07e3c44224..f10c957b837c7c67a1ee792ec1371f5b12729445 100644 --- a/src/spi0/i2sctl.rs +++ b/src/spi0/i2sctl.rs @@ -1,482 +1,258 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::I2SCTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct I2SSELR { - bits: bool, -} -impl I2SSELR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct I2SENR { - bits: bool, -} -impl I2SENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct I2SOPMODR { - bits: u8, -} -impl I2SOPMODR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PCMSMODR { - bits: bool, -} -impl PCMSMODR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct I2SSTDR { - bits: u8, -} -impl I2SSTDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CKPLR { - bits: bool, -} -impl CKPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTLENR { - bits: u8, -} -impl DTLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CHLENR { - bits: bool, -} -impl CHLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _I2SSELW<'a> { +#[doc = "Reader of register I2SCTL"] +pub type R = crate::R; +#[doc = "Writer for register I2SCTL"] +pub type W = crate::W; +#[doc = "Register I2SCTL `reset()`'s with value 0"] +impl crate::ResetValue for super::I2SCTL { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `I2SSEL`"] +pub type I2SSEL_R = crate::R; +#[doc = "Write proxy for field `I2SSEL`"] +pub struct I2SSEL_W<'a> { w: &'a mut W, } -impl<'a> _I2SSELW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> I2SSEL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u16) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _I2SENW<'a> { +#[doc = "Reader of field `I2SEN`"] +pub type I2SEN_R = crate::R; +#[doc = "Write proxy for field `I2SEN`"] +pub struct I2SEN_W<'a> { w: &'a mut W, } -impl<'a> _I2SENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> I2SEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u16) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _I2SOPMODW<'a> { +#[doc = "Reader of field `I2SOPMOD`"] +pub type I2SOPMOD_R = crate::R; +#[doc = "Write proxy for field `I2SOPMOD`"] +pub struct I2SOPMOD_W<'a> { w: &'a mut W, } -impl<'a> _I2SOPMODW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> I2SOPMOD_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u16) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _PCMSMODW<'a> { +#[doc = "Reader of field `PCMSMOD`"] +pub type PCMSMOD_R = crate::R; +#[doc = "Write proxy for field `PCMSMOD`"] +pub struct PCMSMOD_W<'a> { w: &'a mut W, } -impl<'a> _PCMSMODW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PCMSMOD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _I2SSTDW<'a> { +#[doc = "Reader of field `I2SSTD`"] +pub type I2SSTD_R = crate::R; +#[doc = "Write proxy for field `I2SSTD`"] +pub struct I2SSTD_W<'a> { w: &'a mut W, } -impl<'a> _I2SSTDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> I2SSTD_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 4)) | (((value as u16) & 0x03) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CKPLW<'a> { +#[doc = "Reader of field `CKPL`"] +pub type CKPL_R = crate::R; +#[doc = "Write proxy for field `CKPL`"] +pub struct CKPL_W<'a> { w: &'a mut W, } -impl<'a> _CKPLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CKPL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _DTLENW<'a> { +#[doc = "Reader of field `DTLEN`"] +pub type DTLEN_R = crate::R; +#[doc = "Write proxy for field `DTLEN`"] +pub struct DTLEN_W<'a> { w: &'a mut W, } -impl<'a> _DTLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DTLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 1)) | (((value as u16) & 0x03) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _CHLENW<'a> { +#[doc = "Reader of field `CHLEN`"] +pub type CHLEN_R = crate::R; +#[doc = "Write proxy for field `CHLEN`"] +pub struct CHLEN_W<'a> { w: &'a mut W, } -impl<'a> _CHLENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHLEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 11 - I2S mode selection"] - #[inline] - pub fn i2ssel(&self) -> I2SSELR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - I2SSELR { bits } + #[inline(always)] + pub fn i2ssel(&self) -> I2SSEL_R { + I2SSEL_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - I2S Enable"] - #[inline] - pub fn i2sen(&self) -> I2SENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - I2SENR { bits } + #[inline(always)] + pub fn i2sen(&self) -> I2SEN_R { + I2SEN_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bits 8:9 - I2S operation mode"] - #[inline] - pub fn i2sopmod(&self) -> I2SOPMODR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - I2SOPMODR { bits } + #[inline(always)] + pub fn i2sopmod(&self) -> I2SOPMOD_R { + I2SOPMOD_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bit 7 - PCM frame synchronization mode"] - #[inline] - pub fn pcmsmod(&self) -> PCMSMODR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - PCMSMODR { bits } + #[inline(always)] + pub fn pcmsmod(&self) -> PCMSMOD_R { + PCMSMOD_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 4:5 - I2S standard selection"] - #[inline] - pub fn i2sstd(&self) -> I2SSTDR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - I2SSTDR { bits } + #[inline(always)] + pub fn i2sstd(&self) -> I2SSTD_R { + I2SSTD_R::new(((self.bits >> 4) & 0x03) as u8) } #[doc = "Bit 3 - Idle state clock polarity"] - #[inline] - pub fn ckpl(&self) -> CKPLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CKPLR { bits } + #[inline(always)] + pub fn ckpl(&self) -> CKPL_R { + CKPL_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bits 1:2 - Data length"] - #[inline] - pub fn dtlen(&self) -> DTLENR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - DTLENR { bits } + #[inline(always)] + pub fn dtlen(&self) -> DTLEN_R { + DTLEN_R::new(((self.bits >> 1) & 0x03) as u8) } #[doc = "Bit 0 - Channel length (number of bits per audio channel)"] - #[inline] - pub fn chlen(&self) -> CHLENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CHLENR { bits } + #[inline(always)] + pub fn chlen(&self) -> CHLEN_R { + CHLEN_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 11 - I2S mode selection"] - #[inline] - pub fn i2ssel(&mut self) -> _I2SSELW { - _I2SSELW { w: self } + #[inline(always)] + pub fn i2ssel(&mut self) -> I2SSEL_W { + I2SSEL_W { w: self } } #[doc = "Bit 10 - I2S Enable"] - #[inline] - pub fn i2sen(&mut self) -> _I2SENW { - _I2SENW { w: self } + #[inline(always)] + pub fn i2sen(&mut self) -> I2SEN_W { + I2SEN_W { w: self } } #[doc = "Bits 8:9 - I2S operation mode"] - #[inline] - pub fn i2sopmod(&mut self) -> _I2SOPMODW { - _I2SOPMODW { w: self } + #[inline(always)] + pub fn i2sopmod(&mut self) -> I2SOPMOD_W { + I2SOPMOD_W { w: self } } #[doc = "Bit 7 - PCM frame synchronization mode"] - #[inline] - pub fn pcmsmod(&mut self) -> _PCMSMODW { - _PCMSMODW { w: self } + #[inline(always)] + pub fn pcmsmod(&mut self) -> PCMSMOD_W { + PCMSMOD_W { w: self } } #[doc = "Bits 4:5 - I2S standard selection"] - #[inline] - pub fn i2sstd(&mut self) -> _I2SSTDW { - _I2SSTDW { w: self } + #[inline(always)] + pub fn i2sstd(&mut self) -> I2SSTD_W { + I2SSTD_W { w: self } } #[doc = "Bit 3 - Idle state clock polarity"] - #[inline] - pub fn ckpl(&mut self) -> _CKPLW { - _CKPLW { w: self } + #[inline(always)] + pub fn ckpl(&mut self) -> CKPL_W { + CKPL_W { w: self } } #[doc = "Bits 1:2 - Data length"] - #[inline] - pub fn dtlen(&mut self) -> _DTLENW { - _DTLENW { w: self } + #[inline(always)] + pub fn dtlen(&mut self) -> DTLEN_W { + DTLEN_W { w: self } } #[doc = "Bit 0 - Channel length (number of bits per audio channel)"] - #[inline] - pub fn chlen(&mut self) -> _CHLENW { - _CHLENW { w: self } + #[inline(always)] + pub fn chlen(&mut self) -> CHLEN_W { + CHLEN_W { w: self } } } diff --git a/src/spi0/i2spsc.rs b/src/spi0/i2spsc.rs index 3f15b4f2bad857e703758b2626eb933b20047512..fb4560ba6d46e4f19414940f039957c8da4056ab 100644 --- a/src/spi0/i2spsc.rs +++ b/src/spi0/i2spsc.rs @@ -1,223 +1,108 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::I2SPSC { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MCKOENR { - bits: bool, -} -impl MCKOENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OFR { - bits: bool, -} -impl OFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DIVR { - bits: u8, -} -impl DIVR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MCKOENW<'a> { +#[doc = "Reader of register I2SPSC"] +pub type R = crate::R; +#[doc = "Writer for register I2SPSC"] +pub type W = crate::W; +#[doc = "Register I2SPSC `reset()`'s with value 0x02"] +impl crate::ResetValue for super::I2SPSC { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x02 + } +} +#[doc = "Reader of field `MCKOEN`"] +pub type MCKOEN_R = crate::R; +#[doc = "Write proxy for field `MCKOEN`"] +pub struct MCKOEN_W<'a> { w: &'a mut W, } -impl<'a> _MCKOENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MCKOEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u16) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _OFW<'a> { +#[doc = "Reader of field `OF`"] +pub type OF_R = crate::R; +#[doc = "Write proxy for field `OF`"] +pub struct OF_W<'a> { w: &'a mut W, } -impl<'a> _OFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u16) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _DIVW<'a> { +#[doc = "Reader of field `DIV`"] +pub type DIV_R = crate::R; +#[doc = "Write proxy for field `DIV`"] +pub struct DIV_W<'a> { w: &'a mut W, } -impl<'a> _DIVW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DIV_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u16) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 9 - I2S_MCK output enable"] - #[inline] - pub fn mckoen(&self) -> MCKOENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - MCKOENR { bits } + #[inline(always)] + pub fn mckoen(&self) -> MCKOEN_R { + MCKOEN_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Odd factor for the prescaler"] - #[inline] - pub fn of(&self) -> OFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - OFR { bits } + #[inline(always)] + pub fn of(&self) -> OF_R { + OF_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bits 0:7 - Dividing factor for the prescaler"] - #[inline] - pub fn div(&self) -> DIVR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - DIVR { bits } + #[inline(always)] + pub fn div(&self) -> DIV_R { + DIV_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x02 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 9 - I2S_MCK output enable"] - #[inline] - pub fn mckoen(&mut self) -> _MCKOENW { - _MCKOENW { w: self } + #[inline(always)] + pub fn mckoen(&mut self) -> MCKOEN_W { + MCKOEN_W { w: self } } #[doc = "Bit 8 - Odd factor for the prescaler"] - #[inline] - pub fn of(&mut self) -> _OFW { - _OFW { w: self } + #[inline(always)] + pub fn of(&mut self) -> OF_W { + OF_W { w: self } } #[doc = "Bits 0:7 - Dividing factor for the prescaler"] - #[inline] - pub fn div(&mut self) -> _DIVW { - _DIVW { w: self } + #[inline(always)] + pub fn div(&mut self) -> DIV_W { + DIV_W { w: self } } } diff --git a/src/spi0/rcrc.rs b/src/spi0/rcrc.rs index de9c43dc13f136a42dffdfb896f89b26910f3906..08a826b99bd57bf9756d1afbf3053c43a5053c0f 100644 --- a/src/spi0/rcrc.rs +++ b/src/spi0/rcrc.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -impl super::RCRC { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct RCRCR { - bits: u16, -} -impl RCRCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register RCRC"] +pub type R = crate::R; +#[doc = "Reader of field `RCRC`"] +pub type RCRC_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - RX CRC value"] - #[inline] - pub fn rcrc(&self) -> RCRCR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - RCRCR { bits } + #[inline(always)] + pub fn rcrc(&self) -> RCRC_R { + RCRC_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/spi0/stat.rs b/src/spi0/stat.rs index 1829afc766efe55609e61691e8bf1a532650ddb5..ad9a57500c1ead67803150b9fe032a46df97c3e2 100644 --- a/src/spi0/stat.rs +++ b/src/spi0/stat.rs @@ -1,371 +1,106 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::STAT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FERRR { - bits: bool, -} -impl FERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TRANSR { - bits: bool, -} -impl TRANSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RXORERRR { - bits: bool, -} -impl RXORERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CONFERRR { - bits: bool, -} -impl CONFERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CRCERRR { - bits: bool, -} -impl CRCERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TXURERRR { - bits: bool, -} -impl TXURERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct I2SCHR { - bits: bool, -} -impl I2SCHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TBER { - bits: bool, -} -impl TBER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RBNER { - bits: bool, -} -impl RBNER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CRCERRW<'a> { +#[doc = "Reader of register STAT"] +pub type R = crate::R; +#[doc = "Writer for register STAT"] +pub type W = crate::W; +#[doc = "Register STAT `reset()`'s with value 0x02"] +impl crate::ResetValue for super::STAT { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x02 + } +} +#[doc = "Reader of field `FERR`"] +pub type FERR_R = crate::R; +#[doc = "Reader of field `TRANS`"] +pub type TRANS_R = crate::R; +#[doc = "Reader of field `RXORERR`"] +pub type RXORERR_R = crate::R; +#[doc = "Reader of field `CONFERR`"] +pub type CONFERR_R = crate::R; +#[doc = "Reader of field `CRCERR`"] +pub type CRCERR_R = crate::R; +#[doc = "Write proxy for field `CRCERR`"] +pub struct CRCERR_W<'a> { w: &'a mut W, } -impl<'a> _CRCERRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CRCERR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u16) & 0x01) << 4); self.w } } +#[doc = "Reader of field `TXURERR`"] +pub type TXURERR_R = crate::R; +#[doc = "Reader of field `I2SCH`"] +pub type I2SCH_R = crate::R; +#[doc = "Reader of field `TBE`"] +pub type TBE_R = crate::R; +#[doc = "Reader of field `RBNE`"] +pub type RBNE_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 8 - Format error"] - #[inline] - pub fn ferr(&self) -> FERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - FERRR { bits } + #[inline(always)] + pub fn ferr(&self) -> FERR_R { + FERR_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - Transmitting On-going Bit"] - #[inline] - pub fn trans(&self) -> TRANSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TRANSR { bits } + #[inline(always)] + pub fn trans(&self) -> TRANS_R { + TRANS_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Reception Overrun Error Bit"] - #[inline] - pub fn rxorerr(&self) -> RXORERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - RXORERRR { bits } + #[inline(always)] + pub fn rxorerr(&self) -> RXORERR_R { + RXORERR_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - SPI Configuration error"] - #[inline] - pub fn conferr(&self) -> CONFERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CONFERRR { bits } + #[inline(always)] + pub fn conferr(&self) -> CONFERR_R { + CONFERR_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - SPI CRC Error Bit"] - #[inline] - pub fn crcerr(&self) -> CRCERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CRCERRR { bits } + #[inline(always)] + pub fn crcerr(&self) -> CRCERR_R { + CRCERR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Transmission underrun error bit"] - #[inline] - pub fn txurerr(&self) -> TXURERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TXURERRR { bits } + #[inline(always)] + pub fn txurerr(&self) -> TXURERR_R { + TXURERR_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - I2S channel side"] - #[inline] - pub fn i2sch(&self) -> I2SCHR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - I2SCHR { bits } + #[inline(always)] + pub fn i2sch(&self) -> I2SCH_R { + I2SCH_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Transmit Buffer Empty"] - #[inline] - pub fn tbe(&self) -> TBER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TBER { bits } + #[inline(always)] + pub fn tbe(&self) -> TBE_R { + TBE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Receive Buffer Not Empty"] - #[inline] - pub fn rbne(&self) -> RBNER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - RBNER { bits } + #[inline(always)] + pub fn rbne(&self) -> RBNE_R { + RBNE_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x02 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 4 - SPI CRC Error Bit"] - #[inline] - pub fn crcerr(&mut self) -> _CRCERRW { - _CRCERRW { w: self } + #[inline(always)] + pub fn crcerr(&mut self) -> CRCERR_W { + CRCERR_W { w: self } } } diff --git a/src/spi0/tcrc.rs b/src/spi0/tcrc.rs index 16a043c8efec1c5328b6e1881eaeee16373768aa..464357e50c222b175ebb709bf8e5042b16853ec9 100644 --- a/src/spi0/tcrc.rs +++ b/src/spi0/tcrc.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -impl super::TCRC { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct TCRCR { - bits: u16, -} -impl TCRCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register TCRC"] +pub type R = crate::R; +#[doc = "Reader of field `TCRC`"] +pub type TCRC_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Tx CRC value"] - #[inline] - pub fn tcrc(&self) -> TCRCR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - TCRCR { bits } + #[inline(always)] + pub fn tcrc(&self) -> TCRC_R { + TCRC_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/timer0.rs b/src/timer0.rs index 0f84c4c91725e55181b3e15a1b08410b7134f01c..c93a51f7c085890c79d87507a66d56ffa84014b1 100644 --- a/src/timer0.rs +++ b/src/timer0.rs @@ -1,195 +1,343 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - control register 0"] pub ctl0: CTL0, - _reserved0: [u8; 2usize], + _reserved1: [u8; 2usize], #[doc = "0x04 - control register 1"] pub ctl1: CTL1, - _reserved1: [u8; 2usize], + _reserved2: [u8; 2usize], #[doc = "0x08 - slave mode configuration register"] pub smcfg: SMCFG, - _reserved2: [u8; 2usize], + _reserved3: [u8; 2usize], #[doc = "0x0c - DMA/Interrupt enable register"] pub dmainten: DMAINTEN, - _reserved3: [u8; 2usize], + _reserved4: [u8; 2usize], #[doc = "0x10 - Interrupt flag register"] pub intf: INTF, - _reserved4: [u8; 2usize], + _reserved5: [u8; 2usize], #[doc = "0x14 - Software event generation register"] pub swevg: SWEVG, - _reserved5: [u8; 2usize], - #[doc = "0x18 - Channel control register 0 (output mode)"] - pub chctl0_output: CHCTL0_OUTPUT, _reserved6: [u8; 2usize], - #[doc = "0x1c - Channel control register 1 (output mode)"] - pub chctl1_output: CHCTL1_OUTPUT, + _reserved_6_chctl0: [u8; 2usize], _reserved7: [u8; 2usize], + _reserved_7_chctl1: [u8; 2usize], + _reserved8: [u8; 2usize], #[doc = "0x20 - Channel control register 2"] pub chctl2: CHCTL2, - _reserved8: [u8; 2usize], + _reserved9: [u8; 2usize], #[doc = "0x24 - counter"] pub cnt: CNT, - _reserved9: [u8; 2usize], + _reserved10: [u8; 2usize], #[doc = "0x28 - prescaler"] pub psc: PSC, - _reserved10: [u8; 2usize], + _reserved11: [u8; 2usize], #[doc = "0x2c - Counter auto reload register"] pub car: CAR, - _reserved11: [u8; 2usize], + _reserved12: [u8; 2usize], #[doc = "0x30 - Counter repetition register"] pub crep: CREP, - _reserved12: [u8; 2usize], + _reserved13: [u8; 2usize], #[doc = "0x34 - Channel 0 capture/compare value register"] pub ch0cv: CH0CV, - _reserved13: [u8; 2usize], + _reserved14: [u8; 2usize], #[doc = "0x38 - Channel 1 capture/compare value register"] pub ch1cv: CH1CV, - _reserved14: [u8; 2usize], + _reserved15: [u8; 2usize], #[doc = "0x3c - Channel 2 capture/compare value register"] pub ch2cv: CH2CV, - _reserved15: [u8; 2usize], + _reserved16: [u8; 2usize], #[doc = "0x40 - Channel 3 capture/compare value register"] pub ch3cv: CH3CV, - _reserved16: [u8; 2usize], + _reserved17: [u8; 2usize], #[doc = "0x44 - channel complementary protection register"] pub cchp: CCHP, - _reserved17: [u8; 2usize], + _reserved18: [u8; 2usize], #[doc = "0x48 - DMA configuration register"] pub dmacfg: DMACFG, - _reserved18: [u8; 2usize], + _reserved19: [u8; 2usize], #[doc = "0x4c - DMA transfer buffer register"] pub dmatb: DMATB, } -#[doc = "control register 0"] -pub struct CTL0 { - register: ::vcell::VolatileCell, +impl RegisterBlock { + #[doc = "0x18 - Channel control register 0 (input mode)"] + #[inline(always)] + pub fn chctl0_input(&self) -> &CHCTL0_INPUT { + unsafe { &*(((self as *const Self) as *const u8).add(24usize) as *const CHCTL0_INPUT) } + } + #[doc = "0x18 - Channel control register 0 (input mode)"] + #[inline(always)] + pub fn chctl0_input_mut(&self) -> &mut CHCTL0_INPUT { + unsafe { &mut *(((self as *const Self) as *mut u8).add(24usize) as *mut CHCTL0_INPUT) } + } + #[doc = "0x18 - Channel control register 0 (output mode)"] + #[inline(always)] + pub fn chctl0_output(&self) -> &CHCTL0_OUTPUT { + unsafe { &*(((self as *const Self) as *const u8).add(24usize) as *const CHCTL0_OUTPUT) } + } + #[doc = "0x18 - Channel control register 0 (output mode)"] + #[inline(always)] + pub fn chctl0_output_mut(&self) -> &mut CHCTL0_OUTPUT { + unsafe { &mut *(((self as *const Self) as *mut u8).add(24usize) as *mut CHCTL0_OUTPUT) } + } + #[doc = "0x1c - Channel control register 1 (input mode)"] + #[inline(always)] + pub fn chctl1_input(&self) -> &CHCTL1_INPUT { + unsafe { &*(((self as *const Self) as *const u8).add(28usize) as *const CHCTL1_INPUT) } + } + #[doc = "0x1c - Channel control register 1 (input mode)"] + #[inline(always)] + pub fn chctl1_input_mut(&self) -> &mut CHCTL1_INPUT { + unsafe { &mut *(((self as *const Self) as *mut u8).add(28usize) as *mut CHCTL1_INPUT) } + } + #[doc = "0x1c - Channel control register 1 (output mode)"] + #[inline(always)] + pub fn chctl1_output(&self) -> &CHCTL1_OUTPUT { + unsafe { &*(((self as *const Self) as *const u8).add(28usize) as *const CHCTL1_OUTPUT) } + } + #[doc = "0x1c - Channel control register 1 (output mode)"] + #[inline(always)] + pub fn chctl1_output_mut(&self) -> &mut CHCTL1_OUTPUT { + unsafe { &mut *(((self as *const Self) as *mut u8).add(28usize) as *mut CHCTL1_OUTPUT) } + } } +#[doc = "control register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl0](ctl0) module"] +pub type CTL0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL0; +#[doc = "`read()` method returns [ctl0::R](ctl0::R) reader structure"] +impl crate::Readable for CTL0 {} +#[doc = "`write(|w| ..)` method takes [ctl0::W](ctl0::W) writer structure"] +impl crate::Writable for CTL0 {} #[doc = "control register 0"] pub mod ctl0; -#[doc = "control register 1"] -pub struct CTL1 { - register: ::vcell::VolatileCell, -} +#[doc = "control register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl1](ctl1) module"] +pub type CTL1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL1; +#[doc = "`read()` method returns [ctl1::R](ctl1::R) reader structure"] +impl crate::Readable for CTL1 {} +#[doc = "`write(|w| ..)` method takes [ctl1::W](ctl1::W) writer structure"] +impl crate::Writable for CTL1 {} #[doc = "control register 1"] pub mod ctl1; -#[doc = "slave mode configuration register"] -pub struct SMCFG { - register: ::vcell::VolatileCell, -} +#[doc = "slave mode configuration register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [smcfg](smcfg) module"] +pub type SMCFG = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _SMCFG; +#[doc = "`read()` method returns [smcfg::R](smcfg::R) reader structure"] +impl crate::Readable for SMCFG {} +#[doc = "`write(|w| ..)` method takes [smcfg::W](smcfg::W) writer structure"] +impl crate::Writable for SMCFG {} #[doc = "slave mode configuration register"] pub mod smcfg; -#[doc = "DMA/Interrupt enable register"] -pub struct DMAINTEN { - register: ::vcell::VolatileCell, -} +#[doc = "DMA/Interrupt enable register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dmainten](dmainten) module"] +pub type DMAINTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DMAINTEN; +#[doc = "`read()` method returns [dmainten::R](dmainten::R) reader structure"] +impl crate::Readable for DMAINTEN {} +#[doc = "`write(|w| ..)` method takes [dmainten::W](dmainten::W) writer structure"] +impl crate::Writable for DMAINTEN {} #[doc = "DMA/Interrupt enable register"] pub mod dmainten; -#[doc = "Interrupt flag register"] -pub struct INTF { - register: ::vcell::VolatileCell, -} +#[doc = "Interrupt flag register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [intf](intf) module"] +pub type INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _INTF; +#[doc = "`read()` method returns [intf::R](intf::R) reader structure"] +impl crate::Readable for INTF {} +#[doc = "`write(|w| ..)` method takes [intf::W](intf::W) writer structure"] +impl crate::Writable for INTF {} #[doc = "Interrupt flag register"] pub mod intf; -#[doc = "Software event generation register"] -pub struct SWEVG { - register: ::vcell::VolatileCell, -} +#[doc = "Software event generation register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [swevg](swevg) module"] +pub type SWEVG = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _SWEVG; +#[doc = "`write(|w| ..)` method takes [swevg::W](swevg::W) writer structure"] +impl crate::Writable for SWEVG {} #[doc = "Software event generation register"] pub mod swevg; -#[doc = "Channel control register 0 (output mode)"] -pub struct CHCTL0_OUTPUT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel control register 0 (output mode)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [chctl0_output](chctl0_output) module"] +pub type CHCTL0_OUTPUT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CHCTL0_OUTPUT; +#[doc = "`read()` method returns [chctl0_output::R](chctl0_output::R) reader structure"] +impl crate::Readable for CHCTL0_OUTPUT {} +#[doc = "`write(|w| ..)` method takes [chctl0_output::W](chctl0_output::W) writer structure"] +impl crate::Writable for CHCTL0_OUTPUT {} #[doc = "Channel control register 0 (output mode)"] pub mod chctl0_output; -#[doc = "Channel control register 0 (input mode)"] -pub struct CHCTL0_INPUT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel control register 0 (input mode)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [chctl0_input](chctl0_input) module"] +pub type CHCTL0_INPUT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CHCTL0_INPUT; +#[doc = "`read()` method returns [chctl0_input::R](chctl0_input::R) reader structure"] +impl crate::Readable for CHCTL0_INPUT {} +#[doc = "`write(|w| ..)` method takes [chctl0_input::W](chctl0_input::W) writer structure"] +impl crate::Writable for CHCTL0_INPUT {} #[doc = "Channel control register 0 (input mode)"] pub mod chctl0_input; -#[doc = "Channel control register 1 (output mode)"] -pub struct CHCTL1_OUTPUT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel control register 1 (output mode)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [chctl1_output](chctl1_output) module"] +pub type CHCTL1_OUTPUT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CHCTL1_OUTPUT; +#[doc = "`read()` method returns [chctl1_output::R](chctl1_output::R) reader structure"] +impl crate::Readable for CHCTL1_OUTPUT {} +#[doc = "`write(|w| ..)` method takes [chctl1_output::W](chctl1_output::W) writer structure"] +impl crate::Writable for CHCTL1_OUTPUT {} #[doc = "Channel control register 1 (output mode)"] pub mod chctl1_output; -#[doc = "Channel control register 1 (input mode)"] -pub struct CHCTL1_INPUT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel control register 1 (input mode)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [chctl1_input](chctl1_input) module"] +pub type CHCTL1_INPUT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CHCTL1_INPUT; +#[doc = "`read()` method returns [chctl1_input::R](chctl1_input::R) reader structure"] +impl crate::Readable for CHCTL1_INPUT {} +#[doc = "`write(|w| ..)` method takes [chctl1_input::W](chctl1_input::W) writer structure"] +impl crate::Writable for CHCTL1_INPUT {} #[doc = "Channel control register 1 (input mode)"] pub mod chctl1_input; -#[doc = "Channel control register 2"] -pub struct CHCTL2 { - register: ::vcell::VolatileCell, -} +#[doc = "Channel control register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [chctl2](chctl2) module"] +pub type CHCTL2 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CHCTL2; +#[doc = "`read()` method returns [chctl2::R](chctl2::R) reader structure"] +impl crate::Readable for CHCTL2 {} +#[doc = "`write(|w| ..)` method takes [chctl2::W](chctl2::W) writer structure"] +impl crate::Writable for CHCTL2 {} #[doc = "Channel control register 2"] pub mod chctl2; -#[doc = "counter"] -pub struct CNT { - register: ::vcell::VolatileCell, -} +#[doc = "counter\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cnt](cnt) module"] +pub type CNT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CNT; +#[doc = "`read()` method returns [cnt::R](cnt::R) reader structure"] +impl crate::Readable for CNT {} +#[doc = "`write(|w| ..)` method takes [cnt::W](cnt::W) writer structure"] +impl crate::Writable for CNT {} #[doc = "counter"] pub mod cnt; -#[doc = "prescaler"] -pub struct PSC { - register: ::vcell::VolatileCell, -} +#[doc = "prescaler\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [psc](psc) module"] +pub type PSC = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _PSC; +#[doc = "`read()` method returns [psc::R](psc::R) reader structure"] +impl crate::Readable for PSC {} +#[doc = "`write(|w| ..)` method takes [psc::W](psc::W) writer structure"] +impl crate::Writable for PSC {} #[doc = "prescaler"] pub mod psc; -#[doc = "Counter auto reload register"] -pub struct CAR { - register: ::vcell::VolatileCell, -} +#[doc = "Counter auto reload register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [car](car) module"] +pub type CAR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CAR; +#[doc = "`read()` method returns [car::R](car::R) reader structure"] +impl crate::Readable for CAR {} +#[doc = "`write(|w| ..)` method takes [car::W](car::W) writer structure"] +impl crate::Writable for CAR {} #[doc = "Counter auto reload register"] pub mod car; -#[doc = "Counter repetition register"] -pub struct CREP { - register: ::vcell::VolatileCell, -} +#[doc = "Counter repetition register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [crep](crep) module"] +pub type CREP = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CREP; +#[doc = "`read()` method returns [crep::R](crep::R) reader structure"] +impl crate::Readable for CREP {} +#[doc = "`write(|w| ..)` method takes [crep::W](crep::W) writer structure"] +impl crate::Writable for CREP {} #[doc = "Counter repetition register"] pub mod crep; -#[doc = "Channel 0 capture/compare value register"] -pub struct CH0CV { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 0 capture/compare value register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch0cv](ch0cv) module"] +pub type CH0CV = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH0CV; +#[doc = "`read()` method returns [ch0cv::R](ch0cv::R) reader structure"] +impl crate::Readable for CH0CV {} +#[doc = "`write(|w| ..)` method takes [ch0cv::W](ch0cv::W) writer structure"] +impl crate::Writable for CH0CV {} #[doc = "Channel 0 capture/compare value register"] pub mod ch0cv; -#[doc = "Channel 1 capture/compare value register"] -pub struct CH1CV { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 1 capture/compare value register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch1cv](ch1cv) module"] +pub type CH1CV = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH1CV; +#[doc = "`read()` method returns [ch1cv::R](ch1cv::R) reader structure"] +impl crate::Readable for CH1CV {} +#[doc = "`write(|w| ..)` method takes [ch1cv::W](ch1cv::W) writer structure"] +impl crate::Writable for CH1CV {} #[doc = "Channel 1 capture/compare value register"] pub mod ch1cv; -#[doc = "Channel 2 capture/compare value register"] -pub struct CH2CV { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 2 capture/compare value register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch2cv](ch2cv) module"] +pub type CH2CV = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH2CV; +#[doc = "`read()` method returns [ch2cv::R](ch2cv::R) reader structure"] +impl crate::Readable for CH2CV {} +#[doc = "`write(|w| ..)` method takes [ch2cv::W](ch2cv::W) writer structure"] +impl crate::Writable for CH2CV {} #[doc = "Channel 2 capture/compare value register"] pub mod ch2cv; -#[doc = "Channel 3 capture/compare value register"] -pub struct CH3CV { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 3 capture/compare value register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch3cv](ch3cv) module"] +pub type CH3CV = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH3CV; +#[doc = "`read()` method returns [ch3cv::R](ch3cv::R) reader structure"] +impl crate::Readable for CH3CV {} +#[doc = "`write(|w| ..)` method takes [ch3cv::W](ch3cv::W) writer structure"] +impl crate::Writable for CH3CV {} #[doc = "Channel 3 capture/compare value register"] pub mod ch3cv; -#[doc = "channel complementary protection register"] -pub struct CCHP { - register: ::vcell::VolatileCell, -} +#[doc = "channel complementary protection register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cchp](cchp) module"] +pub type CCHP = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CCHP; +#[doc = "`read()` method returns [cchp::R](cchp::R) reader structure"] +impl crate::Readable for CCHP {} +#[doc = "`write(|w| ..)` method takes [cchp::W](cchp::W) writer structure"] +impl crate::Writable for CCHP {} #[doc = "channel complementary protection register"] pub mod cchp; -#[doc = "DMA configuration register"] -pub struct DMACFG { - register: ::vcell::VolatileCell, -} +#[doc = "DMA configuration register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dmacfg](dmacfg) module"] +pub type DMACFG = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DMACFG; +#[doc = "`read()` method returns [dmacfg::R](dmacfg::R) reader structure"] +impl crate::Readable for DMACFG {} +#[doc = "`write(|w| ..)` method takes [dmacfg::W](dmacfg::W) writer structure"] +impl crate::Writable for DMACFG {} #[doc = "DMA configuration register"] pub mod dmacfg; -#[doc = "DMA transfer buffer register"] -pub struct DMATB { - register: ::vcell::VolatileCell, -} +#[doc = "DMA transfer buffer register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dmatb](dmatb) module"] +pub type DMATB = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DMATB; +#[doc = "`read()` method returns [dmatb::R](dmatb::R) reader structure"] +impl crate::Readable for DMATB {} +#[doc = "`write(|w| ..)` method takes [dmatb::W](dmatb::W) writer structure"] +impl crate::Writable for DMATB {} #[doc = "DMA transfer buffer register"] pub mod dmatb; diff --git a/src/timer0/car.rs b/src/timer0/car.rs index 2580b5a924b037de9a5cb8d9db0a6f0907d62221..c5c62ac0e44c4ee662653893c26b32e3f42fc6d1 100644 --- a/src/timer0/car.rs +++ b/src/timer0/car.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CAR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CARLR { - bits: u16, -} -impl CARLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CARLW<'a> { +#[doc = "Reader of register CAR"] +pub type R = crate::R; +#[doc = "Writer for register CAR"] +pub type W = crate::W; +#[doc = "Register CAR `reset()`'s with value 0"] +impl crate::ResetValue for super::CAR { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CARL`"] +pub type CARL_R = crate::R; +#[doc = "Write proxy for field `CARL`"] +pub struct CARL_W<'a> { w: &'a mut W, } -impl<'a> _CARLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CARL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Counter auto reload value"] - #[inline] - pub fn carl(&self) -> CARLR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - CARLR { bits } + #[inline(always)] + pub fn carl(&self) -> CARL_R { + CARL_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Counter auto reload value"] - #[inline] - pub fn carl(&mut self) -> _CARLW { - _CARLW { w: self } + #[inline(always)] + pub fn carl(&mut self) -> CARL_W { + CARL_W { w: self } } } diff --git a/src/timer0/cchp.rs b/src/timer0/cchp.rs index 32db93c5aaffc4979e232595ec4f85a54fd4861d..3508baa39c0560c98ad23304ba8bb698ab7241dd 100644 --- a/src/timer0/cchp.rs +++ b/src/timer0/cchp.rs @@ -1,500 +1,268 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CCHP { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct POENR { - bits: bool, -} -impl POENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OAENR { - bits: bool, -} -impl OAENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BRKPR { - bits: bool, -} -impl BRKPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BRKENR { - bits: bool, -} -impl BRKENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ROSR { - bits: bool, -} -impl ROSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IOSR { - bits: bool, -} -impl IOSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PROTR { - bits: u8, -} -impl PROTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DTCFGR { - bits: u8, -} -impl DTCFGR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _POENW<'a> { +#[doc = "Reader of register CCHP"] +pub type R = crate::R; +#[doc = "Writer for register CCHP"] +pub type W = crate::W; +#[doc = "Register CCHP `reset()`'s with value 0"] +impl crate::ResetValue for super::CCHP { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `POEN`"] +pub type POEN_R = crate::R; +#[doc = "Write proxy for field `POEN`"] +pub struct POEN_W<'a> { w: &'a mut W, } -impl<'a> _POENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> POEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u16) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _OAENW<'a> { +#[doc = "Reader of field `OAEN`"] +pub type OAEN_R = crate::R; +#[doc = "Write proxy for field `OAEN`"] +pub struct OAEN_W<'a> { w: &'a mut W, } -impl<'a> _OAENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OAEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u16) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _BRKPW<'a> { +#[doc = "Reader of field `BRKP`"] +pub type BRKP_R = crate::R; +#[doc = "Write proxy for field `BRKP`"] +pub struct BRKP_W<'a> { w: &'a mut W, } -impl<'a> _BRKPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BRKP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u16) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _BRKENW<'a> { +#[doc = "Reader of field `BRKEN`"] +pub type BRKEN_R = crate::R; +#[doc = "Write proxy for field `BRKEN`"] +pub struct BRKEN_W<'a> { w: &'a mut W, } -impl<'a> _BRKENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BRKEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u16) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _ROSW<'a> { +#[doc = "Reader of field `ROS`"] +pub type ROS_R = crate::R; +#[doc = "Write proxy for field `ROS`"] +pub struct ROS_W<'a> { w: &'a mut W, } -impl<'a> _ROSW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ROS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u16) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _IOSW<'a> { +#[doc = "Reader of field `IOS`"] +pub type IOS_R = crate::R; +#[doc = "Write proxy for field `IOS`"] +pub struct IOS_W<'a> { w: &'a mut W, } -impl<'a> _IOSW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IOS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u16) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PROTW<'a> { +#[doc = "Reader of field `PROT`"] +pub type PROT_R = crate::R; +#[doc = "Write proxy for field `PROT`"] +pub struct PROT_W<'a> { w: &'a mut W, } -impl<'a> _PROTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PROT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u16) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _DTCFGW<'a> { +#[doc = "Reader of field `DTCFG`"] +pub type DTCFG_R = crate::R; +#[doc = "Write proxy for field `DTCFG`"] +pub struct DTCFG_W<'a> { w: &'a mut W, } -impl<'a> _DTCFGW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DTCFG_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u16) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 15 - Primary output enable"] - #[inline] - pub fn poen(&self) -> POENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - POENR { bits } + #[inline(always)] + pub fn poen(&self) -> POEN_R { + POEN_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 14 - Output automatic enable"] - #[inline] - pub fn oaen(&self) -> OAENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - OAENR { bits } + #[inline(always)] + pub fn oaen(&self) -> OAEN_R { + OAEN_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 13 - Break polarity"] - #[inline] - pub fn brkp(&self) -> BRKPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - BRKPR { bits } + #[inline(always)] + pub fn brkp(&self) -> BRKP_R { + BRKP_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - Break enable"] - #[inline] - pub fn brken(&self) -> BRKENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - BRKENR { bits } + #[inline(always)] + pub fn brken(&self) -> BRKEN_R { + BRKEN_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Run mode off-state configure"] - #[inline] - pub fn ros(&self) -> ROSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ROSR { bits } + #[inline(always)] + pub fn ros(&self) -> ROS_R { + ROS_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Idle mode off-state configure"] - #[inline] - pub fn ios(&self) -> IOSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - IOSR { bits } + #[inline(always)] + pub fn ios(&self) -> IOS_R { + IOS_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bits 8:9 - Complementary register protect control"] - #[inline] - pub fn prot(&self) -> PROTR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - PROTR { bits } + #[inline(always)] + pub fn prot(&self) -> PROT_R { + PROT_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 0:7 - Dead time configure"] - #[inline] - pub fn dtcfg(&self) -> DTCFGR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - DTCFGR { bits } + #[inline(always)] + pub fn dtcfg(&self) -> DTCFG_R { + DTCFG_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 15 - Primary output enable"] - #[inline] - pub fn poen(&mut self) -> _POENW { - _POENW { w: self } + #[inline(always)] + pub fn poen(&mut self) -> POEN_W { + POEN_W { w: self } } #[doc = "Bit 14 - Output automatic enable"] - #[inline] - pub fn oaen(&mut self) -> _OAENW { - _OAENW { w: self } + #[inline(always)] + pub fn oaen(&mut self) -> OAEN_W { + OAEN_W { w: self } } #[doc = "Bit 13 - Break polarity"] - #[inline] - pub fn brkp(&mut self) -> _BRKPW { - _BRKPW { w: self } + #[inline(always)] + pub fn brkp(&mut self) -> BRKP_W { + BRKP_W { w: self } } #[doc = "Bit 12 - Break enable"] - #[inline] - pub fn brken(&mut self) -> _BRKENW { - _BRKENW { w: self } + #[inline(always)] + pub fn brken(&mut self) -> BRKEN_W { + BRKEN_W { w: self } } #[doc = "Bit 11 - Run mode off-state configure"] - #[inline] - pub fn ros(&mut self) -> _ROSW { - _ROSW { w: self } + #[inline(always)] + pub fn ros(&mut self) -> ROS_W { + ROS_W { w: self } } #[doc = "Bit 10 - Idle mode off-state configure"] - #[inline] - pub fn ios(&mut self) -> _IOSW { - _IOSW { w: self } + #[inline(always)] + pub fn ios(&mut self) -> IOS_W { + IOS_W { w: self } } #[doc = "Bits 8:9 - Complementary register protect control"] - #[inline] - pub fn prot(&mut self) -> _PROTW { - _PROTW { w: self } + #[inline(always)] + pub fn prot(&mut self) -> PROT_W { + PROT_W { w: self } } #[doc = "Bits 0:7 - Dead time configure"] - #[inline] - pub fn dtcfg(&mut self) -> _DTCFGW { - _DTCFGW { w: self } + #[inline(always)] + pub fn dtcfg(&mut self) -> DTCFG_W { + DTCFG_W { w: self } } } diff --git a/src/timer0/ch0cv.rs b/src/timer0/ch0cv.rs index 1589a06d49c8e855472ad5208cb1114ad5226741..e49e23bcb3ca5b4e4d2bbe3fc4dd75a5c1c995c5 100644 --- a/src/timer0/ch0cv.rs +++ b/src/timer0/ch0cv.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CH0CV { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH0VALR { - bits: u16, -} -impl CH0VALR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CH0VALW<'a> { +#[doc = "Reader of register CH0CV"] +pub type R = crate::R; +#[doc = "Writer for register CH0CV"] +pub type W = crate::W; +#[doc = "Register CH0CV `reset()`'s with value 0"] +impl crate::ResetValue for super::CH0CV { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH0VAL`"] +pub type CH0VAL_R = crate::R; +#[doc = "Write proxy for field `CH0VAL`"] +pub struct CH0VAL_W<'a> { w: &'a mut W, } -impl<'a> _CH0VALW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH0VAL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Capture or compare value of channel0"] - #[inline] - pub fn ch0val(&self) -> CH0VALR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - CH0VALR { bits } + #[inline(always)] + pub fn ch0val(&self) -> CH0VAL_R { + CH0VAL_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Capture or compare value of channel0"] - #[inline] - pub fn ch0val(&mut self) -> _CH0VALW { - _CH0VALW { w: self } + #[inline(always)] + pub fn ch0val(&mut self) -> CH0VAL_W { + CH0VAL_W { w: self } } } diff --git a/src/timer0/ch1cv.rs b/src/timer0/ch1cv.rs index c2dc69a41f57ee70fdea37e6d74824225990787b..368e83e17176a5261f07f20d89aca82a6b2cc275 100644 --- a/src/timer0/ch1cv.rs +++ b/src/timer0/ch1cv.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CH1CV { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH1VALR { - bits: u16, -} -impl CH1VALR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CH1VALW<'a> { +#[doc = "Reader of register CH1CV"] +pub type R = crate::R; +#[doc = "Writer for register CH1CV"] +pub type W = crate::W; +#[doc = "Register CH1CV `reset()`'s with value 0"] +impl crate::ResetValue for super::CH1CV { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH1VAL`"] +pub type CH1VAL_R = crate::R; +#[doc = "Write proxy for field `CH1VAL`"] +pub struct CH1VAL_W<'a> { w: &'a mut W, } -impl<'a> _CH1VALW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH1VAL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Capture or compare value of channel1"] - #[inline] - pub fn ch1val(&self) -> CH1VALR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - CH1VALR { bits } + #[inline(always)] + pub fn ch1val(&self) -> CH1VAL_R { + CH1VAL_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Capture or compare value of channel1"] - #[inline] - pub fn ch1val(&mut self) -> _CH1VALW { - _CH1VALW { w: self } + #[inline(always)] + pub fn ch1val(&mut self) -> CH1VAL_W { + CH1VAL_W { w: self } } } diff --git a/src/timer0/ch2cv.rs b/src/timer0/ch2cv.rs index 2e2b5624d867dda3d5593b1dfe93e3c37d452126..68c0da50764f1c1dc0c270b6a43f333cb0fdb61a 100644 --- a/src/timer0/ch2cv.rs +++ b/src/timer0/ch2cv.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CH2CV { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH2VALR { - bits: u16, -} -impl CH2VALR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CH2VALW<'a> { +#[doc = "Reader of register CH2CV"] +pub type R = crate::R; +#[doc = "Writer for register CH2CV"] +pub type W = crate::W; +#[doc = "Register CH2CV `reset()`'s with value 0"] +impl crate::ResetValue for super::CH2CV { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH2VAL`"] +pub type CH2VAL_R = crate::R; +#[doc = "Write proxy for field `CH2VAL`"] +pub struct CH2VAL_W<'a> { w: &'a mut W, } -impl<'a> _CH2VALW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH2VAL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Capture or compare value of channel 2"] - #[inline] - pub fn ch2val(&self) -> CH2VALR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - CH2VALR { bits } + #[inline(always)] + pub fn ch2val(&self) -> CH2VAL_R { + CH2VAL_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Capture or compare value of channel 2"] - #[inline] - pub fn ch2val(&mut self) -> _CH2VALW { - _CH2VALW { w: self } + #[inline(always)] + pub fn ch2val(&mut self) -> CH2VAL_W { + CH2VAL_W { w: self } } } diff --git a/src/timer0/ch3cv.rs b/src/timer0/ch3cv.rs index a1e1a0b81ea0ec57a7aa3250ef839d30a7aa3ca5..c5e163017a67314d207b40ebcb587481a4b435d8 100644 --- a/src/timer0/ch3cv.rs +++ b/src/timer0/ch3cv.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CH3CV { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH3VALR { - bits: u16, -} -impl CH3VALR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CH3VALW<'a> { +#[doc = "Reader of register CH3CV"] +pub type R = crate::R; +#[doc = "Writer for register CH3CV"] +pub type W = crate::W; +#[doc = "Register CH3CV `reset()`'s with value 0"] +impl crate::ResetValue for super::CH3CV { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH3VAL`"] +pub type CH3VAL_R = crate::R; +#[doc = "Write proxy for field `CH3VAL`"] +pub struct CH3VAL_W<'a> { w: &'a mut W, } -impl<'a> _CH3VALW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH3VAL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Capture or compare value of channel 3"] - #[inline] - pub fn ch3val(&self) -> CH3VALR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - CH3VALR { bits } + #[inline(always)] + pub fn ch3val(&self) -> CH3VAL_R { + CH3VAL_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Capture or compare value of channel 3"] - #[inline] - pub fn ch3val(&mut self) -> _CH3VALW { - _CH3VALW { w: self } + #[inline(always)] + pub fn ch3val(&mut self) -> CH3VAL_W { + CH3VAL_W { w: self } } } diff --git a/src/timer0/chctl0_input.rs b/src/timer0/chctl0_input.rs index 09e7e377f9d74ecdfc2e99045637232b659170dd..6318b7a84ad6be6f708d5d0e908d9ec94b37ce67 100644 --- a/src/timer0/chctl0_input.rs +++ b/src/timer0/chctl0_input.rs @@ -1,310 +1,160 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CHCTL0_INPUT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH1CAPFLTR { - bits: u8, -} -impl CH1CAPFLTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH1CAPPSCR { - bits: u8, -} -impl CH1CAPPSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH1MSR { - bits: u8, -} -impl CH1MSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH0CAPFLTR { - bits: u8, -} -impl CH0CAPFLTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH0CAPPSCR { - bits: u8, -} -impl CH0CAPPSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH0MSR { - bits: u8, -} -impl CH0MSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CH1CAPFLTW<'a> { +#[doc = "Reader of register CHCTL0_Input"] +pub type R = crate::R; +#[doc = "Writer for register CHCTL0_Input"] +pub type W = crate::W; +#[doc = "Register CHCTL0_Input `reset()`'s with value 0"] +impl crate::ResetValue for super::CHCTL0_INPUT { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH1CAPFLT`"] +pub type CH1CAPFLT_R = crate::R; +#[doc = "Write proxy for field `CH1CAPFLT`"] +pub struct CH1CAPFLT_W<'a> { w: &'a mut W, } -impl<'a> _CH1CAPFLTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH1CAPFLT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 12)) | (((value as u16) & 0x0f) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CH1CAPPSCW<'a> { +#[doc = "Reader of field `CH1CAPPSC`"] +pub type CH1CAPPSC_R = crate::R; +#[doc = "Write proxy for field `CH1CAPPSC`"] +pub struct CH1CAPPSC_W<'a> { w: &'a mut W, } -impl<'a> _CH1CAPPSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH1CAPPSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u16) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _CH1MSW<'a> { +#[doc = "Reader of field `CH1MS`"] +pub type CH1MS_R = crate::R; +#[doc = "Write proxy for field `CH1MS`"] +pub struct CH1MS_W<'a> { w: &'a mut W, } -impl<'a> _CH1MSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH1MS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u16) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _CH0CAPFLTW<'a> { +#[doc = "Reader of field `CH0CAPFLT`"] +pub type CH0CAPFLT_R = crate::R; +#[doc = "Write proxy for field `CH0CAPFLT`"] +pub struct CH0CAPFLT_W<'a> { w: &'a mut W, } -impl<'a> _CH0CAPFLTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH0CAPFLT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 4)) | (((value as u16) & 0x0f) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CH0CAPPSCW<'a> { +#[doc = "Reader of field `CH0CAPPSC`"] +pub type CH0CAPPSC_R = crate::R; +#[doc = "Write proxy for field `CH0CAPPSC`"] +pub struct CH0CAPPSC_W<'a> { w: &'a mut W, } -impl<'a> _CH0CAPPSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH0CAPPSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 2)) | (((value as u16) & 0x03) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CH0MSW<'a> { +#[doc = "Reader of field `CH0MS`"] +pub type CH0MS_R = crate::R; +#[doc = "Write proxy for field `CH0MS`"] +pub struct CH0MS_W<'a> { w: &'a mut W, } -impl<'a> _CH0MSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH0MS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x03) | ((value as u16) & 0x03); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 12:15 - Channel 1 input capture filter control"] - #[inline] - pub fn ch1capflt(&self) -> CH1CAPFLTR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH1CAPFLTR { bits } + #[inline(always)] + pub fn ch1capflt(&self) -> CH1CAPFLT_R { + CH1CAPFLT_R::new(((self.bits >> 12) & 0x0f) as u8) } #[doc = "Bits 10:11 - Channel 1 input capture prescaler"] - #[inline] - pub fn ch1cappsc(&self) -> CH1CAPPSCR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH1CAPPSCR { bits } + #[inline(always)] + pub fn ch1cappsc(&self) -> CH1CAPPSC_R { + CH1CAPPSC_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 8:9 - Channel 1 mode selection"] - #[inline] - pub fn ch1ms(&self) -> CH1MSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH1MSR { bits } + #[inline(always)] + pub fn ch1ms(&self) -> CH1MS_R { + CH1MS_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 4:7 - Channel 0 input capture filter control"] - #[inline] - pub fn ch0capflt(&self) -> CH0CAPFLTR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH0CAPFLTR { bits } + #[inline(always)] + pub fn ch0capflt(&self) -> CH0CAPFLT_R { + CH0CAPFLT_R::new(((self.bits >> 4) & 0x0f) as u8) } #[doc = "Bits 2:3 - Channel 0 input capture prescaler"] - #[inline] - pub fn ch0cappsc(&self) -> CH0CAPPSCR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH0CAPPSCR { bits } + #[inline(always)] + pub fn ch0cappsc(&self) -> CH0CAPPSC_R { + CH0CAPPSC_R::new(((self.bits >> 2) & 0x03) as u8) } #[doc = "Bits 0:1 - Channel 0 mode selection"] - #[inline] - pub fn ch0ms(&self) -> CH0MSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH0MSR { bits } + #[inline(always)] + pub fn ch0ms(&self) -> CH0MS_R { + CH0MS_R::new((self.bits & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 12:15 - Channel 1 input capture filter control"] - #[inline] - pub fn ch1capflt(&mut self) -> _CH1CAPFLTW { - _CH1CAPFLTW { w: self } + #[inline(always)] + pub fn ch1capflt(&mut self) -> CH1CAPFLT_W { + CH1CAPFLT_W { w: self } } #[doc = "Bits 10:11 - Channel 1 input capture prescaler"] - #[inline] - pub fn ch1cappsc(&mut self) -> _CH1CAPPSCW { - _CH1CAPPSCW { w: self } + #[inline(always)] + pub fn ch1cappsc(&mut self) -> CH1CAPPSC_W { + CH1CAPPSC_W { w: self } } #[doc = "Bits 8:9 - Channel 1 mode selection"] - #[inline] - pub fn ch1ms(&mut self) -> _CH1MSW { - _CH1MSW { w: self } + #[inline(always)] + pub fn ch1ms(&mut self) -> CH1MS_W { + CH1MS_W { w: self } } #[doc = "Bits 4:7 - Channel 0 input capture filter control"] - #[inline] - pub fn ch0capflt(&mut self) -> _CH0CAPFLTW { - _CH0CAPFLTW { w: self } + #[inline(always)] + pub fn ch0capflt(&mut self) -> CH0CAPFLT_W { + CH0CAPFLT_W { w: self } } #[doc = "Bits 2:3 - Channel 0 input capture prescaler"] - #[inline] - pub fn ch0cappsc(&mut self) -> _CH0CAPPSCW { - _CH0CAPPSCW { w: self } + #[inline(always)] + pub fn ch0cappsc(&mut self) -> CH0CAPPSC_W { + CH0CAPPSC_W { w: self } } #[doc = "Bits 0:1 - Channel 0 mode selection"] - #[inline] - pub fn ch0ms(&mut self) -> _CH0MSW { - _CH0MSW { w: self } + #[inline(always)] + pub fn ch0ms(&mut self) -> CH0MS_W { + CH0MS_W { w: self } } } diff --git a/src/timer0/chctl0_output.rs b/src/timer0/chctl0_output.rs index 26862fdc75e5096b63d8ecf091403b5306abf632..a610b1ef678638af991b06ca6db8057164b1ae3d 100644 --- a/src/timer0/chctl0_output.rs +++ b/src/timer0/chctl0_output.rs @@ -1,582 +1,316 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CHCTL0_OUTPUT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH1COMCENR { - bits: bool, -} -impl CH1COMCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1COMCTLR { - bits: u8, -} -impl CH1COMCTLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH1COMSENR { - bits: bool, -} -impl CH1COMSENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1COMFENR { - bits: bool, -} -impl CH1COMFENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1MSR { - bits: u8, -} -impl CH1MSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH0COMCENR { - bits: bool, -} -impl CH0COMCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0COMCTLR { - bits: u8, -} -impl CH0COMCTLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH0COMSENR { - bits: bool, -} -impl CH0COMSENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0COMFENR { - bits: bool, -} -impl CH0COMFENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0MSR { - bits: u8, -} -impl CH0MSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CH1COMCENW<'a> { +#[doc = "Reader of register CHCTL0_Output"] +pub type R = crate::R; +#[doc = "Writer for register CHCTL0_Output"] +pub type W = crate::W; +#[doc = "Register CHCTL0_Output `reset()`'s with value 0"] +impl crate::ResetValue for super::CHCTL0_OUTPUT { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH1COMCEN`"] +pub type CH1COMCEN_R = crate::R; +#[doc = "Write proxy for field `CH1COMCEN`"] +pub struct CH1COMCEN_W<'a> { w: &'a mut W, } -impl<'a> _CH1COMCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1COMCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u16) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _CH1COMCTLW<'a> { +#[doc = "Reader of field `CH1COMCTL`"] +pub type CH1COMCTL_R = crate::R; +#[doc = "Write proxy for field `CH1COMCTL`"] +pub struct CH1COMCTL_W<'a> { w: &'a mut W, } -impl<'a> _CH1COMCTLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH1COMCTL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 12)) | (((value as u16) & 0x07) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CH1COMSENW<'a> { +#[doc = "Reader of field `CH1COMSEN`"] +pub type CH1COMSEN_R = crate::R; +#[doc = "Write proxy for field `CH1COMSEN`"] +pub struct CH1COMSEN_W<'a> { w: &'a mut W, } -impl<'a> _CH1COMSENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1COMSEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u16) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _CH1COMFENW<'a> { +#[doc = "Reader of field `CH1COMFEN`"] +pub type CH1COMFEN_R = crate::R; +#[doc = "Write proxy for field `CH1COMFEN`"] +pub struct CH1COMFEN_W<'a> { w: &'a mut W, } -impl<'a> _CH1COMFENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1COMFEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u16) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _CH1MSW<'a> { +#[doc = "Reader of field `CH1MS`"] +pub type CH1MS_R = crate::R; +#[doc = "Write proxy for field `CH1MS`"] +pub struct CH1MS_W<'a> { w: &'a mut W, } -impl<'a> _CH1MSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH1MS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u16) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _CH0COMCENW<'a> { +#[doc = "Reader of field `CH0COMCEN`"] +pub type CH0COMCEN_R = crate::R; +#[doc = "Write proxy for field `CH0COMCEN`"] +pub struct CH0COMCEN_W<'a> { w: &'a mut W, } -impl<'a> _CH0COMCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0COMCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _CH0COMCTLW<'a> { +#[doc = "Reader of field `CH0COMCTL`"] +pub type CH0COMCTL_R = crate::R; +#[doc = "Write proxy for field `CH0COMCTL`"] +pub struct CH0COMCTL_W<'a> { w: &'a mut W, } -impl<'a> _CH0COMCTLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH0COMCTL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 4)) | (((value as u16) & 0x07) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CH0COMSENW<'a> { +#[doc = "Reader of field `CH0COMSEN`"] +pub type CH0COMSEN_R = crate::R; +#[doc = "Write proxy for field `CH0COMSEN`"] +pub struct CH0COMSEN_W<'a> { w: &'a mut W, } -impl<'a> _CH0COMSENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0COMSEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _CH0COMFENW<'a> { +#[doc = "Reader of field `CH0COMFEN`"] +pub type CH0COMFEN_R = crate::R; +#[doc = "Write proxy for field `CH0COMFEN`"] +pub struct CH0COMFEN_W<'a> { w: &'a mut W, } -impl<'a> _CH0COMFENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0COMFEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CH0MSW<'a> { +#[doc = "Reader of field `CH0MS`"] +pub type CH0MS_R = crate::R; +#[doc = "Write proxy for field `CH0MS`"] +pub struct CH0MS_W<'a> { w: &'a mut W, } -impl<'a> _CH0MSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH0MS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x03) | ((value as u16) & 0x03); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 15 - Channel 1 output compare clear enable"] - #[inline] - pub fn ch1comcen(&self) -> CH1COMCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1COMCENR { bits } + #[inline(always)] + pub fn ch1comcen(&self) -> CH1COMCEN_R { + CH1COMCEN_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bits 12:14 - Channel 1 compare output control"] - #[inline] - pub fn ch1comctl(&self) -> CH1COMCTLR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH1COMCTLR { bits } + #[inline(always)] + pub fn ch1comctl(&self) -> CH1COMCTL_R { + CH1COMCTL_R::new(((self.bits >> 12) & 0x07) as u8) } #[doc = "Bit 11 - Channel 1 output compare shadow enable"] - #[inline] - pub fn ch1comsen(&self) -> CH1COMSENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1COMSENR { bits } + #[inline(always)] + pub fn ch1comsen(&self) -> CH1COMSEN_R { + CH1COMSEN_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Channel 1 output compare fast enable"] - #[inline] - pub fn ch1comfen(&self) -> CH1COMFENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1COMFENR { bits } + #[inline(always)] + pub fn ch1comfen(&self) -> CH1COMFEN_R { + CH1COMFEN_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bits 8:9 - Channel 1 mode selection"] - #[inline] - pub fn ch1ms(&self) -> CH1MSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH1MSR { bits } + #[inline(always)] + pub fn ch1ms(&self) -> CH1MS_R { + CH1MS_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bit 7 - Channel 0 output compare clear enable"] - #[inline] - pub fn ch0comcen(&self) -> CH0COMCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0COMCENR { bits } + #[inline(always)] + pub fn ch0comcen(&self) -> CH0COMCEN_R { + CH0COMCEN_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 4:6 - Channel 0 compare output control"] - #[inline] - pub fn ch0comctl(&self) -> CH0COMCTLR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH0COMCTLR { bits } + #[inline(always)] + pub fn ch0comctl(&self) -> CH0COMCTL_R { + CH0COMCTL_R::new(((self.bits >> 4) & 0x07) as u8) } #[doc = "Bit 3 - Channel 0 compare output shadow enable"] - #[inline] - pub fn ch0comsen(&self) -> CH0COMSENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0COMSENR { bits } + #[inline(always)] + pub fn ch0comsen(&self) -> CH0COMSEN_R { + CH0COMSEN_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Channel 0 output compare fast enable"] - #[inline] - pub fn ch0comfen(&self) -> CH0COMFENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0COMFENR { bits } + #[inline(always)] + pub fn ch0comfen(&self) -> CH0COMFEN_R { + CH0COMFEN_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bits 0:1 - Channel 0 I/O mode selection"] - #[inline] - pub fn ch0ms(&self) -> CH0MSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH0MSR { bits } + #[inline(always)] + pub fn ch0ms(&self) -> CH0MS_R { + CH0MS_R::new((self.bits & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 15 - Channel 1 output compare clear enable"] - #[inline] - pub fn ch1comcen(&mut self) -> _CH1COMCENW { - _CH1COMCENW { w: self } + #[inline(always)] + pub fn ch1comcen(&mut self) -> CH1COMCEN_W { + CH1COMCEN_W { w: self } } #[doc = "Bits 12:14 - Channel 1 compare output control"] - #[inline] - pub fn ch1comctl(&mut self) -> _CH1COMCTLW { - _CH1COMCTLW { w: self } + #[inline(always)] + pub fn ch1comctl(&mut self) -> CH1COMCTL_W { + CH1COMCTL_W { w: self } } #[doc = "Bit 11 - Channel 1 output compare shadow enable"] - #[inline] - pub fn ch1comsen(&mut self) -> _CH1COMSENW { - _CH1COMSENW { w: self } + #[inline(always)] + pub fn ch1comsen(&mut self) -> CH1COMSEN_W { + CH1COMSEN_W { w: self } } #[doc = "Bit 10 - Channel 1 output compare fast enable"] - #[inline] - pub fn ch1comfen(&mut self) -> _CH1COMFENW { - _CH1COMFENW { w: self } + #[inline(always)] + pub fn ch1comfen(&mut self) -> CH1COMFEN_W { + CH1COMFEN_W { w: self } } #[doc = "Bits 8:9 - Channel 1 mode selection"] - #[inline] - pub fn ch1ms(&mut self) -> _CH1MSW { - _CH1MSW { w: self } + #[inline(always)] + pub fn ch1ms(&mut self) -> CH1MS_W { + CH1MS_W { w: self } } #[doc = "Bit 7 - Channel 0 output compare clear enable"] - #[inline] - pub fn ch0comcen(&mut self) -> _CH0COMCENW { - _CH0COMCENW { w: self } + #[inline(always)] + pub fn ch0comcen(&mut self) -> CH0COMCEN_W { + CH0COMCEN_W { w: self } } #[doc = "Bits 4:6 - Channel 0 compare output control"] - #[inline] - pub fn ch0comctl(&mut self) -> _CH0COMCTLW { - _CH0COMCTLW { w: self } + #[inline(always)] + pub fn ch0comctl(&mut self) -> CH0COMCTL_W { + CH0COMCTL_W { w: self } } #[doc = "Bit 3 - Channel 0 compare output shadow enable"] - #[inline] - pub fn ch0comsen(&mut self) -> _CH0COMSENW { - _CH0COMSENW { w: self } + #[inline(always)] + pub fn ch0comsen(&mut self) -> CH0COMSEN_W { + CH0COMSEN_W { w: self } } #[doc = "Bit 2 - Channel 0 output compare fast enable"] - #[inline] - pub fn ch0comfen(&mut self) -> _CH0COMFENW { - _CH0COMFENW { w: self } + #[inline(always)] + pub fn ch0comfen(&mut self) -> CH0COMFEN_W { + CH0COMFEN_W { w: self } } #[doc = "Bits 0:1 - Channel 0 I/O mode selection"] - #[inline] - pub fn ch0ms(&mut self) -> _CH0MSW { - _CH0MSW { w: self } + #[inline(always)] + pub fn ch0ms(&mut self) -> CH0MS_W { + CH0MS_W { w: self } } } diff --git a/src/timer0/chctl1_input.rs b/src/timer0/chctl1_input.rs index 8485d2f9f9d4315f6d2d541ef2ab36e37fba2bce..22f1cd1538c2a19dc7117749aee6fc11a8512ecf 100644 --- a/src/timer0/chctl1_input.rs +++ b/src/timer0/chctl1_input.rs @@ -1,310 +1,160 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CHCTL1_INPUT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH3CAPFLTR { - bits: u8, -} -impl CH3CAPFLTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH3CAPPSCR { - bits: u8, -} -impl CH3CAPPSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH3MSR { - bits: u8, -} -impl CH3MSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH2CAPFLTR { - bits: u8, -} -impl CH2CAPFLTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH2CAPPSCR { - bits: u8, -} -impl CH2CAPPSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH2MSR { - bits: u8, -} -impl CH2MSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CH3CAPFLTW<'a> { +#[doc = "Reader of register CHCTL1_Input"] +pub type R = crate::R; +#[doc = "Writer for register CHCTL1_Input"] +pub type W = crate::W; +#[doc = "Register CHCTL1_Input `reset()`'s with value 0"] +impl crate::ResetValue for super::CHCTL1_INPUT { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH3CAPFLT`"] +pub type CH3CAPFLT_R = crate::R; +#[doc = "Write proxy for field `CH3CAPFLT`"] +pub struct CH3CAPFLT_W<'a> { w: &'a mut W, } -impl<'a> _CH3CAPFLTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH3CAPFLT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 12)) | (((value as u16) & 0x0f) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CH3CAPPSCW<'a> { +#[doc = "Reader of field `CH3CAPPSC`"] +pub type CH3CAPPSC_R = crate::R; +#[doc = "Write proxy for field `CH3CAPPSC`"] +pub struct CH3CAPPSC_W<'a> { w: &'a mut W, } -impl<'a> _CH3CAPPSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH3CAPPSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u16) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _CH3MSW<'a> { +#[doc = "Reader of field `CH3MS`"] +pub type CH3MS_R = crate::R; +#[doc = "Write proxy for field `CH3MS`"] +pub struct CH3MS_W<'a> { w: &'a mut W, } -impl<'a> _CH3MSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH3MS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u16) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _CH2CAPFLTW<'a> { +#[doc = "Reader of field `CH2CAPFLT`"] +pub type CH2CAPFLT_R = crate::R; +#[doc = "Write proxy for field `CH2CAPFLT`"] +pub struct CH2CAPFLT_W<'a> { w: &'a mut W, } -impl<'a> _CH2CAPFLTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH2CAPFLT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 4)) | (((value as u16) & 0x0f) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CH2CAPPSCW<'a> { +#[doc = "Reader of field `CH2CAPPSC`"] +pub type CH2CAPPSC_R = crate::R; +#[doc = "Write proxy for field `CH2CAPPSC`"] +pub struct CH2CAPPSC_W<'a> { w: &'a mut W, } -impl<'a> _CH2CAPPSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH2CAPPSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 2)) | (((value as u16) & 0x03) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CH2MSW<'a> { +#[doc = "Reader of field `CH2MS`"] +pub type CH2MS_R = crate::R; +#[doc = "Write proxy for field `CH2MS`"] +pub struct CH2MS_W<'a> { w: &'a mut W, } -impl<'a> _CH2MSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH2MS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x03) | ((value as u16) & 0x03); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 12:15 - Channel 3 input capture filter control"] - #[inline] - pub fn ch3capflt(&self) -> CH3CAPFLTR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH3CAPFLTR { bits } + #[inline(always)] + pub fn ch3capflt(&self) -> CH3CAPFLT_R { + CH3CAPFLT_R::new(((self.bits >> 12) & 0x0f) as u8) } #[doc = "Bits 10:11 - Channel 3 input capture prescaler"] - #[inline] - pub fn ch3cappsc(&self) -> CH3CAPPSCR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH3CAPPSCR { bits } + #[inline(always)] + pub fn ch3cappsc(&self) -> CH3CAPPSC_R { + CH3CAPPSC_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 8:9 - Channel 3 mode selection"] - #[inline] - pub fn ch3ms(&self) -> CH3MSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH3MSR { bits } + #[inline(always)] + pub fn ch3ms(&self) -> CH3MS_R { + CH3MS_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 4:7 - Channel 2 input capture filter control"] - #[inline] - pub fn ch2capflt(&self) -> CH2CAPFLTR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH2CAPFLTR { bits } + #[inline(always)] + pub fn ch2capflt(&self) -> CH2CAPFLT_R { + CH2CAPFLT_R::new(((self.bits >> 4) & 0x0f) as u8) } #[doc = "Bits 2:3 - Channel 2 input capture prescaler"] - #[inline] - pub fn ch2cappsc(&self) -> CH2CAPPSCR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH2CAPPSCR { bits } + #[inline(always)] + pub fn ch2cappsc(&self) -> CH2CAPPSC_R { + CH2CAPPSC_R::new(((self.bits >> 2) & 0x03) as u8) } #[doc = "Bits 0:1 - Channel 2 mode selection"] - #[inline] - pub fn ch2ms(&self) -> CH2MSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH2MSR { bits } + #[inline(always)] + pub fn ch2ms(&self) -> CH2MS_R { + CH2MS_R::new((self.bits & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 12:15 - Channel 3 input capture filter control"] - #[inline] - pub fn ch3capflt(&mut self) -> _CH3CAPFLTW { - _CH3CAPFLTW { w: self } + #[inline(always)] + pub fn ch3capflt(&mut self) -> CH3CAPFLT_W { + CH3CAPFLT_W { w: self } } #[doc = "Bits 10:11 - Channel 3 input capture prescaler"] - #[inline] - pub fn ch3cappsc(&mut self) -> _CH3CAPPSCW { - _CH3CAPPSCW { w: self } + #[inline(always)] + pub fn ch3cappsc(&mut self) -> CH3CAPPSC_W { + CH3CAPPSC_W { w: self } } #[doc = "Bits 8:9 - Channel 3 mode selection"] - #[inline] - pub fn ch3ms(&mut self) -> _CH3MSW { - _CH3MSW { w: self } + #[inline(always)] + pub fn ch3ms(&mut self) -> CH3MS_W { + CH3MS_W { w: self } } #[doc = "Bits 4:7 - Channel 2 input capture filter control"] - #[inline] - pub fn ch2capflt(&mut self) -> _CH2CAPFLTW { - _CH2CAPFLTW { w: self } + #[inline(always)] + pub fn ch2capflt(&mut self) -> CH2CAPFLT_W { + CH2CAPFLT_W { w: self } } #[doc = "Bits 2:3 - Channel 2 input capture prescaler"] - #[inline] - pub fn ch2cappsc(&mut self) -> _CH2CAPPSCW { - _CH2CAPPSCW { w: self } + #[inline(always)] + pub fn ch2cappsc(&mut self) -> CH2CAPPSC_W { + CH2CAPPSC_W { w: self } } #[doc = "Bits 0:1 - Channel 2 mode selection"] - #[inline] - pub fn ch2ms(&mut self) -> _CH2MSW { - _CH2MSW { w: self } + #[inline(always)] + pub fn ch2ms(&mut self) -> CH2MS_W { + CH2MS_W { w: self } } } diff --git a/src/timer0/chctl1_output.rs b/src/timer0/chctl1_output.rs index 877629add0a404f5cce96b360d40b7c5c81699d6..41f9501b24cce209a2dc053dcd0d29de4b20b0ba 100644 --- a/src/timer0/chctl1_output.rs +++ b/src/timer0/chctl1_output.rs @@ -1,582 +1,316 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CHCTL1_OUTPUT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH3COMCENR { - bits: bool, -} -impl CH3COMCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH3COMCTLR { - bits: u8, -} -impl CH3COMCTLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH3COMSENR { - bits: bool, -} -impl CH3COMSENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH3COMFENR { - bits: bool, -} -impl CH3COMFENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH3MSR { - bits: u8, -} -impl CH3MSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH2COMCENR { - bits: bool, -} -impl CH2COMCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2COMCTLR { - bits: u8, -} -impl CH2COMCTLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH2COMSENR { - bits: bool, -} -impl CH2COMSENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2COMFENR { - bits: bool, -} -impl CH2COMFENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2MSR { - bits: u8, -} -impl CH2MSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CH3COMCENW<'a> { +#[doc = "Reader of register CHCTL1_Output"] +pub type R = crate::R; +#[doc = "Writer for register CHCTL1_Output"] +pub type W = crate::W; +#[doc = "Register CHCTL1_Output `reset()`'s with value 0"] +impl crate::ResetValue for super::CHCTL1_OUTPUT { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH3COMCEN`"] +pub type CH3COMCEN_R = crate::R; +#[doc = "Write proxy for field `CH3COMCEN`"] +pub struct CH3COMCEN_W<'a> { w: &'a mut W, } -impl<'a> _CH3COMCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3COMCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u16) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _CH3COMCTLW<'a> { +#[doc = "Reader of field `CH3COMCTL`"] +pub type CH3COMCTL_R = crate::R; +#[doc = "Write proxy for field `CH3COMCTL`"] +pub struct CH3COMCTL_W<'a> { w: &'a mut W, } -impl<'a> _CH3COMCTLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH3COMCTL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 12)) | (((value as u16) & 0x07) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CH3COMSENW<'a> { +#[doc = "Reader of field `CH3COMSEN`"] +pub type CH3COMSEN_R = crate::R; +#[doc = "Write proxy for field `CH3COMSEN`"] +pub struct CH3COMSEN_W<'a> { w: &'a mut W, } -impl<'a> _CH3COMSENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3COMSEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u16) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _CH3COMFENW<'a> { +#[doc = "Reader of field `CH3COMFEN`"] +pub type CH3COMFEN_R = crate::R; +#[doc = "Write proxy for field `CH3COMFEN`"] +pub struct CH3COMFEN_W<'a> { w: &'a mut W, } -impl<'a> _CH3COMFENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3COMFEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u16) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _CH3MSW<'a> { +#[doc = "Reader of field `CH3MS`"] +pub type CH3MS_R = crate::R; +#[doc = "Write proxy for field `CH3MS`"] +pub struct CH3MS_W<'a> { w: &'a mut W, } -impl<'a> _CH3MSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH3MS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u16) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _CH2COMCENW<'a> { +#[doc = "Reader of field `CH2COMCEN`"] +pub type CH2COMCEN_R = crate::R; +#[doc = "Write proxy for field `CH2COMCEN`"] +pub struct CH2COMCEN_W<'a> { w: &'a mut W, } -impl<'a> _CH2COMCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2COMCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _CH2COMCTLW<'a> { +#[doc = "Reader of field `CH2COMCTL`"] +pub type CH2COMCTL_R = crate::R; +#[doc = "Write proxy for field `CH2COMCTL`"] +pub struct CH2COMCTL_W<'a> { w: &'a mut W, } -impl<'a> _CH2COMCTLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH2COMCTL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 4)) | (((value as u16) & 0x07) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CH2COMSENW<'a> { +#[doc = "Reader of field `CH2COMSEN`"] +pub type CH2COMSEN_R = crate::R; +#[doc = "Write proxy for field `CH2COMSEN`"] +pub struct CH2COMSEN_W<'a> { w: &'a mut W, } -impl<'a> _CH2COMSENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2COMSEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _CH2COMFENW<'a> { +#[doc = "Reader of field `CH2COMFEN`"] +pub type CH2COMFEN_R = crate::R; +#[doc = "Write proxy for field `CH2COMFEN`"] +pub struct CH2COMFEN_W<'a> { w: &'a mut W, } -impl<'a> _CH2COMFENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2COMFEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CH2MSW<'a> { +#[doc = "Reader of field `CH2MS`"] +pub type CH2MS_R = crate::R; +#[doc = "Write proxy for field `CH2MS`"] +pub struct CH2MS_W<'a> { w: &'a mut W, } -impl<'a> _CH2MSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH2MS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x03) | ((value as u16) & 0x03); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 15 - Channel 3 output compare clear enable"] - #[inline] - pub fn ch3comcen(&self) -> CH3COMCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3COMCENR { bits } + #[inline(always)] + pub fn ch3comcen(&self) -> CH3COMCEN_R { + CH3COMCEN_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bits 12:14 - Channel 3 compare output control"] - #[inline] - pub fn ch3comctl(&self) -> CH3COMCTLR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH3COMCTLR { bits } + #[inline(always)] + pub fn ch3comctl(&self) -> CH3COMCTL_R { + CH3COMCTL_R::new(((self.bits >> 12) & 0x07) as u8) } #[doc = "Bit 11 - Channel 3 output compare shadow enable"] - #[inline] - pub fn ch3comsen(&self) -> CH3COMSENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3COMSENR { bits } + #[inline(always)] + pub fn ch3comsen(&self) -> CH3COMSEN_R { + CH3COMSEN_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Channel 3 output compare fast enable"] - #[inline] - pub fn ch3comfen(&self) -> CH3COMFENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3COMFENR { bits } + #[inline(always)] + pub fn ch3comfen(&self) -> CH3COMFEN_R { + CH3COMFEN_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bits 8:9 - Channel 3 mode selection"] - #[inline] - pub fn ch3ms(&self) -> CH3MSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH3MSR { bits } + #[inline(always)] + pub fn ch3ms(&self) -> CH3MS_R { + CH3MS_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bit 7 - Channel 2 output compare clear enable"] - #[inline] - pub fn ch2comcen(&self) -> CH2COMCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2COMCENR { bits } + #[inline(always)] + pub fn ch2comcen(&self) -> CH2COMCEN_R { + CH2COMCEN_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 4:6 - Channel 2 compare output control"] - #[inline] - pub fn ch2comctl(&self) -> CH2COMCTLR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH2COMCTLR { bits } + #[inline(always)] + pub fn ch2comctl(&self) -> CH2COMCTL_R { + CH2COMCTL_R::new(((self.bits >> 4) & 0x07) as u8) } #[doc = "Bit 3 - Channel 2 compare output shadow enable"] - #[inline] - pub fn ch2comsen(&self) -> CH2COMSENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2COMSENR { bits } + #[inline(always)] + pub fn ch2comsen(&self) -> CH2COMSEN_R { + CH2COMSEN_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Channel 2 output compare fast enable"] - #[inline] - pub fn ch2comfen(&self) -> CH2COMFENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2COMFENR { bits } + #[inline(always)] + pub fn ch2comfen(&self) -> CH2COMFEN_R { + CH2COMFEN_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bits 0:1 - Channel 2 I/O mode selection"] - #[inline] - pub fn ch2ms(&self) -> CH2MSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH2MSR { bits } + #[inline(always)] + pub fn ch2ms(&self) -> CH2MS_R { + CH2MS_R::new((self.bits & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 15 - Channel 3 output compare clear enable"] - #[inline] - pub fn ch3comcen(&mut self) -> _CH3COMCENW { - _CH3COMCENW { w: self } + #[inline(always)] + pub fn ch3comcen(&mut self) -> CH3COMCEN_W { + CH3COMCEN_W { w: self } } #[doc = "Bits 12:14 - Channel 3 compare output control"] - #[inline] - pub fn ch3comctl(&mut self) -> _CH3COMCTLW { - _CH3COMCTLW { w: self } + #[inline(always)] + pub fn ch3comctl(&mut self) -> CH3COMCTL_W { + CH3COMCTL_W { w: self } } #[doc = "Bit 11 - Channel 3 output compare shadow enable"] - #[inline] - pub fn ch3comsen(&mut self) -> _CH3COMSENW { - _CH3COMSENW { w: self } + #[inline(always)] + pub fn ch3comsen(&mut self) -> CH3COMSEN_W { + CH3COMSEN_W { w: self } } #[doc = "Bit 10 - Channel 3 output compare fast enable"] - #[inline] - pub fn ch3comfen(&mut self) -> _CH3COMFENW { - _CH3COMFENW { w: self } + #[inline(always)] + pub fn ch3comfen(&mut self) -> CH3COMFEN_W { + CH3COMFEN_W { w: self } } #[doc = "Bits 8:9 - Channel 3 mode selection"] - #[inline] - pub fn ch3ms(&mut self) -> _CH3MSW { - _CH3MSW { w: self } + #[inline(always)] + pub fn ch3ms(&mut self) -> CH3MS_W { + CH3MS_W { w: self } } #[doc = "Bit 7 - Channel 2 output compare clear enable"] - #[inline] - pub fn ch2comcen(&mut self) -> _CH2COMCENW { - _CH2COMCENW { w: self } + #[inline(always)] + pub fn ch2comcen(&mut self) -> CH2COMCEN_W { + CH2COMCEN_W { w: self } } #[doc = "Bits 4:6 - Channel 2 compare output control"] - #[inline] - pub fn ch2comctl(&mut self) -> _CH2COMCTLW { - _CH2COMCTLW { w: self } + #[inline(always)] + pub fn ch2comctl(&mut self) -> CH2COMCTL_W { + CH2COMCTL_W { w: self } } #[doc = "Bit 3 - Channel 2 compare output shadow enable"] - #[inline] - pub fn ch2comsen(&mut self) -> _CH2COMSENW { - _CH2COMSENW { w: self } + #[inline(always)] + pub fn ch2comsen(&mut self) -> CH2COMSEN_W { + CH2COMSEN_W { w: self } } #[doc = "Bit 2 - Channel 2 output compare fast enable"] - #[inline] - pub fn ch2comfen(&mut self) -> _CH2COMFENW { - _CH2COMFENW { w: self } + #[inline(always)] + pub fn ch2comfen(&mut self) -> CH2COMFEN_W { + CH2COMFEN_W { w: self } } #[doc = "Bits 0:1 - Channel 2 I/O mode selection"] - #[inline] - pub fn ch2ms(&mut self) -> _CH2MSW { - _CH2MSW { w: self } + #[inline(always)] + pub fn ch2ms(&mut self) -> CH2MS_W { + CH2MS_W { w: self } } } diff --git a/src/timer0/chctl2.rs b/src/timer0/chctl2.rs index 512e963c2e439a6877cd288cca5942dc756f68b1..2b1a2059e4170fd94653cbc3b1cea47dde371f6f 100644 --- a/src/timer0/chctl2.rs +++ b/src/timer0/chctl2.rs @@ -1,890 +1,492 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CHCTL2 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH3PR { - bits: bool, -} -impl CH3PR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH3ENR { - bits: bool, -} -impl CH3ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2NPR { - bits: bool, -} -impl CH2NPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2NENR { - bits: bool, -} -impl CH2NENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2PR { - bits: bool, -} -impl CH2PR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2ENR { - bits: bool, -} -impl CH2ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1NPR { - bits: bool, -} -impl CH1NPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1NENR { - bits: bool, -} -impl CH1NENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1PR { - bits: bool, -} -impl CH1PR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1ENR { - bits: bool, -} -impl CH1ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0NPR { - bits: bool, -} -impl CH0NPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0NENR { - bits: bool, -} -impl CH0NENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0PR { - bits: bool, -} -impl CH0PR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0ENR { - bits: bool, -} -impl CH0ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CH3PW<'a> { +#[doc = "Reader of register CHCTL2"] +pub type R = crate::R; +#[doc = "Writer for register CHCTL2"] +pub type W = crate::W; +#[doc = "Register CHCTL2 `reset()`'s with value 0"] +impl crate::ResetValue for super::CHCTL2 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH3P`"] +pub type CH3P_R = crate::R; +#[doc = "Write proxy for field `CH3P`"] +pub struct CH3P_W<'a> { w: &'a mut W, } -impl<'a> _CH3PW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3P_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u16) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _CH3ENW<'a> { +#[doc = "Reader of field `CH3EN`"] +pub type CH3EN_R = crate::R; +#[doc = "Write proxy for field `CH3EN`"] +pub struct CH3EN_W<'a> { w: &'a mut W, } -impl<'a> _CH3ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u16) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CH2NPW<'a> { +#[doc = "Reader of field `CH2NP`"] +pub type CH2NP_R = crate::R; +#[doc = "Write proxy for field `CH2NP`"] +pub struct CH2NP_W<'a> { w: &'a mut W, } -impl<'a> _CH2NPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2NP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u16) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _CH2NENW<'a> { +#[doc = "Reader of field `CH2NEN`"] +pub type CH2NEN_R = crate::R; +#[doc = "Write proxy for field `CH2NEN`"] +pub struct CH2NEN_W<'a> { w: &'a mut W, } -impl<'a> _CH2NENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2NEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u16) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _CH2PW<'a> { +#[doc = "Reader of field `CH2P`"] +pub type CH2P_R = crate::R; +#[doc = "Write proxy for field `CH2P`"] +pub struct CH2P_W<'a> { w: &'a mut W, } -impl<'a> _CH2PW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2P_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u16) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _CH2ENW<'a> { +#[doc = "Reader of field `CH2EN`"] +pub type CH2EN_R = crate::R; +#[doc = "Write proxy for field `CH2EN`"] +pub struct CH2EN_W<'a> { w: &'a mut W, } -impl<'a> _CH2ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u16) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _CH1NPW<'a> { +#[doc = "Reader of field `CH1NP`"] +pub type CH1NP_R = crate::R; +#[doc = "Write proxy for field `CH1NP`"] +pub struct CH1NP_W<'a> { w: &'a mut W, } -impl<'a> _CH1NPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1NP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _CH1NENW<'a> { +#[doc = "Reader of field `CH1NEN`"] +pub type CH1NEN_R = crate::R; +#[doc = "Write proxy for field `CH1NEN`"] +pub struct CH1NEN_W<'a> { w: &'a mut W, } -impl<'a> _CH1NENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1NEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u16) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _CH1PW<'a> { +#[doc = "Reader of field `CH1P`"] +pub type CH1P_R = crate::R; +#[doc = "Write proxy for field `CH1P`"] +pub struct CH1P_W<'a> { w: &'a mut W, } -impl<'a> _CH1PW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1P_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u16) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _CH1ENW<'a> { +#[doc = "Reader of field `CH1EN`"] +pub type CH1EN_R = crate::R; +#[doc = "Write proxy for field `CH1EN`"] +pub struct CH1EN_W<'a> { w: &'a mut W, } -impl<'a> _CH1ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u16) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CH0NPW<'a> { +#[doc = "Reader of field `CH0NP`"] +pub type CH0NP_R = crate::R; +#[doc = "Write proxy for field `CH0NP`"] +pub struct CH0NP_W<'a> { w: &'a mut W, } -impl<'a> _CH0NPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0NP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _CH0NENW<'a> { +#[doc = "Reader of field `CH0NEN`"] +pub type CH0NEN_R = crate::R; +#[doc = "Write proxy for field `CH0NEN`"] +pub struct CH0NEN_W<'a> { w: &'a mut W, } -impl<'a> _CH0NENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0NEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CH0PW<'a> { +#[doc = "Reader of field `CH0P`"] +pub type CH0P_R = crate::R; +#[doc = "Write proxy for field `CH0P`"] +pub struct CH0P_W<'a> { w: &'a mut W, } -impl<'a> _CH0PW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0P_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _CH0ENW<'a> { +#[doc = "Reader of field `CH0EN`"] +pub type CH0EN_R = crate::R; +#[doc = "Write proxy for field `CH0EN`"] +pub struct CH0EN_W<'a> { w: &'a mut W, } -impl<'a> _CH0ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 13 - Channel 3 capture/compare function polarity"] - #[inline] - pub fn ch3p(&self) -> CH3PR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3PR { bits } + #[inline(always)] + pub fn ch3p(&self) -> CH3P_R { + CH3P_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - Channel 3 capture/compare function enable"] - #[inline] - pub fn ch3en(&self) -> CH3ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3ENR { bits } + #[inline(always)] + pub fn ch3en(&self) -> CH3EN_R { + CH3EN_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Channel 2 complementary output polarity"] - #[inline] - pub fn ch2np(&self) -> CH2NPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2NPR { bits } + #[inline(always)] + pub fn ch2np(&self) -> CH2NP_R { + CH2NP_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Channel 2 complementary output enable"] - #[inline] - pub fn ch2nen(&self) -> CH2NENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2NENR { bits } + #[inline(always)] + pub fn ch2nen(&self) -> CH2NEN_R { + CH2NEN_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Channel 2 capture/compare function polarity"] - #[inline] - pub fn ch2p(&self) -> CH2PR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2PR { bits } + #[inline(always)] + pub fn ch2p(&self) -> CH2P_R { + CH2P_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Channel 2 capture/compare function enable"] - #[inline] - pub fn ch2en(&self) -> CH2ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2ENR { bits } + #[inline(always)] + pub fn ch2en(&self) -> CH2EN_R { + CH2EN_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - Channel 1 complementary output polarity"] - #[inline] - pub fn ch1np(&self) -> CH1NPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1NPR { bits } + #[inline(always)] + pub fn ch1np(&self) -> CH1NP_R { + CH1NP_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Channel 1 complementary output enable"] - #[inline] - pub fn ch1nen(&self) -> CH1NENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1NENR { bits } + #[inline(always)] + pub fn ch1nen(&self) -> CH1NEN_R { + CH1NEN_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Channel 1 capture/compare function polarity"] - #[inline] - pub fn ch1p(&self) -> CH1PR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1PR { bits } + #[inline(always)] + pub fn ch1p(&self) -> CH1P_R { + CH1P_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Channel 1 capture/compare function enable"] - #[inline] - pub fn ch1en(&self) -> CH1ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1ENR { bits } + #[inline(always)] + pub fn ch1en(&self) -> CH1EN_R { + CH1EN_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Channel 0 complementary output polarity"] - #[inline] - pub fn ch0np(&self) -> CH0NPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0NPR { bits } + #[inline(always)] + pub fn ch0np(&self) -> CH0NP_R { + CH0NP_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Channel 0 complementary output enable"] - #[inline] - pub fn ch0nen(&self) -> CH0NENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0NENR { bits } + #[inline(always)] + pub fn ch0nen(&self) -> CH0NEN_R { + CH0NEN_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Channel 0 capture/compare function polarity"] - #[inline] - pub fn ch0p(&self) -> CH0PR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0PR { bits } + #[inline(always)] + pub fn ch0p(&self) -> CH0P_R { + CH0P_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Channel 0 capture/compare function enable"] - #[inline] - pub fn ch0en(&self) -> CH0ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0ENR { bits } + #[inline(always)] + pub fn ch0en(&self) -> CH0EN_R { + CH0EN_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 13 - Channel 3 capture/compare function polarity"] - #[inline] - pub fn ch3p(&mut self) -> _CH3PW { - _CH3PW { w: self } + #[inline(always)] + pub fn ch3p(&mut self) -> CH3P_W { + CH3P_W { w: self } } #[doc = "Bit 12 - Channel 3 capture/compare function enable"] - #[inline] - pub fn ch3en(&mut self) -> _CH3ENW { - _CH3ENW { w: self } + #[inline(always)] + pub fn ch3en(&mut self) -> CH3EN_W { + CH3EN_W { w: self } } #[doc = "Bit 11 - Channel 2 complementary output polarity"] - #[inline] - pub fn ch2np(&mut self) -> _CH2NPW { - _CH2NPW { w: self } + #[inline(always)] + pub fn ch2np(&mut self) -> CH2NP_W { + CH2NP_W { w: self } } #[doc = "Bit 10 - Channel 2 complementary output enable"] - #[inline] - pub fn ch2nen(&mut self) -> _CH2NENW { - _CH2NENW { w: self } + #[inline(always)] + pub fn ch2nen(&mut self) -> CH2NEN_W { + CH2NEN_W { w: self } } #[doc = "Bit 9 - Channel 2 capture/compare function polarity"] - #[inline] - pub fn ch2p(&mut self) -> _CH2PW { - _CH2PW { w: self } + #[inline(always)] + pub fn ch2p(&mut self) -> CH2P_W { + CH2P_W { w: self } } #[doc = "Bit 8 - Channel 2 capture/compare function enable"] - #[inline] - pub fn ch2en(&mut self) -> _CH2ENW { - _CH2ENW { w: self } + #[inline(always)] + pub fn ch2en(&mut self) -> CH2EN_W { + CH2EN_W { w: self } } #[doc = "Bit 7 - Channel 1 complementary output polarity"] - #[inline] - pub fn ch1np(&mut self) -> _CH1NPW { - _CH1NPW { w: self } + #[inline(always)] + pub fn ch1np(&mut self) -> CH1NP_W { + CH1NP_W { w: self } } #[doc = "Bit 6 - Channel 1 complementary output enable"] - #[inline] - pub fn ch1nen(&mut self) -> _CH1NENW { - _CH1NENW { w: self } + #[inline(always)] + pub fn ch1nen(&mut self) -> CH1NEN_W { + CH1NEN_W { w: self } } #[doc = "Bit 5 - Channel 1 capture/compare function polarity"] - #[inline] - pub fn ch1p(&mut self) -> _CH1PW { - _CH1PW { w: self } + #[inline(always)] + pub fn ch1p(&mut self) -> CH1P_W { + CH1P_W { w: self } } #[doc = "Bit 4 - Channel 1 capture/compare function enable"] - #[inline] - pub fn ch1en(&mut self) -> _CH1ENW { - _CH1ENW { w: self } + #[inline(always)] + pub fn ch1en(&mut self) -> CH1EN_W { + CH1EN_W { w: self } } #[doc = "Bit 3 - Channel 0 complementary output polarity"] - #[inline] - pub fn ch0np(&mut self) -> _CH0NPW { - _CH0NPW { w: self } + #[inline(always)] + pub fn ch0np(&mut self) -> CH0NP_W { + CH0NP_W { w: self } } #[doc = "Bit 2 - Channel 0 complementary output enable"] - #[inline] - pub fn ch0nen(&mut self) -> _CH0NENW { - _CH0NENW { w: self } + #[inline(always)] + pub fn ch0nen(&mut self) -> CH0NEN_W { + CH0NEN_W { w: self } } #[doc = "Bit 1 - Channel 0 capture/compare function polarity"] - #[inline] - pub fn ch0p(&mut self) -> _CH0PW { - _CH0PW { w: self } + #[inline(always)] + pub fn ch0p(&mut self) -> CH0P_W { + CH0P_W { w: self } } #[doc = "Bit 0 - Channel 0 capture/compare function enable"] - #[inline] - pub fn ch0en(&mut self) -> _CH0ENW { - _CH0ENW { w: self } + #[inline(always)] + pub fn ch0en(&mut self) -> CH0EN_W { + CH0EN_W { w: self } } } diff --git a/src/timer0/cnt.rs b/src/timer0/cnt.rs index f1d1f7903ff7225b849a0f90c7bda36ce2c6d3c3..4b9b9c34342f9e486a2520e0e11b21b3dc1914ad 100644 --- a/src/timer0/cnt.rs +++ b/src/timer0/cnt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CNT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CNT"] +pub type R = crate::R; +#[doc = "Writer for register CNT"] +pub type W = crate::W; +#[doc = "Register CNT `reset()`'s with value 0"] +impl crate::ResetValue for super::CNT { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - current counter value"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - current counter value"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/timer0/crep.rs b/src/timer0/crep.rs index 208c46a943e1916fe9126e15f0c6d6cfdd573901..3a7c76653f71cdc42b6ed471dba82b9c19be5355 100644 --- a/src/timer0/crep.rs +++ b/src/timer0/crep.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CREP { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CREPR { - bits: u8, -} -impl CREPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CREPW<'a> { +#[doc = "Reader of register CREP"] +pub type R = crate::R; +#[doc = "Writer for register CREP"] +pub type W = crate::W; +#[doc = "Register CREP `reset()`'s with value 0"] +impl crate::ResetValue for super::CREP { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CREP`"] +pub type CREP_R = crate::R; +#[doc = "Write proxy for field `CREP`"] +pub struct CREP_W<'a> { w: &'a mut W, } -impl<'a> _CREPW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CREP_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u16) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:7 - Counter repetition value"] - #[inline] - pub fn crep(&self) -> CREPR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CREPR { bits } + #[inline(always)] + pub fn crep(&self) -> CREP_R { + CREP_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:7 - Counter repetition value"] - #[inline] - pub fn crep(&mut self) -> _CREPW { - _CREPW { w: self } + #[inline(always)] + pub fn crep(&mut self) -> CREP_W { + CREP_W { w: self } } } diff --git a/src/timer0/ctl0.rs b/src/timer0/ctl0.rs index 0cdf96fa324f48a71f5738384309a4f3c16fa19e..4cc28789710bc74505c7ad2d7aea9b1ecbe99261 100644 --- a/src/timer0/ctl0.rs +++ b/src/timer0/ctl0.rs @@ -1,500 +1,268 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CTL0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CKDIVR { - bits: u8, -} -impl CKDIVR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ARSER { - bits: bool, -} -impl ARSER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CAMR { - bits: u8, -} -impl CAMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DIRR { - bits: bool, -} -impl DIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SPMR { - bits: bool, -} -impl SPMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UPSR { - bits: bool, -} -impl UPSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UPDISR { - bits: bool, -} -impl UPDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CENR { - bits: bool, -} -impl CENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CKDIVW<'a> { +#[doc = "Reader of register CTL0"] +pub type R = crate::R; +#[doc = "Writer for register CTL0"] +pub type W = crate::W; +#[doc = "Register CTL0 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL0 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CKDIV`"] +pub type CKDIV_R = crate::R; +#[doc = "Write proxy for field `CKDIV`"] +pub struct CKDIV_W<'a> { w: &'a mut W, } -impl<'a> _CKDIVW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CKDIV_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u16) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _ARSEW<'a> { +#[doc = "Reader of field `ARSE`"] +pub type ARSE_R = crate::R; +#[doc = "Write proxy for field `ARSE`"] +pub struct ARSE_W<'a> { w: &'a mut W, } -impl<'a> _ARSEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ARSE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _CAMW<'a> { +#[doc = "Reader of field `CAM`"] +pub type CAM_R = crate::R; +#[doc = "Write proxy for field `CAM`"] +pub struct CAM_W<'a> { w: &'a mut W, } -impl<'a> _CAMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CAM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 5)) | (((value as u16) & 0x03) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _DIRW<'a> { +#[doc = "Reader of field `DIR`"] +pub type DIR_R = crate::R; +#[doc = "Write proxy for field `DIR`"] +pub struct DIR_W<'a> { w: &'a mut W, } -impl<'a> _DIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u16) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _SPMW<'a> { +#[doc = "Reader of field `SPM`"] +pub type SPM_R = crate::R; +#[doc = "Write proxy for field `SPM`"] +pub struct SPM_W<'a> { w: &'a mut W, } -impl<'a> _SPMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SPM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _UPSW<'a> { +#[doc = "Reader of field `UPS`"] +pub type UPS_R = crate::R; +#[doc = "Write proxy for field `UPS`"] +pub struct UPS_W<'a> { w: &'a mut W, } -impl<'a> _UPSW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _UPDISW<'a> { +#[doc = "Reader of field `UPDIS`"] +pub type UPDIS_R = crate::R; +#[doc = "Write proxy for field `UPDIS`"] +pub struct UPDIS_W<'a> { w: &'a mut W, } -impl<'a> _UPDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _CENW<'a> { +#[doc = "Reader of field `CEN`"] +pub type CEN_R = crate::R; +#[doc = "Write proxy for field `CEN`"] +pub struct CEN_W<'a> { w: &'a mut W, } -impl<'a> _CENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 8:9 - Clock division"] - #[inline] - pub fn ckdiv(&self) -> CKDIVR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CKDIVR { bits } + #[inline(always)] + pub fn ckdiv(&self) -> CKDIV_R { + CKDIV_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bit 7 - Auto-reload shadow enable"] - #[inline] - pub fn arse(&self) -> ARSER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ARSER { bits } + #[inline(always)] + pub fn arse(&self) -> ARSE_R { + ARSE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 5:6 - Counter aligns mode selection"] - #[inline] - pub fn cam(&self) -> CAMR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CAMR { bits } + #[inline(always)] + pub fn cam(&self) -> CAM_R { + CAM_R::new(((self.bits >> 5) & 0x03) as u8) } #[doc = "Bit 4 - Direction"] - #[inline] - pub fn dir(&self) -> DIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - DIRR { bits } + #[inline(always)] + pub fn dir(&self) -> DIR_R { + DIR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Single pulse mode"] - #[inline] - pub fn spm(&self) -> SPMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - SPMR { bits } + #[inline(always)] + pub fn spm(&self) -> SPM_R { + SPM_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Update source"] - #[inline] - pub fn ups(&self) -> UPSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - UPSR { bits } + #[inline(always)] + pub fn ups(&self) -> UPS_R { + UPS_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Update disable"] - #[inline] - pub fn updis(&self) -> UPDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - UPDISR { bits } + #[inline(always)] + pub fn updis(&self) -> UPDIS_R { + UPDIS_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Counter enable"] - #[inline] - pub fn cen(&self) -> CENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CENR { bits } + #[inline(always)] + pub fn cen(&self) -> CEN_R { + CEN_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 8:9 - Clock division"] - #[inline] - pub fn ckdiv(&mut self) -> _CKDIVW { - _CKDIVW { w: self } + #[inline(always)] + pub fn ckdiv(&mut self) -> CKDIV_W { + CKDIV_W { w: self } } #[doc = "Bit 7 - Auto-reload shadow enable"] - #[inline] - pub fn arse(&mut self) -> _ARSEW { - _ARSEW { w: self } + #[inline(always)] + pub fn arse(&mut self) -> ARSE_W { + ARSE_W { w: self } } #[doc = "Bits 5:6 - Counter aligns mode selection"] - #[inline] - pub fn cam(&mut self) -> _CAMW { - _CAMW { w: self } + #[inline(always)] + pub fn cam(&mut self) -> CAM_W { + CAM_W { w: self } } #[doc = "Bit 4 - Direction"] - #[inline] - pub fn dir(&mut self) -> _DIRW { - _DIRW { w: self } + #[inline(always)] + pub fn dir(&mut self) -> DIR_W { + DIR_W { w: self } } #[doc = "Bit 3 - Single pulse mode"] - #[inline] - pub fn spm(&mut self) -> _SPMW { - _SPMW { w: self } + #[inline(always)] + pub fn spm(&mut self) -> SPM_W { + SPM_W { w: self } } #[doc = "Bit 2 - Update source"] - #[inline] - pub fn ups(&mut self) -> _UPSW { - _UPSW { w: self } + #[inline(always)] + pub fn ups(&mut self) -> UPS_W { + UPS_W { w: self } } #[doc = "Bit 1 - Update disable"] - #[inline] - pub fn updis(&mut self) -> _UPDISW { - _UPDISW { w: self } + #[inline(always)] + pub fn updis(&mut self) -> UPDIS_W { + UPDIS_W { w: self } } #[doc = "Bit 0 - Counter enable"] - #[inline] - pub fn cen(&mut self) -> _CENW { - _CENW { w: self } + #[inline(always)] + pub fn cen(&mut self) -> CEN_W { + CEN_W { w: self } } } diff --git a/src/timer0/ctl1.rs b/src/timer0/ctl1.rs index 1cc3bbed480e12bb2df62ef45012858df1ad82c0..a656c1abf3d96a2d47313442531f6fe738f8cd24 100644 --- a/src/timer0/ctl1.rs +++ b/src/timer0/ctl1.rs @@ -1,754 +1,414 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CTL1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct ISO3R { - bits: bool, -} -impl ISO3R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISO2NR { - bits: bool, -} -impl ISO2NR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISO2R { - bits: bool, -} -impl ISO2R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISO1NR { - bits: bool, -} -impl ISO1NR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISO1R { - bits: bool, -} -impl ISO1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISO0NR { - bits: bool, -} -impl ISO0NR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISO0R { - bits: bool, -} -impl ISO0R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TI0SR { - bits: bool, -} -impl TI0SR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MMCR { - bits: u8, -} -impl MMCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DMASR { - bits: bool, -} -impl DMASR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CCUCR { - bits: bool, -} -impl CCUCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CCSER { - bits: bool, -} -impl CCSER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _ISO3W<'a> { +#[doc = "Reader of register CTL1"] +pub type R = crate::R; +#[doc = "Writer for register CTL1"] +pub type W = crate::W; +#[doc = "Register CTL1 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL1 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `ISO3`"] +pub type ISO3_R = crate::R; +#[doc = "Write proxy for field `ISO3`"] +pub struct ISO3_W<'a> { w: &'a mut W, } -impl<'a> _ISO3W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ISO3_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u16) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _ISO2NW<'a> { +#[doc = "Reader of field `ISO2N`"] +pub type ISO2N_R = crate::R; +#[doc = "Write proxy for field `ISO2N`"] +pub struct ISO2N_W<'a> { w: &'a mut W, } -impl<'a> _ISO2NW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ISO2N_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u16) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _ISO2W<'a> { +#[doc = "Reader of field `ISO2`"] +pub type ISO2_R = crate::R; +#[doc = "Write proxy for field `ISO2`"] +pub struct ISO2_W<'a> { w: &'a mut W, } -impl<'a> _ISO2W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ISO2_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u16) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _ISO1NW<'a> { +#[doc = "Reader of field `ISO1N`"] +pub type ISO1N_R = crate::R; +#[doc = "Write proxy for field `ISO1N`"] +pub struct ISO1N_W<'a> { w: &'a mut W, } -impl<'a> _ISO1NW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ISO1N_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u16) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _ISO1W<'a> { +#[doc = "Reader of field `ISO1`"] +pub type ISO1_R = crate::R; +#[doc = "Write proxy for field `ISO1`"] +pub struct ISO1_W<'a> { w: &'a mut W, } -impl<'a> _ISO1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ISO1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u16) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _ISO0NW<'a> { +#[doc = "Reader of field `ISO0N`"] +pub type ISO0N_R = crate::R; +#[doc = "Write proxy for field `ISO0N`"] +pub struct ISO0N_W<'a> { w: &'a mut W, } -impl<'a> _ISO0NW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ISO0N_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u16) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _ISO0W<'a> { +#[doc = "Reader of field `ISO0`"] +pub type ISO0_R = crate::R; +#[doc = "Write proxy for field `ISO0`"] +pub struct ISO0_W<'a> { w: &'a mut W, } -impl<'a> _ISO0W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ISO0_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u16) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _TI0SW<'a> { +#[doc = "Reader of field `TI0S`"] +pub type TI0S_R = crate::R; +#[doc = "Write proxy for field `TI0S`"] +pub struct TI0S_W<'a> { w: &'a mut W, } -impl<'a> _TI0SW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TI0S_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _MMCW<'a> { +#[doc = "Reader of field `MMC`"] +pub type MMC_R = crate::R; +#[doc = "Write proxy for field `MMC`"] +pub struct MMC_W<'a> { w: &'a mut W, } -impl<'a> _MMCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MMC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 4)) | (((value as u16) & 0x07) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _DMASW<'a> { +#[doc = "Reader of field `DMAS`"] +pub type DMAS_R = crate::R; +#[doc = "Write proxy for field `DMAS`"] +pub struct DMAS_W<'a> { w: &'a mut W, } -impl<'a> _DMASW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DMAS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _CCUCW<'a> { +#[doc = "Reader of field `CCUC`"] +pub type CCUC_R = crate::R; +#[doc = "Write proxy for field `CCUC`"] +pub struct CCUC_W<'a> { w: &'a mut W, } -impl<'a> _CCUCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CCUC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CCSEW<'a> { +#[doc = "Reader of field `CCSE`"] +pub type CCSE_R = crate::R; +#[doc = "Write proxy for field `CCSE`"] +pub struct CCSE_W<'a> { w: &'a mut W, } -impl<'a> _CCSEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CCSE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 14 - Idle state of channel 3 output"] - #[inline] - pub fn iso3(&self) -> ISO3R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ISO3R { bits } + #[inline(always)] + pub fn iso3(&self) -> ISO3_R { + ISO3_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 13 - Idle state of channel 2 complementary output"] - #[inline] - pub fn iso2n(&self) -> ISO2NR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ISO2NR { bits } + #[inline(always)] + pub fn iso2n(&self) -> ISO2N_R { + ISO2N_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - Idle state of channel 2 output"] - #[inline] - pub fn iso2(&self) -> ISO2R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ISO2R { bits } + #[inline(always)] + pub fn iso2(&self) -> ISO2_R { + ISO2_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Idle state of channel 1 complementary output"] - #[inline] - pub fn iso1n(&self) -> ISO1NR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ISO1NR { bits } + #[inline(always)] + pub fn iso1n(&self) -> ISO1N_R { + ISO1N_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Idle state of channel 1 output"] - #[inline] - pub fn iso1(&self) -> ISO1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ISO1R { bits } + #[inline(always)] + pub fn iso1(&self) -> ISO1_R { + ISO1_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Idle state of channel 0 complementary output"] - #[inline] - pub fn iso0n(&self) -> ISO0NR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ISO0NR { bits } + #[inline(always)] + pub fn iso0n(&self) -> ISO0N_R { + ISO0N_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Idle state of channel 0 output"] - #[inline] - pub fn iso0(&self) -> ISO0R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ISO0R { bits } + #[inline(always)] + pub fn iso0(&self) -> ISO0_R { + ISO0_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - Channel 0 trigger input selection"] - #[inline] - pub fn ti0s(&self) -> TI0SR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TI0SR { bits } + #[inline(always)] + pub fn ti0s(&self) -> TI0S_R { + TI0S_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 4:6 - Master mode control"] - #[inline] - pub fn mmc(&self) -> MMCR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - MMCR { bits } + #[inline(always)] + pub fn mmc(&self) -> MMC_R { + MMC_R::new(((self.bits >> 4) & 0x07) as u8) } #[doc = "Bit 3 - DMA request source selection"] - #[inline] - pub fn dmas(&self) -> DMASR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - DMASR { bits } + #[inline(always)] + pub fn dmas(&self) -> DMAS_R { + DMAS_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Commutation control shadow register update control"] - #[inline] - pub fn ccuc(&self) -> CCUCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CCUCR { bits } + #[inline(always)] + pub fn ccuc(&self) -> CCUC_R { + CCUC_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 0 - Commutation control shadow enable"] - #[inline] - pub fn ccse(&self) -> CCSER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CCSER { bits } + #[inline(always)] + pub fn ccse(&self) -> CCSE_R { + CCSE_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 14 - Idle state of channel 3 output"] - #[inline] - pub fn iso3(&mut self) -> _ISO3W { - _ISO3W { w: self } + #[inline(always)] + pub fn iso3(&mut self) -> ISO3_W { + ISO3_W { w: self } } #[doc = "Bit 13 - Idle state of channel 2 complementary output"] - #[inline] - pub fn iso2n(&mut self) -> _ISO2NW { - _ISO2NW { w: self } + #[inline(always)] + pub fn iso2n(&mut self) -> ISO2N_W { + ISO2N_W { w: self } } #[doc = "Bit 12 - Idle state of channel 2 output"] - #[inline] - pub fn iso2(&mut self) -> _ISO2W { - _ISO2W { w: self } + #[inline(always)] + pub fn iso2(&mut self) -> ISO2_W { + ISO2_W { w: self } } #[doc = "Bit 11 - Idle state of channel 1 complementary output"] - #[inline] - pub fn iso1n(&mut self) -> _ISO1NW { - _ISO1NW { w: self } + #[inline(always)] + pub fn iso1n(&mut self) -> ISO1N_W { + ISO1N_W { w: self } } #[doc = "Bit 10 - Idle state of channel 1 output"] - #[inline] - pub fn iso1(&mut self) -> _ISO1W { - _ISO1W { w: self } + #[inline(always)] + pub fn iso1(&mut self) -> ISO1_W { + ISO1_W { w: self } } #[doc = "Bit 9 - Idle state of channel 0 complementary output"] - #[inline] - pub fn iso0n(&mut self) -> _ISO0NW { - _ISO0NW { w: self } + #[inline(always)] + pub fn iso0n(&mut self) -> ISO0N_W { + ISO0N_W { w: self } } #[doc = "Bit 8 - Idle state of channel 0 output"] - #[inline] - pub fn iso0(&mut self) -> _ISO0W { - _ISO0W { w: self } + #[inline(always)] + pub fn iso0(&mut self) -> ISO0_W { + ISO0_W { w: self } } #[doc = "Bit 7 - Channel 0 trigger input selection"] - #[inline] - pub fn ti0s(&mut self) -> _TI0SW { - _TI0SW { w: self } + #[inline(always)] + pub fn ti0s(&mut self) -> TI0S_W { + TI0S_W { w: self } } #[doc = "Bits 4:6 - Master mode control"] - #[inline] - pub fn mmc(&mut self) -> _MMCW { - _MMCW { w: self } + #[inline(always)] + pub fn mmc(&mut self) -> MMC_W { + MMC_W { w: self } } #[doc = "Bit 3 - DMA request source selection"] - #[inline] - pub fn dmas(&mut self) -> _DMASW { - _DMASW { w: self } + #[inline(always)] + pub fn dmas(&mut self) -> DMAS_W { + DMAS_W { w: self } } #[doc = "Bit 2 - Commutation control shadow register update control"] - #[inline] - pub fn ccuc(&mut self) -> _CCUCW { - _CCUCW { w: self } + #[inline(always)] + pub fn ccuc(&mut self) -> CCUC_W { + CCUC_W { w: self } } #[doc = "Bit 0 - Commutation control shadow enable"] - #[inline] - pub fn ccse(&mut self) -> _CCSEW { - _CCSEW { w: self } + #[inline(always)] + pub fn ccse(&mut self) -> CCSE_W { + CCSE_W { w: self } } } diff --git a/src/timer0/dmacfg.rs b/src/timer0/dmacfg.rs index bbaf6c8ac6295cd6476aa7225937e4c8b7fc151e..4419763c700ac03514437a8e064e37f27e313889 100644 --- a/src/timer0/dmacfg.rs +++ b/src/timer0/dmacfg.rs @@ -1,146 +1,64 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DMACFG { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DMATCR { - bits: u8, -} -impl DMATCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DMATAR { - bits: u8, -} -impl DMATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits +#[doc = "Reader of register DMACFG"] +pub type R = crate::R; +#[doc = "Writer for register DMACFG"] +pub type W = crate::W; +#[doc = "Register DMACFG `reset()`'s with value 0"] +impl crate::ResetValue for super::DMACFG { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _DMATCW<'a> { +#[doc = "Reader of field `DMATC`"] +pub type DMATC_R = crate::R; +#[doc = "Write proxy for field `DMATC`"] +pub struct DMATC_W<'a> { w: &'a mut W, } -impl<'a> _DMATCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DMATC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 8)) | (((value as u16) & 0x1f) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _DMATAW<'a> { +#[doc = "Reader of field `DMATA`"] +pub type DMATA_R = crate::R; +#[doc = "Write proxy for field `DMATA`"] +pub struct DMATA_W<'a> { w: &'a mut W, } -impl<'a> _DMATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DMATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x1f) | ((value as u16) & 0x1f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 8:12 - DMA transfer count"] - #[inline] - pub fn dmatc(&self) -> DMATCR { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - DMATCR { bits } + #[inline(always)] + pub fn dmatc(&self) -> DMATC_R { + DMATC_R::new(((self.bits >> 8) & 0x1f) as u8) } #[doc = "Bits 0:4 - DMA transfer access start address"] - #[inline] - pub fn dmata(&self) -> DMATAR { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - DMATAR { bits } + #[inline(always)] + pub fn dmata(&self) -> DMATA_R { + DMATA_R::new((self.bits & 0x1f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 8:12 - DMA transfer count"] - #[inline] - pub fn dmatc(&mut self) -> _DMATCW { - _DMATCW { w: self } + #[inline(always)] + pub fn dmatc(&mut self) -> DMATC_W { + DMATC_W { w: self } } #[doc = "Bits 0:4 - DMA transfer access start address"] - #[inline] - pub fn dmata(&mut self) -> _DMATAW { - _DMATAW { w: self } + #[inline(always)] + pub fn dmata(&mut self) -> DMATA_W { + DMATA_W { w: self } } } diff --git a/src/timer0/dmainten.rs b/src/timer0/dmainten.rs index 5a68bcd07df7f445338abae81038f337665bc676..6140e99fd76889c27fa0c02c5ac7c6e9f273e2b1 100644 --- a/src/timer0/dmainten.rs +++ b/src/timer0/dmainten.rs @@ -1,949 +1,526 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DMAINTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TRGDENR { - bits: bool, -} -impl TRGDENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CMTDENR { - bits: bool, -} -impl CMTDENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH3DENR { - bits: bool, -} -impl CH3DENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2DENR { - bits: bool, -} -impl CH2DENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1DENR { - bits: bool, -} -impl CH1DENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0DENR { - bits: bool, -} -impl CH0DENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UPDENR { - bits: bool, -} -impl UPDENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BRKIER { - bits: bool, -} -impl BRKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TRGIER { - bits: bool, -} -impl TRGIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CMTIER { - bits: bool, -} -impl CMTIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH3IER { - bits: bool, -} -impl CH3IER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2IER { - bits: bool, -} -impl CH2IER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1IER { - bits: bool, -} -impl CH1IER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0IER { - bits: bool, -} -impl CH0IER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UPIER { - bits: bool, -} -impl UPIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TRGDENW<'a> { +#[doc = "Reader of register DMAINTEN"] +pub type R = crate::R; +#[doc = "Writer for register DMAINTEN"] +pub type W = crate::W; +#[doc = "Register DMAINTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::DMAINTEN { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TRGDEN`"] +pub type TRGDEN_R = crate::R; +#[doc = "Write proxy for field `TRGDEN`"] +pub struct TRGDEN_W<'a> { w: &'a mut W, } -impl<'a> _TRGDENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TRGDEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u16) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _CMTDENW<'a> { +#[doc = "Reader of field `CMTDEN`"] +pub type CMTDEN_R = crate::R; +#[doc = "Write proxy for field `CMTDEN`"] +pub struct CMTDEN_W<'a> { w: &'a mut W, } -impl<'a> _CMTDENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMTDEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u16) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _CH3DENW<'a> { +#[doc = "Reader of field `CH3DEN`"] +pub type CH3DEN_R = crate::R; +#[doc = "Write proxy for field `CH3DEN`"] +pub struct CH3DEN_W<'a> { w: &'a mut W, } -impl<'a> _CH3DENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3DEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u16) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CH2DENW<'a> { +#[doc = "Reader of field `CH2DEN`"] +pub type CH2DEN_R = crate::R; +#[doc = "Write proxy for field `CH2DEN`"] +pub struct CH2DEN_W<'a> { w: &'a mut W, } -impl<'a> _CH2DENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2DEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u16) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _CH1DENW<'a> { +#[doc = "Reader of field `CH1DEN`"] +pub type CH1DEN_R = crate::R; +#[doc = "Write proxy for field `CH1DEN`"] +pub struct CH1DEN_W<'a> { w: &'a mut W, } -impl<'a> _CH1DENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1DEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u16) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _CH0DENW<'a> { +#[doc = "Reader of field `CH0DEN`"] +pub type CH0DEN_R = crate::R; +#[doc = "Write proxy for field `CH0DEN`"] +pub struct CH0DEN_W<'a> { w: &'a mut W, } -impl<'a> _CH0DENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0DEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u16) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _UPDENW<'a> { +#[doc = "Reader of field `UPDEN`"] +pub type UPDEN_R = crate::R; +#[doc = "Write proxy for field `UPDEN`"] +pub struct UPDEN_W<'a> { w: &'a mut W, } -impl<'a> _UPDENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPDEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u16) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _BRKIEW<'a> { +#[doc = "Reader of field `BRKIE`"] +pub type BRKIE_R = crate::R; +#[doc = "Write proxy for field `BRKIE`"] +pub struct BRKIE_W<'a> { w: &'a mut W, } -impl<'a> _BRKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BRKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _TRGIEW<'a> { +#[doc = "Reader of field `TRGIE`"] +pub type TRGIE_R = crate::R; +#[doc = "Write proxy for field `TRGIE`"] +pub struct TRGIE_W<'a> { w: &'a mut W, } -impl<'a> _TRGIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TRGIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u16) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _CMTIEW<'a> { +#[doc = "Reader of field `CMTIE`"] +pub type CMTIE_R = crate::R; +#[doc = "Write proxy for field `CMTIE`"] +pub struct CMTIE_W<'a> { w: &'a mut W, } -impl<'a> _CMTIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMTIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u16) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _CH3IEW<'a> { +#[doc = "Reader of field `CH3IE`"] +pub type CH3IE_R = crate::R; +#[doc = "Write proxy for field `CH3IE`"] +pub struct CH3IE_W<'a> { w: &'a mut W, } -impl<'a> _CH3IEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3IE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u16) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CH2IEW<'a> { +#[doc = "Reader of field `CH2IE`"] +pub type CH2IE_R = crate::R; +#[doc = "Write proxy for field `CH2IE`"] +pub struct CH2IE_W<'a> { w: &'a mut W, } -impl<'a> _CH2IEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2IE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _CH1IEW<'a> { +#[doc = "Reader of field `CH1IE`"] +pub type CH1IE_R = crate::R; +#[doc = "Write proxy for field `CH1IE`"] +pub struct CH1IE_W<'a> { w: &'a mut W, } -impl<'a> _CH1IEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1IE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CH0IEW<'a> { +#[doc = "Reader of field `CH0IE`"] +pub type CH0IE_R = crate::R; +#[doc = "Write proxy for field `CH0IE`"] +pub struct CH0IE_W<'a> { w: &'a mut W, } -impl<'a> _CH0IEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0IE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _UPIEW<'a> { +#[doc = "Reader of field `UPIE`"] +pub type UPIE_R = crate::R; +#[doc = "Write proxy for field `UPIE`"] +pub struct UPIE_W<'a> { w: &'a mut W, } -impl<'a> _UPIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 14 - Trigger DMA request enable"] - #[inline] - pub fn trgden(&self) -> TRGDENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TRGDENR { bits } + #[inline(always)] + pub fn trgden(&self) -> TRGDEN_R { + TRGDEN_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 13 - Commutation DMA request enable"] - #[inline] - pub fn cmtden(&self) -> CMTDENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CMTDENR { bits } + #[inline(always)] + pub fn cmtden(&self) -> CMTDEN_R { + CMTDEN_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - Channel 3 capture/compare DMA request enable"] - #[inline] - pub fn ch3den(&self) -> CH3DENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3DENR { bits } + #[inline(always)] + pub fn ch3den(&self) -> CH3DEN_R { + CH3DEN_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Channel 2 capture/compare DMA request enable"] - #[inline] - pub fn ch2den(&self) -> CH2DENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2DENR { bits } + #[inline(always)] + pub fn ch2den(&self) -> CH2DEN_R { + CH2DEN_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Channel 1 capture/compare DMA request enable"] - #[inline] - pub fn ch1den(&self) -> CH1DENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1DENR { bits } + #[inline(always)] + pub fn ch1den(&self) -> CH1DEN_R { + CH1DEN_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Channel 0 capture/compare DMA request enable"] - #[inline] - pub fn ch0den(&self) -> CH0DENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0DENR { bits } + #[inline(always)] + pub fn ch0den(&self) -> CH0DEN_R { + CH0DEN_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Update DMA request enable"] - #[inline] - pub fn upden(&self) -> UPDENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - UPDENR { bits } + #[inline(always)] + pub fn upden(&self) -> UPDEN_R { + UPDEN_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - Break interrupt enable"] - #[inline] - pub fn brkie(&self) -> BRKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - BRKIER { bits } + #[inline(always)] + pub fn brkie(&self) -> BRKIE_R { + BRKIE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Trigger interrupt enable"] - #[inline] - pub fn trgie(&self) -> TRGIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TRGIER { bits } + #[inline(always)] + pub fn trgie(&self) -> TRGIE_R { + TRGIE_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - commutation interrupt enable"] - #[inline] - pub fn cmtie(&self) -> CMTIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CMTIER { bits } + #[inline(always)] + pub fn cmtie(&self) -> CMTIE_R { + CMTIE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Channel 3 capture/compare interrupt enable"] - #[inline] - pub fn ch3ie(&self) -> CH3IER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3IER { bits } + #[inline(always)] + pub fn ch3ie(&self) -> CH3IE_R { + CH3IE_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Channel 2 capture/compare interrupt enable"] - #[inline] - pub fn ch2ie(&self) -> CH2IER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2IER { bits } + #[inline(always)] + pub fn ch2ie(&self) -> CH2IE_R { + CH2IE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Channel 1 capture/compare interrupt enable"] - #[inline] - pub fn ch1ie(&self) -> CH1IER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1IER { bits } + #[inline(always)] + pub fn ch1ie(&self) -> CH1IE_R { + CH1IE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Channel 0 capture/compare interrupt enable"] - #[inline] - pub fn ch0ie(&self) -> CH0IER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0IER { bits } + #[inline(always)] + pub fn ch0ie(&self) -> CH0IE_R { + CH0IE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Update interrupt enable"] - #[inline] - pub fn upie(&self) -> UPIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - UPIER { bits } + #[inline(always)] + pub fn upie(&self) -> UPIE_R { + UPIE_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 14 - Trigger DMA request enable"] - #[inline] - pub fn trgden(&mut self) -> _TRGDENW { - _TRGDENW { w: self } + #[inline(always)] + pub fn trgden(&mut self) -> TRGDEN_W { + TRGDEN_W { w: self } } #[doc = "Bit 13 - Commutation DMA request enable"] - #[inline] - pub fn cmtden(&mut self) -> _CMTDENW { - _CMTDENW { w: self } + #[inline(always)] + pub fn cmtden(&mut self) -> CMTDEN_W { + CMTDEN_W { w: self } } #[doc = "Bit 12 - Channel 3 capture/compare DMA request enable"] - #[inline] - pub fn ch3den(&mut self) -> _CH3DENW { - _CH3DENW { w: self } + #[inline(always)] + pub fn ch3den(&mut self) -> CH3DEN_W { + CH3DEN_W { w: self } } #[doc = "Bit 11 - Channel 2 capture/compare DMA request enable"] - #[inline] - pub fn ch2den(&mut self) -> _CH2DENW { - _CH2DENW { w: self } + #[inline(always)] + pub fn ch2den(&mut self) -> CH2DEN_W { + CH2DEN_W { w: self } } #[doc = "Bit 10 - Channel 1 capture/compare DMA request enable"] - #[inline] - pub fn ch1den(&mut self) -> _CH1DENW { - _CH1DENW { w: self } + #[inline(always)] + pub fn ch1den(&mut self) -> CH1DEN_W { + CH1DEN_W { w: self } } #[doc = "Bit 9 - Channel 0 capture/compare DMA request enable"] - #[inline] - pub fn ch0den(&mut self) -> _CH0DENW { - _CH0DENW { w: self } + #[inline(always)] + pub fn ch0den(&mut self) -> CH0DEN_W { + CH0DEN_W { w: self } } #[doc = "Bit 8 - Update DMA request enable"] - #[inline] - pub fn upden(&mut self) -> _UPDENW { - _UPDENW { w: self } + #[inline(always)] + pub fn upden(&mut self) -> UPDEN_W { + UPDEN_W { w: self } } #[doc = "Bit 7 - Break interrupt enable"] - #[inline] - pub fn brkie(&mut self) -> _BRKIEW { - _BRKIEW { w: self } + #[inline(always)] + pub fn brkie(&mut self) -> BRKIE_W { + BRKIE_W { w: self } } #[doc = "Bit 6 - Trigger interrupt enable"] - #[inline] - pub fn trgie(&mut self) -> _TRGIEW { - _TRGIEW { w: self } + #[inline(always)] + pub fn trgie(&mut self) -> TRGIE_W { + TRGIE_W { w: self } } #[doc = "Bit 5 - commutation interrupt enable"] - #[inline] - pub fn cmtie(&mut self) -> _CMTIEW { - _CMTIEW { w: self } + #[inline(always)] + pub fn cmtie(&mut self) -> CMTIE_W { + CMTIE_W { w: self } } #[doc = "Bit 4 - Channel 3 capture/compare interrupt enable"] - #[inline] - pub fn ch3ie(&mut self) -> _CH3IEW { - _CH3IEW { w: self } + #[inline(always)] + pub fn ch3ie(&mut self) -> CH3IE_W { + CH3IE_W { w: self } } #[doc = "Bit 3 - Channel 2 capture/compare interrupt enable"] - #[inline] - pub fn ch2ie(&mut self) -> _CH2IEW { - _CH2IEW { w: self } + #[inline(always)] + pub fn ch2ie(&mut self) -> CH2IE_W { + CH2IE_W { w: self } } #[doc = "Bit 2 - Channel 1 capture/compare interrupt enable"] - #[inline] - pub fn ch1ie(&mut self) -> _CH1IEW { - _CH1IEW { w: self } + #[inline(always)] + pub fn ch1ie(&mut self) -> CH1IE_W { + CH1IE_W { w: self } } #[doc = "Bit 1 - Channel 0 capture/compare interrupt enable"] - #[inline] - pub fn ch0ie(&mut self) -> _CH0IEW { - _CH0IEW { w: self } + #[inline(always)] + pub fn ch0ie(&mut self) -> CH0IE_W { + CH0IE_W { w: self } } #[doc = "Bit 0 - Update interrupt enable"] - #[inline] - pub fn upie(&mut self) -> _UPIEW { - _UPIEW { w: self } + #[inline(always)] + pub fn upie(&mut self) -> UPIE_W { + UPIE_W { w: self } } } diff --git a/src/timer0/dmatb.rs b/src/timer0/dmatb.rs index 87a7ca95ec8557407b8df2407d1c6b077fadc707..cc91451112345dab82024ddf6b69313eb097125f 100644 --- a/src/timer0/dmatb.rs +++ b/src/timer0/dmatb.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DMATB { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DMATBR { - bits: u16, -} -impl DMATBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DMATBW<'a> { +#[doc = "Reader of register DMATB"] +pub type R = crate::R; +#[doc = "Writer for register DMATB"] +pub type W = crate::W; +#[doc = "Register DMATB `reset()`'s with value 0"] +impl crate::ResetValue for super::DMATB { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DMATB`"] +pub type DMATB_R = crate::R; +#[doc = "Write proxy for field `DMATB`"] +pub struct DMATB_W<'a> { w: &'a mut W, } -impl<'a> _DMATBW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DMATB_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - DMA transfer buffer"] - #[inline] - pub fn dmatb(&self) -> DMATBR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - DMATBR { bits } + #[inline(always)] + pub fn dmatb(&self) -> DMATB_R { + DMATB_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - DMA transfer buffer"] - #[inline] - pub fn dmatb(&mut self) -> _DMATBW { - _DMATBW { w: self } + #[inline(always)] + pub fn dmatb(&mut self) -> DMATB_W { + DMATB_W { w: self } } } diff --git a/src/timer0/intf.rs b/src/timer0/intf.rs index 218a968d0df2cbfaa2f3b3b7b851ea75cbbe8ceb..b46da3ec81ff09dcc63058298ccf790e2cf0cc82 100644 --- a/src/timer0/intf.rs +++ b/src/timer0/intf.rs @@ -1,772 +1,424 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH3OFR { - bits: bool, -} -impl CH3OFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2OFR { - bits: bool, -} -impl CH2OFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1OFR { - bits: bool, -} -impl CH1OFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0OFR { - bits: bool, -} -impl CH0OFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BRKIFR { - bits: bool, -} -impl BRKIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TRGIFR { - bits: bool, -} -impl TRGIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CMTIFR { - bits: bool, -} -impl CMTIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH3IFR { - bits: bool, -} -impl CH3IFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2IFR { - bits: bool, -} -impl CH2IFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1IFR { - bits: bool, -} -impl CH1IFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0IFR { - bits: bool, -} -impl CH0IFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UPIFR { - bits: bool, -} -impl UPIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CH3OFW<'a> { +#[doc = "Reader of register INTF"] +pub type R = crate::R; +#[doc = "Writer for register INTF"] +pub type W = crate::W; +#[doc = "Register INTF `reset()`'s with value 0"] +impl crate::ResetValue for super::INTF { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH3OF`"] +pub type CH3OF_R = crate::R; +#[doc = "Write proxy for field `CH3OF`"] +pub struct CH3OF_W<'a> { w: &'a mut W, } -impl<'a> _CH3OFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3OF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u16) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CH2OFW<'a> { +#[doc = "Reader of field `CH2OF`"] +pub type CH2OF_R = crate::R; +#[doc = "Write proxy for field `CH2OF`"] +pub struct CH2OF_W<'a> { w: &'a mut W, } -impl<'a> _CH2OFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2OF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u16) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _CH1OFW<'a> { +#[doc = "Reader of field `CH1OF`"] +pub type CH1OF_R = crate::R; +#[doc = "Write proxy for field `CH1OF`"] +pub struct CH1OF_W<'a> { w: &'a mut W, } -impl<'a> _CH1OFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1OF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u16) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _CH0OFW<'a> { +#[doc = "Reader of field `CH0OF`"] +pub type CH0OF_R = crate::R; +#[doc = "Write proxy for field `CH0OF`"] +pub struct CH0OF_W<'a> { w: &'a mut W, } -impl<'a> _CH0OFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0OF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u16) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _BRKIFW<'a> { +#[doc = "Reader of field `BRKIF`"] +pub type BRKIF_R = crate::R; +#[doc = "Write proxy for field `BRKIF`"] +pub struct BRKIF_W<'a> { w: &'a mut W, } -impl<'a> _BRKIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BRKIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _TRGIFW<'a> { +#[doc = "Reader of field `TRGIF`"] +pub type TRGIF_R = crate::R; +#[doc = "Write proxy for field `TRGIF`"] +pub struct TRGIF_W<'a> { w: &'a mut W, } -impl<'a> _TRGIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TRGIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u16) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _CMTIFW<'a> { +#[doc = "Reader of field `CMTIF`"] +pub type CMTIF_R = crate::R; +#[doc = "Write proxy for field `CMTIF`"] +pub struct CMTIF_W<'a> { w: &'a mut W, } -impl<'a> _CMTIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMTIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u16) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _CH3IFW<'a> { +#[doc = "Reader of field `CH3IF`"] +pub type CH3IF_R = crate::R; +#[doc = "Write proxy for field `CH3IF`"] +pub struct CH3IF_W<'a> { w: &'a mut W, } -impl<'a> _CH3IFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3IF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u16) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CH2IFW<'a> { +#[doc = "Reader of field `CH2IF`"] +pub type CH2IF_R = crate::R; +#[doc = "Write proxy for field `CH2IF`"] +pub struct CH2IF_W<'a> { w: &'a mut W, } -impl<'a> _CH2IFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2IF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _CH1IFW<'a> { +#[doc = "Reader of field `CH1IF`"] +pub type CH1IF_R = crate::R; +#[doc = "Write proxy for field `CH1IF`"] +pub struct CH1IF_W<'a> { w: &'a mut W, } -impl<'a> _CH1IFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1IF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CH0IFW<'a> { +#[doc = "Reader of field `CH0IF`"] +pub type CH0IF_R = crate::R; +#[doc = "Write proxy for field `CH0IF`"] +pub struct CH0IF_W<'a> { w: &'a mut W, } -impl<'a> _CH0IFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0IF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _UPIFW<'a> { +#[doc = "Reader of field `UPIF`"] +pub type UPIF_R = crate::R; +#[doc = "Write proxy for field `UPIF`"] +pub struct UPIF_W<'a> { w: &'a mut W, } -impl<'a> _UPIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 12 - Channel 3 over capture flag"] - #[inline] - pub fn ch3of(&self) -> CH3OFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3OFR { bits } + #[inline(always)] + pub fn ch3of(&self) -> CH3OF_R { + CH3OF_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Channel 2 over capture flag"] - #[inline] - pub fn ch2of(&self) -> CH2OFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2OFR { bits } + #[inline(always)] + pub fn ch2of(&self) -> CH2OF_R { + CH2OF_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Channel 1 over capture flag"] - #[inline] - pub fn ch1of(&self) -> CH1OFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1OFR { bits } + #[inline(always)] + pub fn ch1of(&self) -> CH1OF_R { + CH1OF_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Channel 0 over capture flag"] - #[inline] - pub fn ch0of(&self) -> CH0OFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0OFR { bits } + #[inline(always)] + pub fn ch0of(&self) -> CH0OF_R { + CH0OF_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 7 - Break interrupt flag"] - #[inline] - pub fn brkif(&self) -> BRKIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - BRKIFR { bits } + #[inline(always)] + pub fn brkif(&self) -> BRKIF_R { + BRKIF_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Trigger interrupt flag"] - #[inline] - pub fn trgif(&self) -> TRGIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TRGIFR { bits } + #[inline(always)] + pub fn trgif(&self) -> TRGIF_R { + TRGIF_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Channel commutation interrupt flag"] - #[inline] - pub fn cmtif(&self) -> CMTIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CMTIFR { bits } + #[inline(always)] + pub fn cmtif(&self) -> CMTIF_R { + CMTIF_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Channel 3 capture/compare interrupt flag"] - #[inline] - pub fn ch3if(&self) -> CH3IFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3IFR { bits } + #[inline(always)] + pub fn ch3if(&self) -> CH3IF_R { + CH3IF_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Channel 2 capture/compare interrupt flag"] - #[inline] - pub fn ch2if(&self) -> CH2IFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2IFR { bits } + #[inline(always)] + pub fn ch2if(&self) -> CH2IF_R { + CH2IF_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Channel 1 capture/compare interrupt flag"] - #[inline] - pub fn ch1if(&self) -> CH1IFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1IFR { bits } + #[inline(always)] + pub fn ch1if(&self) -> CH1IF_R { + CH1IF_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Channel 0 capture/compare interrupt flag"] - #[inline] - pub fn ch0if(&self) -> CH0IFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0IFR { bits } + #[inline(always)] + pub fn ch0if(&self) -> CH0IF_R { + CH0IF_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Update interrupt flag"] - #[inline] - pub fn upif(&self) -> UPIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - UPIFR { bits } + #[inline(always)] + pub fn upif(&self) -> UPIF_R { + UPIF_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 12 - Channel 3 over capture flag"] - #[inline] - pub fn ch3of(&mut self) -> _CH3OFW { - _CH3OFW { w: self } + #[inline(always)] + pub fn ch3of(&mut self) -> CH3OF_W { + CH3OF_W { w: self } } #[doc = "Bit 11 - Channel 2 over capture flag"] - #[inline] - pub fn ch2of(&mut self) -> _CH2OFW { - _CH2OFW { w: self } + #[inline(always)] + pub fn ch2of(&mut self) -> CH2OF_W { + CH2OF_W { w: self } } #[doc = "Bit 10 - Channel 1 over capture flag"] - #[inline] - pub fn ch1of(&mut self) -> _CH1OFW { - _CH1OFW { w: self } + #[inline(always)] + pub fn ch1of(&mut self) -> CH1OF_W { + CH1OF_W { w: self } } #[doc = "Bit 9 - Channel 0 over capture flag"] - #[inline] - pub fn ch0of(&mut self) -> _CH0OFW { - _CH0OFW { w: self } + #[inline(always)] + pub fn ch0of(&mut self) -> CH0OF_W { + CH0OF_W { w: self } } #[doc = "Bit 7 - Break interrupt flag"] - #[inline] - pub fn brkif(&mut self) -> _BRKIFW { - _BRKIFW { w: self } + #[inline(always)] + pub fn brkif(&mut self) -> BRKIF_W { + BRKIF_W { w: self } } #[doc = "Bit 6 - Trigger interrupt flag"] - #[inline] - pub fn trgif(&mut self) -> _TRGIFW { - _TRGIFW { w: self } + #[inline(always)] + pub fn trgif(&mut self) -> TRGIF_W { + TRGIF_W { w: self } } #[doc = "Bit 5 - Channel commutation interrupt flag"] - #[inline] - pub fn cmtif(&mut self) -> _CMTIFW { - _CMTIFW { w: self } + #[inline(always)] + pub fn cmtif(&mut self) -> CMTIF_W { + CMTIF_W { w: self } } #[doc = "Bit 4 - Channel 3 capture/compare interrupt flag"] - #[inline] - pub fn ch3if(&mut self) -> _CH3IFW { - _CH3IFW { w: self } + #[inline(always)] + pub fn ch3if(&mut self) -> CH3IF_W { + CH3IF_W { w: self } } #[doc = "Bit 3 - Channel 2 capture/compare interrupt flag"] - #[inline] - pub fn ch2if(&mut self) -> _CH2IFW { - _CH2IFW { w: self } + #[inline(always)] + pub fn ch2if(&mut self) -> CH2IF_W { + CH2IF_W { w: self } } #[doc = "Bit 2 - Channel 1 capture/compare interrupt flag"] - #[inline] - pub fn ch1if(&mut self) -> _CH1IFW { - _CH1IFW { w: self } + #[inline(always)] + pub fn ch1if(&mut self) -> CH1IF_W { + CH1IF_W { w: self } } #[doc = "Bit 1 - Channel 0 capture/compare interrupt flag"] - #[inline] - pub fn ch0if(&mut self) -> _CH0IFW { - _CH0IFW { w: self } + #[inline(always)] + pub fn ch0if(&mut self) -> CH0IF_W { + CH0IF_W { w: self } } #[doc = "Bit 0 - Update interrupt flag"] - #[inline] - pub fn upif(&mut self) -> _UPIFW { - _UPIFW { w: self } + #[inline(always)] + pub fn upif(&mut self) -> UPIF_W { + UPIF_W { w: self } } } diff --git a/src/timer0/psc.rs b/src/timer0/psc.rs index 126539147666bca5cb1822ea1263f4d3e26bcff0..800317abb385c289e7ac14b685c3e246ea45f77a 100644 --- a/src/timer0/psc.rs +++ b/src/timer0/psc.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::PSC { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PSCR { - bits: u16, -} -impl PSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PSCW<'a> { +#[doc = "Reader of register PSC"] +pub type R = crate::R; +#[doc = "Writer for register PSC"] +pub type W = crate::W; +#[doc = "Register PSC `reset()`'s with value 0"] +impl crate::ResetValue for super::PSC { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PSC`"] +pub type PSC_R = crate::R; +#[doc = "Write proxy for field `PSC`"] +pub struct PSC_W<'a> { w: &'a mut W, } -impl<'a> _PSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Prescaler value of the counter clock"] - #[inline] - pub fn psc(&self) -> PSCR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - PSCR { bits } + #[inline(always)] + pub fn psc(&self) -> PSC_R { + PSC_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Prescaler value of the counter clock"] - #[inline] - pub fn psc(&mut self) -> _PSCW { - _PSCW { w: self } + #[inline(always)] + pub fn psc(&mut self) -> PSC_W { + PSC_W { w: self } } } diff --git a/src/timer0/smcfg.rs b/src/timer0/smcfg.rs index 03202f5ec33e21e4e59f201f42615b02710e9ff5..f892124c3ee60eca05b24cba19180ea546810249 100644 --- a/src/timer0/smcfg.rs +++ b/src/timer0/smcfg.rs @@ -1,405 +1,214 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::SMCFG { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct ETPR { - bits: bool, -} -impl ETPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SMC1R { - bits: bool, -} -impl SMC1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ETPSCR { - bits: u8, -} -impl ETPSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ETFCR { - bits: u8, -} -impl ETFCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MSMR { - bits: bool, -} -impl MSMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TRGSR { - bits: u8, -} -impl TRGSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SMCR { - bits: u8, -} -impl SMCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _ETPW<'a> { +#[doc = "Reader of register SMCFG"] +pub type R = crate::R; +#[doc = "Writer for register SMCFG"] +pub type W = crate::W; +#[doc = "Register SMCFG `reset()`'s with value 0"] +impl crate::ResetValue for super::SMCFG { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `ETP`"] +pub type ETP_R = crate::R; +#[doc = "Write proxy for field `ETP`"] +pub struct ETP_W<'a> { w: &'a mut W, } -impl<'a> _ETPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ETP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u16) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _SMC1W<'a> { +#[doc = "Reader of field `SMC1`"] +pub type SMC1_R = crate::R; +#[doc = "Write proxy for field `SMC1`"] +pub struct SMC1_W<'a> { w: &'a mut W, } -impl<'a> _SMC1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SMC1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u16) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _ETPSCW<'a> { +#[doc = "Reader of field `ETPSC`"] +pub type ETPSC_R = crate::R; +#[doc = "Write proxy for field `ETPSC`"] +pub struct ETPSC_W<'a> { w: &'a mut W, } -impl<'a> _ETPSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ETPSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u16) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _ETFCW<'a> { +#[doc = "Reader of field `ETFC`"] +pub type ETFC_R = crate::R; +#[doc = "Write proxy for field `ETFC`"] +pub struct ETFC_W<'a> { w: &'a mut W, } -impl<'a> _ETFCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ETFC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 8)) | (((value as u16) & 0x0f) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _MSMW<'a> { +#[doc = "Reader of field `MSM`"] +pub type MSM_R = crate::R; +#[doc = "Write proxy for field `MSM`"] +pub struct MSM_W<'a> { w: &'a mut W, } -impl<'a> _MSMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MSM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _TRGSW<'a> { +#[doc = "Reader of field `TRGS`"] +pub type TRGS_R = crate::R; +#[doc = "Write proxy for field `TRGS`"] +pub struct TRGS_W<'a> { w: &'a mut W, } -impl<'a> _TRGSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TRGS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 4)) | (((value as u16) & 0x07) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _SMCW<'a> { +#[doc = "Reader of field `SMC`"] +pub type SMC_R = crate::R; +#[doc = "Write proxy for field `SMC`"] +pub struct SMC_W<'a> { w: &'a mut W, } -impl<'a> _SMCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SMC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x07) | ((value as u16) & 0x07); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 15 - External trigger polarity"] - #[inline] - pub fn etp(&self) -> ETPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ETPR { bits } + #[inline(always)] + pub fn etp(&self) -> ETP_R { + ETP_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 14 - Part of SMC for enable External clock mode1"] - #[inline] - pub fn smc1(&self) -> SMC1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - SMC1R { bits } + #[inline(always)] + pub fn smc1(&self) -> SMC1_R { + SMC1_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bits 12:13 - External trigger prescaler"] - #[inline] - pub fn etpsc(&self) -> ETPSCR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - ETPSCR { bits } + #[inline(always)] + pub fn etpsc(&self) -> ETPSC_R { + ETPSC_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bits 8:11 - External trigger filter control"] - #[inline] - pub fn etfc(&self) -> ETFCR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - ETFCR { bits } + #[inline(always)] + pub fn etfc(&self) -> ETFC_R { + ETFC_R::new(((self.bits >> 8) & 0x0f) as u8) } #[doc = "Bit 7 - Master/Slave mode"] - #[inline] - pub fn msm(&self) -> MSMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - MSMR { bits } + #[inline(always)] + pub fn msm(&self) -> MSM_R { + MSM_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 4:6 - Trigger selection"] - #[inline] - pub fn trgs(&self) -> TRGSR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - TRGSR { bits } + #[inline(always)] + pub fn trgs(&self) -> TRGS_R { + TRGS_R::new(((self.bits >> 4) & 0x07) as u8) } #[doc = "Bits 0:2 - Slave mode selection"] - #[inline] - pub fn smc(&self) -> SMCR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - SMCR { bits } + #[inline(always)] + pub fn smc(&self) -> SMC_R { + SMC_R::new((self.bits & 0x07) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 15 - External trigger polarity"] - #[inline] - pub fn etp(&mut self) -> _ETPW { - _ETPW { w: self } + #[inline(always)] + pub fn etp(&mut self) -> ETP_W { + ETP_W { w: self } } #[doc = "Bit 14 - Part of SMC for enable External clock mode1"] - #[inline] - pub fn smc1(&mut self) -> _SMC1W { - _SMC1W { w: self } + #[inline(always)] + pub fn smc1(&mut self) -> SMC1_W { + SMC1_W { w: self } } #[doc = "Bits 12:13 - External trigger prescaler"] - #[inline] - pub fn etpsc(&mut self) -> _ETPSCW { - _ETPSCW { w: self } + #[inline(always)] + pub fn etpsc(&mut self) -> ETPSC_W { + ETPSC_W { w: self } } #[doc = "Bits 8:11 - External trigger filter control"] - #[inline] - pub fn etfc(&mut self) -> _ETFCW { - _ETFCW { w: self } + #[inline(always)] + pub fn etfc(&mut self) -> ETFC_W { + ETFC_W { w: self } } #[doc = "Bit 7 - Master/Slave mode"] - #[inline] - pub fn msm(&mut self) -> _MSMW { - _MSMW { w: self } + #[inline(always)] + pub fn msm(&mut self) -> MSM_W { + MSM_W { w: self } } #[doc = "Bits 4:6 - Trigger selection"] - #[inline] - pub fn trgs(&mut self) -> _TRGSW { - _TRGSW { w: self } + #[inline(always)] + pub fn trgs(&mut self) -> TRGS_W { + TRGS_W { w: self } } #[doc = "Bits 0:2 - Slave mode selection"] - #[inline] - pub fn smc(&mut self) -> _SMCW { - _SMCW { w: self } + #[inline(always)] + pub fn smc(&mut self) -> SMC_W { + SMC_W { w: self } } } diff --git a/src/timer0/swevg.rs b/src/timer0/swevg.rs index fd5978b595c6c762652b349e6bdb8b685529b32b..86ccad64c12d5f6045ed075694b8ebf93b3bcb80 100644 --- a/src/timer0/swevg.rs +++ b/src/timer0/swevg.rs @@ -1,253 +1,228 @@ -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::SWEVG { - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } -} -#[doc = r" Proxy"] -pub struct _BRKGW<'a> { +#[doc = "Writer for register SWEVG"] +pub type W = crate::W; +#[doc = "Register SWEVG `reset()`'s with value 0"] +impl crate::ResetValue for super::SWEVG { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Write proxy for field `BRKG`"] +pub struct BRKG_W<'a> { w: &'a mut W, } -impl<'a> _BRKGW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BRKG_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _TRGGW<'a> { +#[doc = "Write proxy for field `TRGG`"] +pub struct TRGG_W<'a> { w: &'a mut W, } -impl<'a> _TRGGW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TRGG_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u16) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _CMTGW<'a> { +#[doc = "Write proxy for field `CMTG`"] +pub struct CMTG_W<'a> { w: &'a mut W, } -impl<'a> _CMTGW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CMTG_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u16) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _CH3GW<'a> { +#[doc = "Write proxy for field `CH3G`"] +pub struct CH3G_W<'a> { w: &'a mut W, } -impl<'a> _CH3GW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3G_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u16) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CH2GW<'a> { +#[doc = "Write proxy for field `CH2G`"] +pub struct CH2G_W<'a> { w: &'a mut W, } -impl<'a> _CH2GW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2G_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _CH1GW<'a> { +#[doc = "Write proxy for field `CH1G`"] +pub struct CH1G_W<'a> { w: &'a mut W, } -impl<'a> _CH1GW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1G_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CH0GW<'a> { +#[doc = "Write proxy for field `CH0G`"] +pub struct CH0G_W<'a> { w: &'a mut W, } -impl<'a> _CH0GW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0G_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _UPGW<'a> { +#[doc = "Write proxy for field `UPG`"] +pub struct UPG_W<'a> { w: &'a mut W, } -impl<'a> _UPGW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPG_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 7 - Break event generation"] - #[inline] - pub fn brkg(&mut self) -> _BRKGW { - _BRKGW { w: self } + #[inline(always)] + pub fn brkg(&mut self) -> BRKG_W { + BRKG_W { w: self } } #[doc = "Bit 6 - Trigger event generation"] - #[inline] - pub fn trgg(&mut self) -> _TRGGW { - _TRGGW { w: self } + #[inline(always)] + pub fn trgg(&mut self) -> TRGG_W { + TRGG_W { w: self } } #[doc = "Bit 5 - Channel commutation event generation"] - #[inline] - pub fn cmtg(&mut self) -> _CMTGW { - _CMTGW { w: self } + #[inline(always)] + pub fn cmtg(&mut self) -> CMTG_W { + CMTG_W { w: self } } #[doc = "Bit 4 - Channel 3 capture or compare event generation"] - #[inline] - pub fn ch3g(&mut self) -> _CH3GW { - _CH3GW { w: self } + #[inline(always)] + pub fn ch3g(&mut self) -> CH3G_W { + CH3G_W { w: self } } #[doc = "Bit 3 - Channel 2 capture or compare event generation"] - #[inline] - pub fn ch2g(&mut self) -> _CH2GW { - _CH2GW { w: self } + #[inline(always)] + pub fn ch2g(&mut self) -> CH2G_W { + CH2G_W { w: self } } #[doc = "Bit 2 - Channel 1 capture or compare event generation"] - #[inline] - pub fn ch1g(&mut self) -> _CH1GW { - _CH1GW { w: self } + #[inline(always)] + pub fn ch1g(&mut self) -> CH1G_W { + CH1G_W { w: self } } #[doc = "Bit 1 - Channel 0 capture or compare event generation"] - #[inline] - pub fn ch0g(&mut self) -> _CH0GW { - _CH0GW { w: self } + #[inline(always)] + pub fn ch0g(&mut self) -> CH0G_W { + CH0G_W { w: self } } #[doc = "Bit 0 - Update event generation"] - #[inline] - pub fn upg(&mut self) -> _UPGW { - _UPGW { w: self } + #[inline(always)] + pub fn upg(&mut self) -> UPG_W { + UPG_W { w: self } } } diff --git a/src/timer1.rs b/src/timer1.rs index c4471968c93e8f033769dfc3ad41810b120df6c2..573d01ac733d096a63cbadd19d5109c3dff168f6 100644 --- a/src/timer1.rs +++ b/src/timer1.rs @@ -1,42 +1,40 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - control register 0"] pub ctl0: CTL0, - _reserved0: [u8; 2usize], + _reserved1: [u8; 2usize], #[doc = "0x04 - control register 1"] pub ctl1: CTL1, - _reserved1: [u8; 2usize], + _reserved2: [u8; 2usize], #[doc = "0x08 - slave mode control register"] pub smcfg: SMCFG, - _reserved2: [u8; 2usize], + _reserved3: [u8; 2usize], #[doc = "0x0c - DMA/Interrupt enable register"] pub dmainten: DMAINTEN, - _reserved3: [u8; 2usize], + _reserved4: [u8; 2usize], #[doc = "0x10 - interrupt flag register"] pub intf: INTF, - _reserved4: [u8; 2usize], + _reserved5: [u8; 2usize], #[doc = "0x14 - event generation register"] pub swevg: SWEVG, - _reserved5: [u8; 2usize], - #[doc = "0x18 - Channel control register 0 (output mode)"] - pub chctl0_output: CHCTL0_OUTPUT, _reserved6: [u8; 2usize], - #[doc = "0x1c - Channel control register 1 (output mode)"] - pub chctl1_output: CHCTL1_OUTPUT, + _reserved_6_chctl0: [u8; 2usize], _reserved7: [u8; 2usize], + _reserved_7_chctl1: [u8; 2usize], + _reserved8: [u8; 2usize], #[doc = "0x20 - Channel control register 2"] pub chctl2: CHCTL2, - _reserved8: [u8; 2usize], + _reserved9: [u8; 2usize], #[doc = "0x24 - Counter register"] pub cnt: CNT, - _reserved9: [u8; 2usize], + _reserved10: [u8; 2usize], #[doc = "0x28 - Prescaler register"] pub psc: PSC, - _reserved10: [u8; 2usize], + _reserved11: [u8; 2usize], #[doc = "0x2c - Counter auto reload register"] pub car: CAR, - _reserved11: [u8; 6usize], + _reserved12: [u8; 6usize], #[doc = "0x34 - Channel 0 capture/compare value register"] pub ch0cv: CH0CV, #[doc = "0x38 - Channel 1 capture/compare value register"] @@ -45,130 +43,270 @@ pub struct RegisterBlock { pub ch2cv: CH2CV, #[doc = "0x40 - Channel 3 capture/compare value register"] pub ch3cv: CH3CV, - _reserved12: [u8; 4usize], + _reserved16: [u8; 4usize], #[doc = "0x48 - DMA configuration register"] pub dmacfg: DMACFG, - _reserved13: [u8; 2usize], + _reserved17: [u8; 2usize], #[doc = "0x4c - DMA transfer buffer register"] pub dmatb: DMATB, } -#[doc = "control register 0"] -pub struct CTL0 { - register: ::vcell::VolatileCell, +impl RegisterBlock { + #[doc = "0x18 - Channel control register 0 (input mode)"] + #[inline(always)] + pub fn chctl0_input(&self) -> &CHCTL0_INPUT { + unsafe { &*(((self as *const Self) as *const u8).add(24usize) as *const CHCTL0_INPUT) } + } + #[doc = "0x18 - Channel control register 0 (input mode)"] + #[inline(always)] + pub fn chctl0_input_mut(&self) -> &mut CHCTL0_INPUT { + unsafe { &mut *(((self as *const Self) as *mut u8).add(24usize) as *mut CHCTL0_INPUT) } + } + #[doc = "0x18 - Channel control register 0 (output mode)"] + #[inline(always)] + pub fn chctl0_output(&self) -> &CHCTL0_OUTPUT { + unsafe { &*(((self as *const Self) as *const u8).add(24usize) as *const CHCTL0_OUTPUT) } + } + #[doc = "0x18 - Channel control register 0 (output mode)"] + #[inline(always)] + pub fn chctl0_output_mut(&self) -> &mut CHCTL0_OUTPUT { + unsafe { &mut *(((self as *const Self) as *mut u8).add(24usize) as *mut CHCTL0_OUTPUT) } + } + #[doc = "0x1c - Channel control register 1 (input mode)"] + #[inline(always)] + pub fn chctl1_input(&self) -> &CHCTL1_INPUT { + unsafe { &*(((self as *const Self) as *const u8).add(28usize) as *const CHCTL1_INPUT) } + } + #[doc = "0x1c - Channel control register 1 (input mode)"] + #[inline(always)] + pub fn chctl1_input_mut(&self) -> &mut CHCTL1_INPUT { + unsafe { &mut *(((self as *const Self) as *mut u8).add(28usize) as *mut CHCTL1_INPUT) } + } + #[doc = "0x1c - Channel control register 1 (output mode)"] + #[inline(always)] + pub fn chctl1_output(&self) -> &CHCTL1_OUTPUT { + unsafe { &*(((self as *const Self) as *const u8).add(28usize) as *const CHCTL1_OUTPUT) } + } + #[doc = "0x1c - Channel control register 1 (output mode)"] + #[inline(always)] + pub fn chctl1_output_mut(&self) -> &mut CHCTL1_OUTPUT { + unsafe { &mut *(((self as *const Self) as *mut u8).add(28usize) as *mut CHCTL1_OUTPUT) } + } } +#[doc = "control register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl0](ctl0) module"] +pub type CTL0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL0; +#[doc = "`read()` method returns [ctl0::R](ctl0::R) reader structure"] +impl crate::Readable for CTL0 {} +#[doc = "`write(|w| ..)` method takes [ctl0::W](ctl0::W) writer structure"] +impl crate::Writable for CTL0 {} #[doc = "control register 0"] pub mod ctl0; -#[doc = "control register 1"] -pub struct CTL1 { - register: ::vcell::VolatileCell, -} +#[doc = "control register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl1](ctl1) module"] +pub type CTL1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL1; +#[doc = "`read()` method returns [ctl1::R](ctl1::R) reader structure"] +impl crate::Readable for CTL1 {} +#[doc = "`write(|w| ..)` method takes [ctl1::W](ctl1::W) writer structure"] +impl crate::Writable for CTL1 {} #[doc = "control register 1"] pub mod ctl1; -#[doc = "slave mode control register"] -pub struct SMCFG { - register: ::vcell::VolatileCell, -} +#[doc = "slave mode control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [smcfg](smcfg) module"] +pub type SMCFG = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _SMCFG; +#[doc = "`read()` method returns [smcfg::R](smcfg::R) reader structure"] +impl crate::Readable for SMCFG {} +#[doc = "`write(|w| ..)` method takes [smcfg::W](smcfg::W) writer structure"] +impl crate::Writable for SMCFG {} #[doc = "slave mode control register"] pub mod smcfg; -#[doc = "DMA/Interrupt enable register"] -pub struct DMAINTEN { - register: ::vcell::VolatileCell, -} +#[doc = "DMA/Interrupt enable register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dmainten](dmainten) module"] +pub type DMAINTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DMAINTEN; +#[doc = "`read()` method returns [dmainten::R](dmainten::R) reader structure"] +impl crate::Readable for DMAINTEN {} +#[doc = "`write(|w| ..)` method takes [dmainten::W](dmainten::W) writer structure"] +impl crate::Writable for DMAINTEN {} #[doc = "DMA/Interrupt enable register"] pub mod dmainten; -#[doc = "interrupt flag register"] -pub struct INTF { - register: ::vcell::VolatileCell, -} +#[doc = "interrupt flag register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [intf](intf) module"] +pub type INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _INTF; +#[doc = "`read()` method returns [intf::R](intf::R) reader structure"] +impl crate::Readable for INTF {} +#[doc = "`write(|w| ..)` method takes [intf::W](intf::W) writer structure"] +impl crate::Writable for INTF {} #[doc = "interrupt flag register"] pub mod intf; -#[doc = "event generation register"] -pub struct SWEVG { - register: ::vcell::VolatileCell, -} +#[doc = "event generation register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [swevg](swevg) module"] +pub type SWEVG = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _SWEVG; +#[doc = "`write(|w| ..)` method takes [swevg::W](swevg::W) writer structure"] +impl crate::Writable for SWEVG {} #[doc = "event generation register"] pub mod swevg; -#[doc = "Channel control register 0 (output mode)"] -pub struct CHCTL0_OUTPUT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel control register 0 (output mode)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [chctl0_output](chctl0_output) module"] +pub type CHCTL0_OUTPUT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CHCTL0_OUTPUT; +#[doc = "`read()` method returns [chctl0_output::R](chctl0_output::R) reader structure"] +impl crate::Readable for CHCTL0_OUTPUT {} +#[doc = "`write(|w| ..)` method takes [chctl0_output::W](chctl0_output::W) writer structure"] +impl crate::Writable for CHCTL0_OUTPUT {} #[doc = "Channel control register 0 (output mode)"] pub mod chctl0_output; -#[doc = "Channel control register 0 (input mode)"] -pub struct CHCTL0_INPUT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel control register 0 (input mode)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [chctl0_input](chctl0_input) module"] +pub type CHCTL0_INPUT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CHCTL0_INPUT; +#[doc = "`read()` method returns [chctl0_input::R](chctl0_input::R) reader structure"] +impl crate::Readable for CHCTL0_INPUT {} +#[doc = "`write(|w| ..)` method takes [chctl0_input::W](chctl0_input::W) writer structure"] +impl crate::Writable for CHCTL0_INPUT {} #[doc = "Channel control register 0 (input mode)"] pub mod chctl0_input; -#[doc = "Channel control register 1 (output mode)"] -pub struct CHCTL1_OUTPUT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel control register 1 (output mode)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [chctl1_output](chctl1_output) module"] +pub type CHCTL1_OUTPUT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CHCTL1_OUTPUT; +#[doc = "`read()` method returns [chctl1_output::R](chctl1_output::R) reader structure"] +impl crate::Readable for CHCTL1_OUTPUT {} +#[doc = "`write(|w| ..)` method takes [chctl1_output::W](chctl1_output::W) writer structure"] +impl crate::Writable for CHCTL1_OUTPUT {} #[doc = "Channel control register 1 (output mode)"] pub mod chctl1_output; -#[doc = "Channel control register 1 (input mode)"] -pub struct CHCTL1_INPUT { - register: ::vcell::VolatileCell, -} +#[doc = "Channel control register 1 (input mode)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [chctl1_input](chctl1_input) module"] +pub type CHCTL1_INPUT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CHCTL1_INPUT; +#[doc = "`read()` method returns [chctl1_input::R](chctl1_input::R) reader structure"] +impl crate::Readable for CHCTL1_INPUT {} +#[doc = "`write(|w| ..)` method takes [chctl1_input::W](chctl1_input::W) writer structure"] +impl crate::Writable for CHCTL1_INPUT {} #[doc = "Channel control register 1 (input mode)"] pub mod chctl1_input; -#[doc = "Channel control register 2"] -pub struct CHCTL2 { - register: ::vcell::VolatileCell, -} +#[doc = "Channel control register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [chctl2](chctl2) module"] +pub type CHCTL2 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CHCTL2; +#[doc = "`read()` method returns [chctl2::R](chctl2::R) reader structure"] +impl crate::Readable for CHCTL2 {} +#[doc = "`write(|w| ..)` method takes [chctl2::W](chctl2::W) writer structure"] +impl crate::Writable for CHCTL2 {} #[doc = "Channel control register 2"] pub mod chctl2; -#[doc = "Counter register"] -pub struct CNT { - register: ::vcell::VolatileCell, -} +#[doc = "Counter register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cnt](cnt) module"] +pub type CNT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CNT; +#[doc = "`read()` method returns [cnt::R](cnt::R) reader structure"] +impl crate::Readable for CNT {} +#[doc = "`write(|w| ..)` method takes [cnt::W](cnt::W) writer structure"] +impl crate::Writable for CNT {} #[doc = "Counter register"] pub mod cnt; -#[doc = "Prescaler register"] -pub struct PSC { - register: ::vcell::VolatileCell, -} +#[doc = "Prescaler register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [psc](psc) module"] +pub type PSC = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _PSC; +#[doc = "`read()` method returns [psc::R](psc::R) reader structure"] +impl crate::Readable for PSC {} +#[doc = "`write(|w| ..)` method takes [psc::W](psc::W) writer structure"] +impl crate::Writable for PSC {} #[doc = "Prescaler register"] pub mod psc; -#[doc = "Counter auto reload register"] -pub struct CAR { - register: ::vcell::VolatileCell, -} +#[doc = "Counter auto reload register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [car](car) module"] +pub type CAR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CAR; +#[doc = "`read()` method returns [car::R](car::R) reader structure"] +impl crate::Readable for CAR {} +#[doc = "`write(|w| ..)` method takes [car::W](car::W) writer structure"] +impl crate::Writable for CAR {} #[doc = "Counter auto reload register"] pub mod car; -#[doc = "Channel 0 capture/compare value register"] -pub struct CH0CV { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 0 capture/compare value register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch0cv](ch0cv) module"] +pub type CH0CV = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH0CV; +#[doc = "`read()` method returns [ch0cv::R](ch0cv::R) reader structure"] +impl crate::Readable for CH0CV {} +#[doc = "`write(|w| ..)` method takes [ch0cv::W](ch0cv::W) writer structure"] +impl crate::Writable for CH0CV {} #[doc = "Channel 0 capture/compare value register"] pub mod ch0cv; -#[doc = "Channel 1 capture/compare value register"] -pub struct CH1CV { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 1 capture/compare value register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch1cv](ch1cv) module"] +pub type CH1CV = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH1CV; +#[doc = "`read()` method returns [ch1cv::R](ch1cv::R) reader structure"] +impl crate::Readable for CH1CV {} +#[doc = "`write(|w| ..)` method takes [ch1cv::W](ch1cv::W) writer structure"] +impl crate::Writable for CH1CV {} #[doc = "Channel 1 capture/compare value register"] pub mod ch1cv; -#[doc = "Channel 2 capture/compare value register"] -pub struct CH2CV { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 2 capture/compare value register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch2cv](ch2cv) module"] +pub type CH2CV = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH2CV; +#[doc = "`read()` method returns [ch2cv::R](ch2cv::R) reader structure"] +impl crate::Readable for CH2CV {} +#[doc = "`write(|w| ..)` method takes [ch2cv::W](ch2cv::W) writer structure"] +impl crate::Writable for CH2CV {} #[doc = "Channel 2 capture/compare value register"] pub mod ch2cv; -#[doc = "Channel 3 capture/compare value register"] -pub struct CH3CV { - register: ::vcell::VolatileCell, -} +#[doc = "Channel 3 capture/compare value register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ch3cv](ch3cv) module"] +pub type CH3CV = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CH3CV; +#[doc = "`read()` method returns [ch3cv::R](ch3cv::R) reader structure"] +impl crate::Readable for CH3CV {} +#[doc = "`write(|w| ..)` method takes [ch3cv::W](ch3cv::W) writer structure"] +impl crate::Writable for CH3CV {} #[doc = "Channel 3 capture/compare value register"] pub mod ch3cv; -#[doc = "DMA configuration register"] -pub struct DMACFG { - register: ::vcell::VolatileCell, -} +#[doc = "DMA configuration register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dmacfg](dmacfg) module"] +pub type DMACFG = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DMACFG; +#[doc = "`read()` method returns [dmacfg::R](dmacfg::R) reader structure"] +impl crate::Readable for DMACFG {} +#[doc = "`write(|w| ..)` method takes [dmacfg::W](dmacfg::W) writer structure"] +impl crate::Writable for DMACFG {} #[doc = "DMA configuration register"] pub mod dmacfg; -#[doc = "DMA transfer buffer register"] -pub struct DMATB { - register: ::vcell::VolatileCell, -} +#[doc = "DMA transfer buffer register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dmatb](dmatb) module"] +pub type DMATB = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DMATB; +#[doc = "`read()` method returns [dmatb::R](dmatb::R) reader structure"] +impl crate::Readable for DMATB {} +#[doc = "`write(|w| ..)` method takes [dmatb::W](dmatb::W) writer structure"] +impl crate::Writable for DMATB {} #[doc = "DMA transfer buffer register"] pub mod dmatb; diff --git a/src/timer1/car.rs b/src/timer1/car.rs index 2580b5a924b037de9a5cb8d9db0a6f0907d62221..c5c62ac0e44c4ee662653893c26b32e3f42fc6d1 100644 --- a/src/timer1/car.rs +++ b/src/timer1/car.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CAR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CARLR { - bits: u16, -} -impl CARLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CARLW<'a> { +#[doc = "Reader of register CAR"] +pub type R = crate::R; +#[doc = "Writer for register CAR"] +pub type W = crate::W; +#[doc = "Register CAR `reset()`'s with value 0"] +impl crate::ResetValue for super::CAR { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CARL`"] +pub type CARL_R = crate::R; +#[doc = "Write proxy for field `CARL`"] +pub struct CARL_W<'a> { w: &'a mut W, } -impl<'a> _CARLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CARL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Counter auto reload value"] - #[inline] - pub fn carl(&self) -> CARLR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - CARLR { bits } + #[inline(always)] + pub fn carl(&self) -> CARL_R { + CARL_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Counter auto reload value"] - #[inline] - pub fn carl(&mut self) -> _CARLW { - _CARLW { w: self } + #[inline(always)] + pub fn carl(&mut self) -> CARL_W { + CARL_W { w: self } } } diff --git a/src/timer1/ch0cv.rs b/src/timer1/ch0cv.rs index 1f9ccdf0466f7ebc6b29e74e29a878ae8cd51edb..14386c859500507c848f97adb2519e4ff94a747e 100644 --- a/src/timer1/ch0cv.rs +++ b/src/timer1/ch0cv.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH0CV { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH0VALR { - bits: u16, -} -impl CH0VALR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CH0VALW<'a> { +#[doc = "Reader of register CH0CV"] +pub type R = crate::R; +#[doc = "Writer for register CH0CV"] +pub type W = crate::W; +#[doc = "Register CH0CV `reset()`'s with value 0"] +impl crate::ResetValue for super::CH0CV { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH0VAL`"] +pub type CH0VAL_R = crate::R; +#[doc = "Write proxy for field `CH0VAL`"] +pub struct CH0VAL_W<'a> { w: &'a mut W, } -impl<'a> _CH0VALW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH0VAL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Capture or compare value of channel 0"] - #[inline] - pub fn ch0val(&self) -> CH0VALR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CH0VALR { bits } + #[inline(always)] + pub fn ch0val(&self) -> CH0VAL_R { + CH0VAL_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Capture or compare value of channel 0"] - #[inline] - pub fn ch0val(&mut self) -> _CH0VALW { - _CH0VALW { w: self } + #[inline(always)] + pub fn ch0val(&mut self) -> CH0VAL_W { + CH0VAL_W { w: self } } } diff --git a/src/timer1/ch1cv.rs b/src/timer1/ch1cv.rs index 6ff40cd6e05cce678b21b2183428f70fbac65e62..d9733b4bcad5049429441e77fe70c100ff397f62 100644 --- a/src/timer1/ch1cv.rs +++ b/src/timer1/ch1cv.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH1CV { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH1VALR { - bits: u16, -} -impl CH1VALR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CH1VALW<'a> { +#[doc = "Reader of register CH1CV"] +pub type R = crate::R; +#[doc = "Writer for register CH1CV"] +pub type W = crate::W; +#[doc = "Register CH1CV `reset()`'s with value 0"] +impl crate::ResetValue for super::CH1CV { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH1VAL`"] +pub type CH1VAL_R = crate::R; +#[doc = "Write proxy for field `CH1VAL`"] +pub struct CH1VAL_W<'a> { w: &'a mut W, } -impl<'a> _CH1VALW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH1VAL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Capture or compare value of channel1"] - #[inline] - pub fn ch1val(&self) -> CH1VALR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CH1VALR { bits } + #[inline(always)] + pub fn ch1val(&self) -> CH1VAL_R { + CH1VAL_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Capture or compare value of channel1"] - #[inline] - pub fn ch1val(&mut self) -> _CH1VALW { - _CH1VALW { w: self } + #[inline(always)] + pub fn ch1val(&mut self) -> CH1VAL_W { + CH1VAL_W { w: self } } } diff --git a/src/timer1/ch2cv.rs b/src/timer1/ch2cv.rs index 5bef5905d56f7a95c3137518aea47345e33beb50..5fd640d135c2666dd3561fba6c59331ae320ac70 100644 --- a/src/timer1/ch2cv.rs +++ b/src/timer1/ch2cv.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH2CV { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH2VALR { - bits: u16, -} -impl CH2VALR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CH2VALW<'a> { +#[doc = "Reader of register CH2CV"] +pub type R = crate::R; +#[doc = "Writer for register CH2CV"] +pub type W = crate::W; +#[doc = "Register CH2CV `reset()`'s with value 0"] +impl crate::ResetValue for super::CH2CV { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH2VAL`"] +pub type CH2VAL_R = crate::R; +#[doc = "Write proxy for field `CH2VAL`"] +pub struct CH2VAL_W<'a> { w: &'a mut W, } -impl<'a> _CH2VALW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH2VAL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Capture or compare value of channel 2"] - #[inline] - pub fn ch2val(&self) -> CH2VALR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CH2VALR { bits } + #[inline(always)] + pub fn ch2val(&self) -> CH2VAL_R { + CH2VAL_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Capture or compare value of channel 2"] - #[inline] - pub fn ch2val(&mut self) -> _CH2VALW { - _CH2VALW { w: self } + #[inline(always)] + pub fn ch2val(&mut self) -> CH2VAL_W { + CH2VAL_W { w: self } } } diff --git a/src/timer1/ch3cv.rs b/src/timer1/ch3cv.rs index c35e52b9d5e190f53e91924b1f086ce0a1132aa8..dc3d8306b23737aec1c89d0cf2b5dc4911c6631a 100644 --- a/src/timer1/ch3cv.rs +++ b/src/timer1/ch3cv.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CH3CV { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH3VALR { - bits: u16, -} -impl CH3VALR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CH3VALW<'a> { +#[doc = "Reader of register CH3CV"] +pub type R = crate::R; +#[doc = "Writer for register CH3CV"] +pub type W = crate::W; +#[doc = "Register CH3CV `reset()`'s with value 0"] +impl crate::ResetValue for super::CH3CV { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH3VAL`"] +pub type CH3VAL_R = crate::R; +#[doc = "Write proxy for field `CH3VAL`"] +pub struct CH3VAL_W<'a> { w: &'a mut W, } -impl<'a> _CH3VALW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH3VAL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Capture or compare value of channel 3"] - #[inline] - pub fn ch3val(&self) -> CH3VALR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - CH3VALR { bits } + #[inline(always)] + pub fn ch3val(&self) -> CH3VAL_R { + CH3VAL_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Capture or compare value of channel 3"] - #[inline] - pub fn ch3val(&mut self) -> _CH3VALW { - _CH3VALW { w: self } + #[inline(always)] + pub fn ch3val(&mut self) -> CH3VAL_W { + CH3VAL_W { w: self } } } diff --git a/src/timer1/chctl0_input.rs b/src/timer1/chctl0_input.rs index 09e7e377f9d74ecdfc2e99045637232b659170dd..6318b7a84ad6be6f708d5d0e908d9ec94b37ce67 100644 --- a/src/timer1/chctl0_input.rs +++ b/src/timer1/chctl0_input.rs @@ -1,310 +1,160 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CHCTL0_INPUT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH1CAPFLTR { - bits: u8, -} -impl CH1CAPFLTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH1CAPPSCR { - bits: u8, -} -impl CH1CAPPSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH1MSR { - bits: u8, -} -impl CH1MSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH0CAPFLTR { - bits: u8, -} -impl CH0CAPFLTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH0CAPPSCR { - bits: u8, -} -impl CH0CAPPSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH0MSR { - bits: u8, -} -impl CH0MSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CH1CAPFLTW<'a> { +#[doc = "Reader of register CHCTL0_Input"] +pub type R = crate::R; +#[doc = "Writer for register CHCTL0_Input"] +pub type W = crate::W; +#[doc = "Register CHCTL0_Input `reset()`'s with value 0"] +impl crate::ResetValue for super::CHCTL0_INPUT { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH1CAPFLT`"] +pub type CH1CAPFLT_R = crate::R; +#[doc = "Write proxy for field `CH1CAPFLT`"] +pub struct CH1CAPFLT_W<'a> { w: &'a mut W, } -impl<'a> _CH1CAPFLTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH1CAPFLT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 12)) | (((value as u16) & 0x0f) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CH1CAPPSCW<'a> { +#[doc = "Reader of field `CH1CAPPSC`"] +pub type CH1CAPPSC_R = crate::R; +#[doc = "Write proxy for field `CH1CAPPSC`"] +pub struct CH1CAPPSC_W<'a> { w: &'a mut W, } -impl<'a> _CH1CAPPSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH1CAPPSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u16) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _CH1MSW<'a> { +#[doc = "Reader of field `CH1MS`"] +pub type CH1MS_R = crate::R; +#[doc = "Write proxy for field `CH1MS`"] +pub struct CH1MS_W<'a> { w: &'a mut W, } -impl<'a> _CH1MSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH1MS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u16) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _CH0CAPFLTW<'a> { +#[doc = "Reader of field `CH0CAPFLT`"] +pub type CH0CAPFLT_R = crate::R; +#[doc = "Write proxy for field `CH0CAPFLT`"] +pub struct CH0CAPFLT_W<'a> { w: &'a mut W, } -impl<'a> _CH0CAPFLTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH0CAPFLT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 4)) | (((value as u16) & 0x0f) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CH0CAPPSCW<'a> { +#[doc = "Reader of field `CH0CAPPSC`"] +pub type CH0CAPPSC_R = crate::R; +#[doc = "Write proxy for field `CH0CAPPSC`"] +pub struct CH0CAPPSC_W<'a> { w: &'a mut W, } -impl<'a> _CH0CAPPSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH0CAPPSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 2)) | (((value as u16) & 0x03) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CH0MSW<'a> { +#[doc = "Reader of field `CH0MS`"] +pub type CH0MS_R = crate::R; +#[doc = "Write proxy for field `CH0MS`"] +pub struct CH0MS_W<'a> { w: &'a mut W, } -impl<'a> _CH0MSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH0MS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x03) | ((value as u16) & 0x03); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 12:15 - Channel 1 input capture filter control"] - #[inline] - pub fn ch1capflt(&self) -> CH1CAPFLTR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH1CAPFLTR { bits } + #[inline(always)] + pub fn ch1capflt(&self) -> CH1CAPFLT_R { + CH1CAPFLT_R::new(((self.bits >> 12) & 0x0f) as u8) } #[doc = "Bits 10:11 - Channel 1 input capture prescaler"] - #[inline] - pub fn ch1cappsc(&self) -> CH1CAPPSCR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH1CAPPSCR { bits } + #[inline(always)] + pub fn ch1cappsc(&self) -> CH1CAPPSC_R { + CH1CAPPSC_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 8:9 - Channel 1 mode selection"] - #[inline] - pub fn ch1ms(&self) -> CH1MSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH1MSR { bits } + #[inline(always)] + pub fn ch1ms(&self) -> CH1MS_R { + CH1MS_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 4:7 - Channel 0 input capture filter control"] - #[inline] - pub fn ch0capflt(&self) -> CH0CAPFLTR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH0CAPFLTR { bits } + #[inline(always)] + pub fn ch0capflt(&self) -> CH0CAPFLT_R { + CH0CAPFLT_R::new(((self.bits >> 4) & 0x0f) as u8) } #[doc = "Bits 2:3 - Channel 0 input capture prescaler"] - #[inline] - pub fn ch0cappsc(&self) -> CH0CAPPSCR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH0CAPPSCR { bits } + #[inline(always)] + pub fn ch0cappsc(&self) -> CH0CAPPSC_R { + CH0CAPPSC_R::new(((self.bits >> 2) & 0x03) as u8) } #[doc = "Bits 0:1 - Channel 0 mode selection"] - #[inline] - pub fn ch0ms(&self) -> CH0MSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH0MSR { bits } + #[inline(always)] + pub fn ch0ms(&self) -> CH0MS_R { + CH0MS_R::new((self.bits & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 12:15 - Channel 1 input capture filter control"] - #[inline] - pub fn ch1capflt(&mut self) -> _CH1CAPFLTW { - _CH1CAPFLTW { w: self } + #[inline(always)] + pub fn ch1capflt(&mut self) -> CH1CAPFLT_W { + CH1CAPFLT_W { w: self } } #[doc = "Bits 10:11 - Channel 1 input capture prescaler"] - #[inline] - pub fn ch1cappsc(&mut self) -> _CH1CAPPSCW { - _CH1CAPPSCW { w: self } + #[inline(always)] + pub fn ch1cappsc(&mut self) -> CH1CAPPSC_W { + CH1CAPPSC_W { w: self } } #[doc = "Bits 8:9 - Channel 1 mode selection"] - #[inline] - pub fn ch1ms(&mut self) -> _CH1MSW { - _CH1MSW { w: self } + #[inline(always)] + pub fn ch1ms(&mut self) -> CH1MS_W { + CH1MS_W { w: self } } #[doc = "Bits 4:7 - Channel 0 input capture filter control"] - #[inline] - pub fn ch0capflt(&mut self) -> _CH0CAPFLTW { - _CH0CAPFLTW { w: self } + #[inline(always)] + pub fn ch0capflt(&mut self) -> CH0CAPFLT_W { + CH0CAPFLT_W { w: self } } #[doc = "Bits 2:3 - Channel 0 input capture prescaler"] - #[inline] - pub fn ch0cappsc(&mut self) -> _CH0CAPPSCW { - _CH0CAPPSCW { w: self } + #[inline(always)] + pub fn ch0cappsc(&mut self) -> CH0CAPPSC_W { + CH0CAPPSC_W { w: self } } #[doc = "Bits 0:1 - Channel 0 mode selection"] - #[inline] - pub fn ch0ms(&mut self) -> _CH0MSW { - _CH0MSW { w: self } + #[inline(always)] + pub fn ch0ms(&mut self) -> CH0MS_W { + CH0MS_W { w: self } } } diff --git a/src/timer1/chctl0_output.rs b/src/timer1/chctl0_output.rs index 26862fdc75e5096b63d8ecf091403b5306abf632..a610b1ef678638af991b06ca6db8057164b1ae3d 100644 --- a/src/timer1/chctl0_output.rs +++ b/src/timer1/chctl0_output.rs @@ -1,582 +1,316 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CHCTL0_OUTPUT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH1COMCENR { - bits: bool, -} -impl CH1COMCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1COMCTLR { - bits: u8, -} -impl CH1COMCTLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH1COMSENR { - bits: bool, -} -impl CH1COMSENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1COMFENR { - bits: bool, -} -impl CH1COMFENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1MSR { - bits: u8, -} -impl CH1MSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH0COMCENR { - bits: bool, -} -impl CH0COMCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0COMCTLR { - bits: u8, -} -impl CH0COMCTLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH0COMSENR { - bits: bool, -} -impl CH0COMSENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0COMFENR { - bits: bool, -} -impl CH0COMFENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0MSR { - bits: u8, -} -impl CH0MSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CH1COMCENW<'a> { +#[doc = "Reader of register CHCTL0_Output"] +pub type R = crate::R; +#[doc = "Writer for register CHCTL0_Output"] +pub type W = crate::W; +#[doc = "Register CHCTL0_Output `reset()`'s with value 0"] +impl crate::ResetValue for super::CHCTL0_OUTPUT { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH1COMCEN`"] +pub type CH1COMCEN_R = crate::R; +#[doc = "Write proxy for field `CH1COMCEN`"] +pub struct CH1COMCEN_W<'a> { w: &'a mut W, } -impl<'a> _CH1COMCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1COMCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u16) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _CH1COMCTLW<'a> { +#[doc = "Reader of field `CH1COMCTL`"] +pub type CH1COMCTL_R = crate::R; +#[doc = "Write proxy for field `CH1COMCTL`"] +pub struct CH1COMCTL_W<'a> { w: &'a mut W, } -impl<'a> _CH1COMCTLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH1COMCTL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 12)) | (((value as u16) & 0x07) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CH1COMSENW<'a> { +#[doc = "Reader of field `CH1COMSEN`"] +pub type CH1COMSEN_R = crate::R; +#[doc = "Write proxy for field `CH1COMSEN`"] +pub struct CH1COMSEN_W<'a> { w: &'a mut W, } -impl<'a> _CH1COMSENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1COMSEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u16) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _CH1COMFENW<'a> { +#[doc = "Reader of field `CH1COMFEN`"] +pub type CH1COMFEN_R = crate::R; +#[doc = "Write proxy for field `CH1COMFEN`"] +pub struct CH1COMFEN_W<'a> { w: &'a mut W, } -impl<'a> _CH1COMFENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1COMFEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u16) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _CH1MSW<'a> { +#[doc = "Reader of field `CH1MS`"] +pub type CH1MS_R = crate::R; +#[doc = "Write proxy for field `CH1MS`"] +pub struct CH1MS_W<'a> { w: &'a mut W, } -impl<'a> _CH1MSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH1MS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u16) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _CH0COMCENW<'a> { +#[doc = "Reader of field `CH0COMCEN`"] +pub type CH0COMCEN_R = crate::R; +#[doc = "Write proxy for field `CH0COMCEN`"] +pub struct CH0COMCEN_W<'a> { w: &'a mut W, } -impl<'a> _CH0COMCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0COMCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _CH0COMCTLW<'a> { +#[doc = "Reader of field `CH0COMCTL`"] +pub type CH0COMCTL_R = crate::R; +#[doc = "Write proxy for field `CH0COMCTL`"] +pub struct CH0COMCTL_W<'a> { w: &'a mut W, } -impl<'a> _CH0COMCTLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH0COMCTL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 4)) | (((value as u16) & 0x07) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CH0COMSENW<'a> { +#[doc = "Reader of field `CH0COMSEN`"] +pub type CH0COMSEN_R = crate::R; +#[doc = "Write proxy for field `CH0COMSEN`"] +pub struct CH0COMSEN_W<'a> { w: &'a mut W, } -impl<'a> _CH0COMSENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0COMSEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _CH0COMFENW<'a> { +#[doc = "Reader of field `CH0COMFEN`"] +pub type CH0COMFEN_R = crate::R; +#[doc = "Write proxy for field `CH0COMFEN`"] +pub struct CH0COMFEN_W<'a> { w: &'a mut W, } -impl<'a> _CH0COMFENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0COMFEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CH0MSW<'a> { +#[doc = "Reader of field `CH0MS`"] +pub type CH0MS_R = crate::R; +#[doc = "Write proxy for field `CH0MS`"] +pub struct CH0MS_W<'a> { w: &'a mut W, } -impl<'a> _CH0MSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH0MS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x03) | ((value as u16) & 0x03); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 15 - Channel 1 output compare clear enable"] - #[inline] - pub fn ch1comcen(&self) -> CH1COMCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1COMCENR { bits } + #[inline(always)] + pub fn ch1comcen(&self) -> CH1COMCEN_R { + CH1COMCEN_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bits 12:14 - Channel 1 compare output control"] - #[inline] - pub fn ch1comctl(&self) -> CH1COMCTLR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH1COMCTLR { bits } + #[inline(always)] + pub fn ch1comctl(&self) -> CH1COMCTL_R { + CH1COMCTL_R::new(((self.bits >> 12) & 0x07) as u8) } #[doc = "Bit 11 - Channel 1 output compare shadow enable"] - #[inline] - pub fn ch1comsen(&self) -> CH1COMSENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1COMSENR { bits } + #[inline(always)] + pub fn ch1comsen(&self) -> CH1COMSEN_R { + CH1COMSEN_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Channel 1 output compare fast enable"] - #[inline] - pub fn ch1comfen(&self) -> CH1COMFENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1COMFENR { bits } + #[inline(always)] + pub fn ch1comfen(&self) -> CH1COMFEN_R { + CH1COMFEN_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bits 8:9 - Channel 1 mode selection"] - #[inline] - pub fn ch1ms(&self) -> CH1MSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH1MSR { bits } + #[inline(always)] + pub fn ch1ms(&self) -> CH1MS_R { + CH1MS_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bit 7 - Channel 0 output compare clear enable"] - #[inline] - pub fn ch0comcen(&self) -> CH0COMCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0COMCENR { bits } + #[inline(always)] + pub fn ch0comcen(&self) -> CH0COMCEN_R { + CH0COMCEN_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 4:6 - Channel 0 compare output control"] - #[inline] - pub fn ch0comctl(&self) -> CH0COMCTLR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH0COMCTLR { bits } + #[inline(always)] + pub fn ch0comctl(&self) -> CH0COMCTL_R { + CH0COMCTL_R::new(((self.bits >> 4) & 0x07) as u8) } #[doc = "Bit 3 - Channel 0 compare output shadow enable"] - #[inline] - pub fn ch0comsen(&self) -> CH0COMSENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0COMSENR { bits } + #[inline(always)] + pub fn ch0comsen(&self) -> CH0COMSEN_R { + CH0COMSEN_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Channel 0 output compare fast enable"] - #[inline] - pub fn ch0comfen(&self) -> CH0COMFENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0COMFENR { bits } + #[inline(always)] + pub fn ch0comfen(&self) -> CH0COMFEN_R { + CH0COMFEN_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bits 0:1 - Channel 0 I/O mode selection"] - #[inline] - pub fn ch0ms(&self) -> CH0MSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH0MSR { bits } + #[inline(always)] + pub fn ch0ms(&self) -> CH0MS_R { + CH0MS_R::new((self.bits & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 15 - Channel 1 output compare clear enable"] - #[inline] - pub fn ch1comcen(&mut self) -> _CH1COMCENW { - _CH1COMCENW { w: self } + #[inline(always)] + pub fn ch1comcen(&mut self) -> CH1COMCEN_W { + CH1COMCEN_W { w: self } } #[doc = "Bits 12:14 - Channel 1 compare output control"] - #[inline] - pub fn ch1comctl(&mut self) -> _CH1COMCTLW { - _CH1COMCTLW { w: self } + #[inline(always)] + pub fn ch1comctl(&mut self) -> CH1COMCTL_W { + CH1COMCTL_W { w: self } } #[doc = "Bit 11 - Channel 1 output compare shadow enable"] - #[inline] - pub fn ch1comsen(&mut self) -> _CH1COMSENW { - _CH1COMSENW { w: self } + #[inline(always)] + pub fn ch1comsen(&mut self) -> CH1COMSEN_W { + CH1COMSEN_W { w: self } } #[doc = "Bit 10 - Channel 1 output compare fast enable"] - #[inline] - pub fn ch1comfen(&mut self) -> _CH1COMFENW { - _CH1COMFENW { w: self } + #[inline(always)] + pub fn ch1comfen(&mut self) -> CH1COMFEN_W { + CH1COMFEN_W { w: self } } #[doc = "Bits 8:9 - Channel 1 mode selection"] - #[inline] - pub fn ch1ms(&mut self) -> _CH1MSW { - _CH1MSW { w: self } + #[inline(always)] + pub fn ch1ms(&mut self) -> CH1MS_W { + CH1MS_W { w: self } } #[doc = "Bit 7 - Channel 0 output compare clear enable"] - #[inline] - pub fn ch0comcen(&mut self) -> _CH0COMCENW { - _CH0COMCENW { w: self } + #[inline(always)] + pub fn ch0comcen(&mut self) -> CH0COMCEN_W { + CH0COMCEN_W { w: self } } #[doc = "Bits 4:6 - Channel 0 compare output control"] - #[inline] - pub fn ch0comctl(&mut self) -> _CH0COMCTLW { - _CH0COMCTLW { w: self } + #[inline(always)] + pub fn ch0comctl(&mut self) -> CH0COMCTL_W { + CH0COMCTL_W { w: self } } #[doc = "Bit 3 - Channel 0 compare output shadow enable"] - #[inline] - pub fn ch0comsen(&mut self) -> _CH0COMSENW { - _CH0COMSENW { w: self } + #[inline(always)] + pub fn ch0comsen(&mut self) -> CH0COMSEN_W { + CH0COMSEN_W { w: self } } #[doc = "Bit 2 - Channel 0 output compare fast enable"] - #[inline] - pub fn ch0comfen(&mut self) -> _CH0COMFENW { - _CH0COMFENW { w: self } + #[inline(always)] + pub fn ch0comfen(&mut self) -> CH0COMFEN_W { + CH0COMFEN_W { w: self } } #[doc = "Bits 0:1 - Channel 0 I/O mode selection"] - #[inline] - pub fn ch0ms(&mut self) -> _CH0MSW { - _CH0MSW { w: self } + #[inline(always)] + pub fn ch0ms(&mut self) -> CH0MS_W { + CH0MS_W { w: self } } } diff --git a/src/timer1/chctl1_input.rs b/src/timer1/chctl1_input.rs index 8485d2f9f9d4315f6d2d541ef2ab36e37fba2bce..22f1cd1538c2a19dc7117749aee6fc11a8512ecf 100644 --- a/src/timer1/chctl1_input.rs +++ b/src/timer1/chctl1_input.rs @@ -1,310 +1,160 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CHCTL1_INPUT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH3CAPFLTR { - bits: u8, -} -impl CH3CAPFLTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH3CAPPSCR { - bits: u8, -} -impl CH3CAPPSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH3MSR { - bits: u8, -} -impl CH3MSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH2CAPFLTR { - bits: u8, -} -impl CH2CAPFLTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH2CAPPSCR { - bits: u8, -} -impl CH2CAPPSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH2MSR { - bits: u8, -} -impl CH2MSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CH3CAPFLTW<'a> { +#[doc = "Reader of register CHCTL1_Input"] +pub type R = crate::R; +#[doc = "Writer for register CHCTL1_Input"] +pub type W = crate::W; +#[doc = "Register CHCTL1_Input `reset()`'s with value 0"] +impl crate::ResetValue for super::CHCTL1_INPUT { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH3CAPFLT`"] +pub type CH3CAPFLT_R = crate::R; +#[doc = "Write proxy for field `CH3CAPFLT`"] +pub struct CH3CAPFLT_W<'a> { w: &'a mut W, } -impl<'a> _CH3CAPFLTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH3CAPFLT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 12)) | (((value as u16) & 0x0f) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CH3CAPPSCW<'a> { +#[doc = "Reader of field `CH3CAPPSC`"] +pub type CH3CAPPSC_R = crate::R; +#[doc = "Write proxy for field `CH3CAPPSC`"] +pub struct CH3CAPPSC_W<'a> { w: &'a mut W, } -impl<'a> _CH3CAPPSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH3CAPPSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 10)) | (((value as u16) & 0x03) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _CH3MSW<'a> { +#[doc = "Reader of field `CH3MS`"] +pub type CH3MS_R = crate::R; +#[doc = "Write proxy for field `CH3MS`"] +pub struct CH3MS_W<'a> { w: &'a mut W, } -impl<'a> _CH3MSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH3MS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u16) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _CH2CAPFLTW<'a> { +#[doc = "Reader of field `CH2CAPFLT`"] +pub type CH2CAPFLT_R = crate::R; +#[doc = "Write proxy for field `CH2CAPFLT`"] +pub struct CH2CAPFLT_W<'a> { w: &'a mut W, } -impl<'a> _CH2CAPFLTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH2CAPFLT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 4)) | (((value as u16) & 0x0f) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CH2CAPPSCW<'a> { +#[doc = "Reader of field `CH2CAPPSC`"] +pub type CH2CAPPSC_R = crate::R; +#[doc = "Write proxy for field `CH2CAPPSC`"] +pub struct CH2CAPPSC_W<'a> { w: &'a mut W, } -impl<'a> _CH2CAPPSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH2CAPPSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 2)) | (((value as u16) & 0x03) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CH2MSW<'a> { +#[doc = "Reader of field `CH2MS`"] +pub type CH2MS_R = crate::R; +#[doc = "Write proxy for field `CH2MS`"] +pub struct CH2MS_W<'a> { w: &'a mut W, } -impl<'a> _CH2MSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH2MS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x03) | ((value as u16) & 0x03); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 12:15 - Channel 3 input capture filter control"] - #[inline] - pub fn ch3capflt(&self) -> CH3CAPFLTR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH3CAPFLTR { bits } + #[inline(always)] + pub fn ch3capflt(&self) -> CH3CAPFLT_R { + CH3CAPFLT_R::new(((self.bits >> 12) & 0x0f) as u8) } #[doc = "Bits 10:11 - Channel 3 input capture prescaler"] - #[inline] - pub fn ch3cappsc(&self) -> CH3CAPPSCR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH3CAPPSCR { bits } + #[inline(always)] + pub fn ch3cappsc(&self) -> CH3CAPPSC_R { + CH3CAPPSC_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bits 8:9 - Channel 3 mode selection"] - #[inline] - pub fn ch3ms(&self) -> CH3MSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH3MSR { bits } + #[inline(always)] + pub fn ch3ms(&self) -> CH3MS_R { + CH3MS_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bits 4:7 - Channel 2 input capture filter control"] - #[inline] - pub fn ch2capflt(&self) -> CH2CAPFLTR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH2CAPFLTR { bits } + #[inline(always)] + pub fn ch2capflt(&self) -> CH2CAPFLT_R { + CH2CAPFLT_R::new(((self.bits >> 4) & 0x0f) as u8) } #[doc = "Bits 2:3 - Channel 2 input capture prescaler"] - #[inline] - pub fn ch2cappsc(&self) -> CH2CAPPSCR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH2CAPPSCR { bits } + #[inline(always)] + pub fn ch2cappsc(&self) -> CH2CAPPSC_R { + CH2CAPPSC_R::new(((self.bits >> 2) & 0x03) as u8) } #[doc = "Bits 0:1 - Channel 2 mode selection"] - #[inline] - pub fn ch2ms(&self) -> CH2MSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH2MSR { bits } + #[inline(always)] + pub fn ch2ms(&self) -> CH2MS_R { + CH2MS_R::new((self.bits & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 12:15 - Channel 3 input capture filter control"] - #[inline] - pub fn ch3capflt(&mut self) -> _CH3CAPFLTW { - _CH3CAPFLTW { w: self } + #[inline(always)] + pub fn ch3capflt(&mut self) -> CH3CAPFLT_W { + CH3CAPFLT_W { w: self } } #[doc = "Bits 10:11 - Channel 3 input capture prescaler"] - #[inline] - pub fn ch3cappsc(&mut self) -> _CH3CAPPSCW { - _CH3CAPPSCW { w: self } + #[inline(always)] + pub fn ch3cappsc(&mut self) -> CH3CAPPSC_W { + CH3CAPPSC_W { w: self } } #[doc = "Bits 8:9 - Channel 3 mode selection"] - #[inline] - pub fn ch3ms(&mut self) -> _CH3MSW { - _CH3MSW { w: self } + #[inline(always)] + pub fn ch3ms(&mut self) -> CH3MS_W { + CH3MS_W { w: self } } #[doc = "Bits 4:7 - Channel 2 input capture filter control"] - #[inline] - pub fn ch2capflt(&mut self) -> _CH2CAPFLTW { - _CH2CAPFLTW { w: self } + #[inline(always)] + pub fn ch2capflt(&mut self) -> CH2CAPFLT_W { + CH2CAPFLT_W { w: self } } #[doc = "Bits 2:3 - Channel 2 input capture prescaler"] - #[inline] - pub fn ch2cappsc(&mut self) -> _CH2CAPPSCW { - _CH2CAPPSCW { w: self } + #[inline(always)] + pub fn ch2cappsc(&mut self) -> CH2CAPPSC_W { + CH2CAPPSC_W { w: self } } #[doc = "Bits 0:1 - Channel 2 mode selection"] - #[inline] - pub fn ch2ms(&mut self) -> _CH2MSW { - _CH2MSW { w: self } + #[inline(always)] + pub fn ch2ms(&mut self) -> CH2MS_W { + CH2MS_W { w: self } } } diff --git a/src/timer1/chctl1_output.rs b/src/timer1/chctl1_output.rs index 877629add0a404f5cce96b360d40b7c5c81699d6..41f9501b24cce209a2dc053dcd0d29de4b20b0ba 100644 --- a/src/timer1/chctl1_output.rs +++ b/src/timer1/chctl1_output.rs @@ -1,582 +1,316 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CHCTL1_OUTPUT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH3COMCENR { - bits: bool, -} -impl CH3COMCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH3COMCTLR { - bits: u8, -} -impl CH3COMCTLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH3COMSENR { - bits: bool, -} -impl CH3COMSENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH3COMFENR { - bits: bool, -} -impl CH3COMFENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH3MSR { - bits: u8, -} -impl CH3MSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH2COMCENR { - bits: bool, -} -impl CH2COMCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2COMCTLR { - bits: u8, -} -impl CH2COMCTLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CH2COMSENR { - bits: bool, -} -impl CH2COMSENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2COMFENR { - bits: bool, -} -impl CH2COMFENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2MSR { - bits: u8, -} -impl CH2MSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CH3COMCENW<'a> { +#[doc = "Reader of register CHCTL1_Output"] +pub type R = crate::R; +#[doc = "Writer for register CHCTL1_Output"] +pub type W = crate::W; +#[doc = "Register CHCTL1_Output `reset()`'s with value 0"] +impl crate::ResetValue for super::CHCTL1_OUTPUT { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH3COMCEN`"] +pub type CH3COMCEN_R = crate::R; +#[doc = "Write proxy for field `CH3COMCEN`"] +pub struct CH3COMCEN_W<'a> { w: &'a mut W, } -impl<'a> _CH3COMCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3COMCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u16) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _CH3COMCTLW<'a> { +#[doc = "Reader of field `CH3COMCTL`"] +pub type CH3COMCTL_R = crate::R; +#[doc = "Write proxy for field `CH3COMCTL`"] +pub struct CH3COMCTL_W<'a> { w: &'a mut W, } -impl<'a> _CH3COMCTLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH3COMCTL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 12)) | (((value as u16) & 0x07) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CH3COMSENW<'a> { +#[doc = "Reader of field `CH3COMSEN`"] +pub type CH3COMSEN_R = crate::R; +#[doc = "Write proxy for field `CH3COMSEN`"] +pub struct CH3COMSEN_W<'a> { w: &'a mut W, } -impl<'a> _CH3COMSENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3COMSEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u16) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _CH3COMFENW<'a> { +#[doc = "Reader of field `CH3COMFEN`"] +pub type CH3COMFEN_R = crate::R; +#[doc = "Write proxy for field `CH3COMFEN`"] +pub struct CH3COMFEN_W<'a> { w: &'a mut W, } -impl<'a> _CH3COMFENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3COMFEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u16) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _CH3MSW<'a> { +#[doc = "Reader of field `CH3MS`"] +pub type CH3MS_R = crate::R; +#[doc = "Write proxy for field `CH3MS`"] +pub struct CH3MS_W<'a> { w: &'a mut W, } -impl<'a> _CH3MSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH3MS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u16) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _CH2COMCENW<'a> { +#[doc = "Reader of field `CH2COMCEN`"] +pub type CH2COMCEN_R = crate::R; +#[doc = "Write proxy for field `CH2COMCEN`"] +pub struct CH2COMCEN_W<'a> { w: &'a mut W, } -impl<'a> _CH2COMCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2COMCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _CH2COMCTLW<'a> { +#[doc = "Reader of field `CH2COMCTL`"] +pub type CH2COMCTL_R = crate::R; +#[doc = "Write proxy for field `CH2COMCTL`"] +pub struct CH2COMCTL_W<'a> { w: &'a mut W, } -impl<'a> _CH2COMCTLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH2COMCTL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 4)) | (((value as u16) & 0x07) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CH2COMSENW<'a> { +#[doc = "Reader of field `CH2COMSEN`"] +pub type CH2COMSEN_R = crate::R; +#[doc = "Write proxy for field `CH2COMSEN`"] +pub struct CH2COMSEN_W<'a> { w: &'a mut W, } -impl<'a> _CH2COMSENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2COMSEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _CH2COMFENW<'a> { +#[doc = "Reader of field `CH2COMFEN`"] +pub type CH2COMFEN_R = crate::R; +#[doc = "Write proxy for field `CH2COMFEN`"] +pub struct CH2COMFEN_W<'a> { w: &'a mut W, } -impl<'a> _CH2COMFENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2COMFEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CH2MSW<'a> { +#[doc = "Reader of field `CH2MS`"] +pub type CH2MS_R = crate::R; +#[doc = "Write proxy for field `CH2MS`"] +pub struct CH2MS_W<'a> { w: &'a mut W, } -impl<'a> _CH2MSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CH2MS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x03) | ((value as u16) & 0x03); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 15 - Channel 3 output compare clear enable"] - #[inline] - pub fn ch3comcen(&self) -> CH3COMCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3COMCENR { bits } + #[inline(always)] + pub fn ch3comcen(&self) -> CH3COMCEN_R { + CH3COMCEN_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bits 12:14 - Channel 3 compare output control"] - #[inline] - pub fn ch3comctl(&self) -> CH3COMCTLR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH3COMCTLR { bits } + #[inline(always)] + pub fn ch3comctl(&self) -> CH3COMCTL_R { + CH3COMCTL_R::new(((self.bits >> 12) & 0x07) as u8) } #[doc = "Bit 11 - Channel 3 output compare shadow enable"] - #[inline] - pub fn ch3comsen(&self) -> CH3COMSENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3COMSENR { bits } + #[inline(always)] + pub fn ch3comsen(&self) -> CH3COMSEN_R { + CH3COMSEN_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Channel 3 output compare fast enable"] - #[inline] - pub fn ch3comfen(&self) -> CH3COMFENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3COMFENR { bits } + #[inline(always)] + pub fn ch3comfen(&self) -> CH3COMFEN_R { + CH3COMFEN_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bits 8:9 - Channel 3 mode selection"] - #[inline] - pub fn ch3ms(&self) -> CH3MSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH3MSR { bits } + #[inline(always)] + pub fn ch3ms(&self) -> CH3MS_R { + CH3MS_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bit 7 - Channel 2 output compare clear enable"] - #[inline] - pub fn ch2comcen(&self) -> CH2COMCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2COMCENR { bits } + #[inline(always)] + pub fn ch2comcen(&self) -> CH2COMCEN_R { + CH2COMCEN_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 4:6 - Channel 2 compare output control"] - #[inline] - pub fn ch2comctl(&self) -> CH2COMCTLR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH2COMCTLR { bits } + #[inline(always)] + pub fn ch2comctl(&self) -> CH2COMCTL_R { + CH2COMCTL_R::new(((self.bits >> 4) & 0x07) as u8) } #[doc = "Bit 3 - Channel 2 compare output shadow enable"] - #[inline] - pub fn ch2comsen(&self) -> CH2COMSENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2COMSENR { bits } + #[inline(always)] + pub fn ch2comsen(&self) -> CH2COMSEN_R { + CH2COMSEN_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Channel 2 output compare fast enable"] - #[inline] - pub fn ch2comfen(&self) -> CH2COMFENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2COMFENR { bits } + #[inline(always)] + pub fn ch2comfen(&self) -> CH2COMFEN_R { + CH2COMFEN_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bits 0:1 - Channel 2 I/O mode selection"] - #[inline] - pub fn ch2ms(&self) -> CH2MSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CH2MSR { bits } + #[inline(always)] + pub fn ch2ms(&self) -> CH2MS_R { + CH2MS_R::new((self.bits & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 15 - Channel 3 output compare clear enable"] - #[inline] - pub fn ch3comcen(&mut self) -> _CH3COMCENW { - _CH3COMCENW { w: self } + #[inline(always)] + pub fn ch3comcen(&mut self) -> CH3COMCEN_W { + CH3COMCEN_W { w: self } } #[doc = "Bits 12:14 - Channel 3 compare output control"] - #[inline] - pub fn ch3comctl(&mut self) -> _CH3COMCTLW { - _CH3COMCTLW { w: self } + #[inline(always)] + pub fn ch3comctl(&mut self) -> CH3COMCTL_W { + CH3COMCTL_W { w: self } } #[doc = "Bit 11 - Channel 3 output compare shadow enable"] - #[inline] - pub fn ch3comsen(&mut self) -> _CH3COMSENW { - _CH3COMSENW { w: self } + #[inline(always)] + pub fn ch3comsen(&mut self) -> CH3COMSEN_W { + CH3COMSEN_W { w: self } } #[doc = "Bit 10 - Channel 3 output compare fast enable"] - #[inline] - pub fn ch3comfen(&mut self) -> _CH3COMFENW { - _CH3COMFENW { w: self } + #[inline(always)] + pub fn ch3comfen(&mut self) -> CH3COMFEN_W { + CH3COMFEN_W { w: self } } #[doc = "Bits 8:9 - Channel 3 mode selection"] - #[inline] - pub fn ch3ms(&mut self) -> _CH3MSW { - _CH3MSW { w: self } + #[inline(always)] + pub fn ch3ms(&mut self) -> CH3MS_W { + CH3MS_W { w: self } } #[doc = "Bit 7 - Channel 2 output compare clear enable"] - #[inline] - pub fn ch2comcen(&mut self) -> _CH2COMCENW { - _CH2COMCENW { w: self } + #[inline(always)] + pub fn ch2comcen(&mut self) -> CH2COMCEN_W { + CH2COMCEN_W { w: self } } #[doc = "Bits 4:6 - Channel 2 compare output control"] - #[inline] - pub fn ch2comctl(&mut self) -> _CH2COMCTLW { - _CH2COMCTLW { w: self } + #[inline(always)] + pub fn ch2comctl(&mut self) -> CH2COMCTL_W { + CH2COMCTL_W { w: self } } #[doc = "Bit 3 - Channel 2 compare output shadow enable"] - #[inline] - pub fn ch2comsen(&mut self) -> _CH2COMSENW { - _CH2COMSENW { w: self } + #[inline(always)] + pub fn ch2comsen(&mut self) -> CH2COMSEN_W { + CH2COMSEN_W { w: self } } #[doc = "Bit 2 - Channel 2 output compare fast enable"] - #[inline] - pub fn ch2comfen(&mut self) -> _CH2COMFENW { - _CH2COMFENW { w: self } + #[inline(always)] + pub fn ch2comfen(&mut self) -> CH2COMFEN_W { + CH2COMFEN_W { w: self } } #[doc = "Bits 0:1 - Channel 2 I/O mode selection"] - #[inline] - pub fn ch2ms(&mut self) -> _CH2MSW { - _CH2MSW { w: self } + #[inline(always)] + pub fn ch2ms(&mut self) -> CH2MS_W { + CH2MS_W { w: self } } } diff --git a/src/timer1/chctl2.rs b/src/timer1/chctl2.rs index d749fc247b5563e552cd81130a481da5c63d0b58..efe06430e7a0e1dfe1da778e3b2bff7e85ac8112 100644 --- a/src/timer1/chctl2.rs +++ b/src/timer1/chctl2.rs @@ -1,536 +1,288 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CHCTL2 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH3PR { - bits: bool, -} -impl CH3PR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH3ENR { - bits: bool, -} -impl CH3ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2PR { - bits: bool, -} -impl CH2PR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2ENR { - bits: bool, -} -impl CH2ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1PR { - bits: bool, -} -impl CH1PR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1ENR { - bits: bool, -} -impl CH1ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0PR { - bits: bool, -} -impl CH0PR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0ENR { - bits: bool, -} -impl CH0ENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CH3PW<'a> { +#[doc = "Reader of register CHCTL2"] +pub type R = crate::R; +#[doc = "Writer for register CHCTL2"] +pub type W = crate::W; +#[doc = "Register CHCTL2 `reset()`'s with value 0"] +impl crate::ResetValue for super::CHCTL2 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH3P`"] +pub type CH3P_R = crate::R; +#[doc = "Write proxy for field `CH3P`"] +pub struct CH3P_W<'a> { w: &'a mut W, } -impl<'a> _CH3PW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3P_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u16) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _CH3ENW<'a> { +#[doc = "Reader of field `CH3EN`"] +pub type CH3EN_R = crate::R; +#[doc = "Write proxy for field `CH3EN`"] +pub struct CH3EN_W<'a> { w: &'a mut W, } -impl<'a> _CH3ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u16) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CH2PW<'a> { +#[doc = "Reader of field `CH2P`"] +pub type CH2P_R = crate::R; +#[doc = "Write proxy for field `CH2P`"] +pub struct CH2P_W<'a> { w: &'a mut W, } -impl<'a> _CH2PW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2P_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u16) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _CH2ENW<'a> { +#[doc = "Reader of field `CH2EN`"] +pub type CH2EN_R = crate::R; +#[doc = "Write proxy for field `CH2EN`"] +pub struct CH2EN_W<'a> { w: &'a mut W, } -impl<'a> _CH2ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u16) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _CH1PW<'a> { +#[doc = "Reader of field `CH1P`"] +pub type CH1P_R = crate::R; +#[doc = "Write proxy for field `CH1P`"] +pub struct CH1P_W<'a> { w: &'a mut W, } -impl<'a> _CH1PW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1P_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u16) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _CH1ENW<'a> { +#[doc = "Reader of field `CH1EN`"] +pub type CH1EN_R = crate::R; +#[doc = "Write proxy for field `CH1EN`"] +pub struct CH1EN_W<'a> { w: &'a mut W, } -impl<'a> _CH1ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u16) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CH0PW<'a> { +#[doc = "Reader of field `CH0P`"] +pub type CH0P_R = crate::R; +#[doc = "Write proxy for field `CH0P`"] +pub struct CH0P_W<'a> { w: &'a mut W, } -impl<'a> _CH0PW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0P_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _CH0ENW<'a> { +#[doc = "Reader of field `CH0EN`"] +pub type CH0EN_R = crate::R; +#[doc = "Write proxy for field `CH0EN`"] +pub struct CH0EN_W<'a> { w: &'a mut W, } -impl<'a> _CH0ENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0EN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 13 - Channel 3 capture/compare function polarity"] - #[inline] - pub fn ch3p(&self) -> CH3PR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3PR { bits } + #[inline(always)] + pub fn ch3p(&self) -> CH3P_R { + CH3P_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - Channel 3 capture/compare function enable"] - #[inline] - pub fn ch3en(&self) -> CH3ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3ENR { bits } + #[inline(always)] + pub fn ch3en(&self) -> CH3EN_R { + CH3EN_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 9 - Channel 2 capture/compare function polarity"] - #[inline] - pub fn ch2p(&self) -> CH2PR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2PR { bits } + #[inline(always)] + pub fn ch2p(&self) -> CH2P_R { + CH2P_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Channel 2 capture/compare function enable"] - #[inline] - pub fn ch2en(&self) -> CH2ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2ENR { bits } + #[inline(always)] + pub fn ch2en(&self) -> CH2EN_R { + CH2EN_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 5 - Channel 1 capture/compare function polarity"] - #[inline] - pub fn ch1p(&self) -> CH1PR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1PR { bits } + #[inline(always)] + pub fn ch1p(&self) -> CH1P_R { + CH1P_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Channel 1 capture/compare function enable"] - #[inline] - pub fn ch1en(&self) -> CH1ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1ENR { bits } + #[inline(always)] + pub fn ch1en(&self) -> CH1EN_R { + CH1EN_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 1 - Channel 0 capture/compare function polarity"] - #[inline] - pub fn ch0p(&self) -> CH0PR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0PR { bits } + #[inline(always)] + pub fn ch0p(&self) -> CH0P_R { + CH0P_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Channel 0 capture/compare function enable"] - #[inline] - pub fn ch0en(&self) -> CH0ENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0ENR { bits } + #[inline(always)] + pub fn ch0en(&self) -> CH0EN_R { + CH0EN_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 13 - Channel 3 capture/compare function polarity"] - #[inline] - pub fn ch3p(&mut self) -> _CH3PW { - _CH3PW { w: self } + #[inline(always)] + pub fn ch3p(&mut self) -> CH3P_W { + CH3P_W { w: self } } #[doc = "Bit 12 - Channel 3 capture/compare function enable"] - #[inline] - pub fn ch3en(&mut self) -> _CH3ENW { - _CH3ENW { w: self } + #[inline(always)] + pub fn ch3en(&mut self) -> CH3EN_W { + CH3EN_W { w: self } } #[doc = "Bit 9 - Channel 2 capture/compare function polarity"] - #[inline] - pub fn ch2p(&mut self) -> _CH2PW { - _CH2PW { w: self } + #[inline(always)] + pub fn ch2p(&mut self) -> CH2P_W { + CH2P_W { w: self } } #[doc = "Bit 8 - Channel 2 capture/compare function enable"] - #[inline] - pub fn ch2en(&mut self) -> _CH2ENW { - _CH2ENW { w: self } + #[inline(always)] + pub fn ch2en(&mut self) -> CH2EN_W { + CH2EN_W { w: self } } #[doc = "Bit 5 - Channel 1 capture/compare function polarity"] - #[inline] - pub fn ch1p(&mut self) -> _CH1PW { - _CH1PW { w: self } + #[inline(always)] + pub fn ch1p(&mut self) -> CH1P_W { + CH1P_W { w: self } } #[doc = "Bit 4 - Channel 1 capture/compare function enable"] - #[inline] - pub fn ch1en(&mut self) -> _CH1ENW { - _CH1ENW { w: self } + #[inline(always)] + pub fn ch1en(&mut self) -> CH1EN_W { + CH1EN_W { w: self } } #[doc = "Bit 1 - Channel 0 capture/compare function polarity"] - #[inline] - pub fn ch0p(&mut self) -> _CH0PW { - _CH0PW { w: self } + #[inline(always)] + pub fn ch0p(&mut self) -> CH0P_W { + CH0P_W { w: self } } #[doc = "Bit 0 - Channel 0 capture/compare function enable"] - #[inline] - pub fn ch0en(&mut self) -> _CH0ENW { - _CH0ENW { w: self } + #[inline(always)] + pub fn ch0en(&mut self) -> CH0EN_W { + CH0EN_W { w: self } } } diff --git a/src/timer1/cnt.rs b/src/timer1/cnt.rs index 78e2250f04e5f10622204d6d84c27a70287aceb9..0204225f1f806952179cca530b1310c6371671b3 100644 --- a/src/timer1/cnt.rs +++ b/src/timer1/cnt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CNT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CNT"] +pub type R = crate::R; +#[doc = "Writer for register CNT"] +pub type W = crate::W; +#[doc = "Register CNT `reset()`'s with value 0"] +impl crate::ResetValue for super::CNT { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - counter value"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - counter value"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/timer1/ctl0.rs b/src/timer1/ctl0.rs index 0cdf96fa324f48a71f5738384309a4f3c16fa19e..4cc28789710bc74505c7ad2d7aea9b1ecbe99261 100644 --- a/src/timer1/ctl0.rs +++ b/src/timer1/ctl0.rs @@ -1,500 +1,268 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CTL0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CKDIVR { - bits: u8, -} -impl CKDIVR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ARSER { - bits: bool, -} -impl ARSER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CAMR { - bits: u8, -} -impl CAMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DIRR { - bits: bool, -} -impl DIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SPMR { - bits: bool, -} -impl SPMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UPSR { - bits: bool, -} -impl UPSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UPDISR { - bits: bool, -} -impl UPDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CENR { - bits: bool, -} -impl CENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CKDIVW<'a> { +#[doc = "Reader of register CTL0"] +pub type R = crate::R; +#[doc = "Writer for register CTL0"] +pub type W = crate::W; +#[doc = "Register CTL0 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL0 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CKDIV`"] +pub type CKDIV_R = crate::R; +#[doc = "Write proxy for field `CKDIV`"] +pub struct CKDIV_W<'a> { w: &'a mut W, } -impl<'a> _CKDIVW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CKDIV_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 8)) | (((value as u16) & 0x03) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _ARSEW<'a> { +#[doc = "Reader of field `ARSE`"] +pub type ARSE_R = crate::R; +#[doc = "Write proxy for field `ARSE`"] +pub struct ARSE_W<'a> { w: &'a mut W, } -impl<'a> _ARSEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ARSE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _CAMW<'a> { +#[doc = "Reader of field `CAM`"] +pub type CAM_R = crate::R; +#[doc = "Write proxy for field `CAM`"] +pub struct CAM_W<'a> { w: &'a mut W, } -impl<'a> _CAMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CAM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 5)) | (((value as u16) & 0x03) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _DIRW<'a> { +#[doc = "Reader of field `DIR`"] +pub type DIR_R = crate::R; +#[doc = "Write proxy for field `DIR`"] +pub struct DIR_W<'a> { w: &'a mut W, } -impl<'a> _DIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u16) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _SPMW<'a> { +#[doc = "Reader of field `SPM`"] +pub type SPM_R = crate::R; +#[doc = "Write proxy for field `SPM`"] +pub struct SPM_W<'a> { w: &'a mut W, } -impl<'a> _SPMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SPM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _UPSW<'a> { +#[doc = "Reader of field `UPS`"] +pub type UPS_R = crate::R; +#[doc = "Write proxy for field `UPS`"] +pub struct UPS_W<'a> { w: &'a mut W, } -impl<'a> _UPSW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _UPDISW<'a> { +#[doc = "Reader of field `UPDIS`"] +pub type UPDIS_R = crate::R; +#[doc = "Write proxy for field `UPDIS`"] +pub struct UPDIS_W<'a> { w: &'a mut W, } -impl<'a> _UPDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _CENW<'a> { +#[doc = "Reader of field `CEN`"] +pub type CEN_R = crate::R; +#[doc = "Write proxy for field `CEN`"] +pub struct CEN_W<'a> { w: &'a mut W, } -impl<'a> _CENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 8:9 - Clock division"] - #[inline] - pub fn ckdiv(&self) -> CKDIVR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CKDIVR { bits } + #[inline(always)] + pub fn ckdiv(&self) -> CKDIV_R { + CKDIV_R::new(((self.bits >> 8) & 0x03) as u8) } #[doc = "Bit 7 - Auto-reload shadow enable"] - #[inline] - pub fn arse(&self) -> ARSER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ARSER { bits } + #[inline(always)] + pub fn arse(&self) -> ARSE_R { + ARSE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 5:6 - Counter aligns mode selection"] - #[inline] - pub fn cam(&self) -> CAMR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - CAMR { bits } + #[inline(always)] + pub fn cam(&self) -> CAM_R { + CAM_R::new(((self.bits >> 5) & 0x03) as u8) } #[doc = "Bit 4 - Direction"] - #[inline] - pub fn dir(&self) -> DIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - DIRR { bits } + #[inline(always)] + pub fn dir(&self) -> DIR_R { + DIR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Single pulse mode"] - #[inline] - pub fn spm(&self) -> SPMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - SPMR { bits } + #[inline(always)] + pub fn spm(&self) -> SPM_R { + SPM_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Update source"] - #[inline] - pub fn ups(&self) -> UPSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - UPSR { bits } + #[inline(always)] + pub fn ups(&self) -> UPS_R { + UPS_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Update disable"] - #[inline] - pub fn updis(&self) -> UPDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - UPDISR { bits } + #[inline(always)] + pub fn updis(&self) -> UPDIS_R { + UPDIS_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Counter enable"] - #[inline] - pub fn cen(&self) -> CENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CENR { bits } + #[inline(always)] + pub fn cen(&self) -> CEN_R { + CEN_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 8:9 - Clock division"] - #[inline] - pub fn ckdiv(&mut self) -> _CKDIVW { - _CKDIVW { w: self } + #[inline(always)] + pub fn ckdiv(&mut self) -> CKDIV_W { + CKDIV_W { w: self } } #[doc = "Bit 7 - Auto-reload shadow enable"] - #[inline] - pub fn arse(&mut self) -> _ARSEW { - _ARSEW { w: self } + #[inline(always)] + pub fn arse(&mut self) -> ARSE_W { + ARSE_W { w: self } } #[doc = "Bits 5:6 - Counter aligns mode selection"] - #[inline] - pub fn cam(&mut self) -> _CAMW { - _CAMW { w: self } + #[inline(always)] + pub fn cam(&mut self) -> CAM_W { + CAM_W { w: self } } #[doc = "Bit 4 - Direction"] - #[inline] - pub fn dir(&mut self) -> _DIRW { - _DIRW { w: self } + #[inline(always)] + pub fn dir(&mut self) -> DIR_W { + DIR_W { w: self } } #[doc = "Bit 3 - Single pulse mode"] - #[inline] - pub fn spm(&mut self) -> _SPMW { - _SPMW { w: self } + #[inline(always)] + pub fn spm(&mut self) -> SPM_W { + SPM_W { w: self } } #[doc = "Bit 2 - Update source"] - #[inline] - pub fn ups(&mut self) -> _UPSW { - _UPSW { w: self } + #[inline(always)] + pub fn ups(&mut self) -> UPS_W { + UPS_W { w: self } } #[doc = "Bit 1 - Update disable"] - #[inline] - pub fn updis(&mut self) -> _UPDISW { - _UPDISW { w: self } + #[inline(always)] + pub fn updis(&mut self) -> UPDIS_W { + UPDIS_W { w: self } } #[doc = "Bit 0 - Counter enable"] - #[inline] - pub fn cen(&mut self) -> _CENW { - _CENW { w: self } + #[inline(always)] + pub fn cen(&mut self) -> CEN_W { + CEN_W { w: self } } } diff --git a/src/timer1/ctl1.rs b/src/timer1/ctl1.rs index 62f80bd506b4da326d6f854856108e0e2fe33cd4..b8454ee15462b97491c386ad88f5ba85b54a5ffd 100644 --- a/src/timer1/ctl1.rs +++ b/src/timer1/ctl1.rs @@ -1,223 +1,108 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CTL1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TI0SR { - bits: bool, -} -impl TI0SR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MMCR { - bits: u8, -} -impl MMCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DMASR { - bits: bool, -} -impl DMASR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TI0SW<'a> { +#[doc = "Reader of register CTL1"] +pub type R = crate::R; +#[doc = "Writer for register CTL1"] +pub type W = crate::W; +#[doc = "Register CTL1 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL1 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TI0S`"] +pub type TI0S_R = crate::R; +#[doc = "Write proxy for field `TI0S`"] +pub struct TI0S_W<'a> { w: &'a mut W, } -impl<'a> _TI0SW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TI0S_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _MMCW<'a> { +#[doc = "Reader of field `MMC`"] +pub type MMC_R = crate::R; +#[doc = "Write proxy for field `MMC`"] +pub struct MMC_W<'a> { w: &'a mut W, } -impl<'a> _MMCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MMC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 4)) | (((value as u16) & 0x07) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _DMASW<'a> { +#[doc = "Reader of field `DMAS`"] +pub type DMAS_R = crate::R; +#[doc = "Write proxy for field `DMAS`"] +pub struct DMAS_W<'a> { w: &'a mut W, } -impl<'a> _DMASW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DMAS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 7 - Channel 0 trigger input selection"] - #[inline] - pub fn ti0s(&self) -> TI0SR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TI0SR { bits } + #[inline(always)] + pub fn ti0s(&self) -> TI0S_R { + TI0S_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 4:6 - Master mode control"] - #[inline] - pub fn mmc(&self) -> MMCR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - MMCR { bits } + #[inline(always)] + pub fn mmc(&self) -> MMC_R { + MMC_R::new(((self.bits >> 4) & 0x07) as u8) } #[doc = "Bit 3 - DMA request source selection"] - #[inline] - pub fn dmas(&self) -> DMASR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - DMASR { bits } + #[inline(always)] + pub fn dmas(&self) -> DMAS_R { + DMAS_R::new(((self.bits >> 3) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 7 - Channel 0 trigger input selection"] - #[inline] - pub fn ti0s(&mut self) -> _TI0SW { - _TI0SW { w: self } + #[inline(always)] + pub fn ti0s(&mut self) -> TI0S_W { + TI0S_W { w: self } } #[doc = "Bits 4:6 - Master mode control"] - #[inline] - pub fn mmc(&mut self) -> _MMCW { - _MMCW { w: self } + #[inline(always)] + pub fn mmc(&mut self) -> MMC_W { + MMC_W { w: self } } #[doc = "Bit 3 - DMA request source selection"] - #[inline] - pub fn dmas(&mut self) -> _DMASW { - _DMASW { w: self } + #[inline(always)] + pub fn dmas(&mut self) -> DMAS_W { + DMAS_W { w: self } } } diff --git a/src/timer1/dmacfg.rs b/src/timer1/dmacfg.rs index bbaf6c8ac6295cd6476aa7225937e4c8b7fc151e..4419763c700ac03514437a8e064e37f27e313889 100644 --- a/src/timer1/dmacfg.rs +++ b/src/timer1/dmacfg.rs @@ -1,146 +1,64 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DMACFG { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DMATCR { - bits: u8, -} -impl DMATCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DMATAR { - bits: u8, -} -impl DMATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits +#[doc = "Reader of register DMACFG"] +pub type R = crate::R; +#[doc = "Writer for register DMACFG"] +pub type W = crate::W; +#[doc = "Register DMACFG `reset()`'s with value 0"] +impl crate::ResetValue for super::DMACFG { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _DMATCW<'a> { +#[doc = "Reader of field `DMATC`"] +pub type DMATC_R = crate::R; +#[doc = "Write proxy for field `DMATC`"] +pub struct DMATC_W<'a> { w: &'a mut W, } -impl<'a> _DMATCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DMATC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 8)) | (((value as u16) & 0x1f) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _DMATAW<'a> { +#[doc = "Reader of field `DMATA`"] +pub type DMATA_R = crate::R; +#[doc = "Write proxy for field `DMATA`"] +pub struct DMATA_W<'a> { w: &'a mut W, } -impl<'a> _DMATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DMATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x1f) | ((value as u16) & 0x1f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 8:12 - DMA transfer count"] - #[inline] - pub fn dmatc(&self) -> DMATCR { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - DMATCR { bits } + #[inline(always)] + pub fn dmatc(&self) -> DMATC_R { + DMATC_R::new(((self.bits >> 8) & 0x1f) as u8) } #[doc = "Bits 0:4 - DMA transfer access start address"] - #[inline] - pub fn dmata(&self) -> DMATAR { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - DMATAR { bits } + #[inline(always)] + pub fn dmata(&self) -> DMATA_R { + DMATA_R::new((self.bits & 0x1f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 8:12 - DMA transfer count"] - #[inline] - pub fn dmatc(&mut self) -> _DMATCW { - _DMATCW { w: self } + #[inline(always)] + pub fn dmatc(&mut self) -> DMATC_W { + DMATC_W { w: self } } #[doc = "Bits 0:4 - DMA transfer access start address"] - #[inline] - pub fn dmata(&mut self) -> _DMATAW { - _DMATAW { w: self } + #[inline(always)] + pub fn dmata(&mut self) -> DMATA_W { + DMATA_W { w: self } } } diff --git a/src/timer1/dmainten.rs b/src/timer1/dmainten.rs index 4f45ca055fa35f49762c1665f8c51e0867ee9591..f1160601399664a96d748a54b2d1f5c0095b69fc 100644 --- a/src/timer1/dmainten.rs +++ b/src/timer1/dmainten.rs @@ -1,772 +1,424 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DMAINTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TRGDENR { - bits: bool, -} -impl TRGDENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH3DENR { - bits: bool, -} -impl CH3DENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2DENR { - bits: bool, -} -impl CH2DENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1DENR { - bits: bool, -} -impl CH1DENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0DENR { - bits: bool, -} -impl CH0DENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UPDENR { - bits: bool, -} -impl UPDENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TRGIER { - bits: bool, -} -impl TRGIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH3IER { - bits: bool, -} -impl CH3IER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2IER { - bits: bool, -} -impl CH2IER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1IER { - bits: bool, -} -impl CH1IER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0IER { - bits: bool, -} -impl CH0IER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UPIER { - bits: bool, -} -impl UPIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TRGDENW<'a> { +#[doc = "Reader of register DMAINTEN"] +pub type R = crate::R; +#[doc = "Writer for register DMAINTEN"] +pub type W = crate::W; +#[doc = "Register DMAINTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::DMAINTEN { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TRGDEN`"] +pub type TRGDEN_R = crate::R; +#[doc = "Write proxy for field `TRGDEN`"] +pub struct TRGDEN_W<'a> { w: &'a mut W, } -impl<'a> _TRGDENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TRGDEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u16) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _CH3DENW<'a> { +#[doc = "Reader of field `CH3DEN`"] +pub type CH3DEN_R = crate::R; +#[doc = "Write proxy for field `CH3DEN`"] +pub struct CH3DEN_W<'a> { w: &'a mut W, } -impl<'a> _CH3DENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3DEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u16) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CH2DENW<'a> { +#[doc = "Reader of field `CH2DEN`"] +pub type CH2DEN_R = crate::R; +#[doc = "Write proxy for field `CH2DEN`"] +pub struct CH2DEN_W<'a> { w: &'a mut W, } -impl<'a> _CH2DENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2DEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u16) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _CH1DENW<'a> { +#[doc = "Reader of field `CH1DEN`"] +pub type CH1DEN_R = crate::R; +#[doc = "Write proxy for field `CH1DEN`"] +pub struct CH1DEN_W<'a> { w: &'a mut W, } -impl<'a> _CH1DENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1DEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u16) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _CH0DENW<'a> { +#[doc = "Reader of field `CH0DEN`"] +pub type CH0DEN_R = crate::R; +#[doc = "Write proxy for field `CH0DEN`"] +pub struct CH0DEN_W<'a> { w: &'a mut W, } -impl<'a> _CH0DENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0DEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u16) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _UPDENW<'a> { +#[doc = "Reader of field `UPDEN`"] +pub type UPDEN_R = crate::R; +#[doc = "Write proxy for field `UPDEN`"] +pub struct UPDEN_W<'a> { w: &'a mut W, } -impl<'a> _UPDENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPDEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u16) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _TRGIEW<'a> { +#[doc = "Reader of field `TRGIE`"] +pub type TRGIE_R = crate::R; +#[doc = "Write proxy for field `TRGIE`"] +pub struct TRGIE_W<'a> { w: &'a mut W, } -impl<'a> _TRGIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TRGIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u16) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _CH3IEW<'a> { +#[doc = "Reader of field `CH3IE`"] +pub type CH3IE_R = crate::R; +#[doc = "Write proxy for field `CH3IE`"] +pub struct CH3IE_W<'a> { w: &'a mut W, } -impl<'a> _CH3IEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3IE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u16) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CH2IEW<'a> { +#[doc = "Reader of field `CH2IE`"] +pub type CH2IE_R = crate::R; +#[doc = "Write proxy for field `CH2IE`"] +pub struct CH2IE_W<'a> { w: &'a mut W, } -impl<'a> _CH2IEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2IE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _CH1IEW<'a> { +#[doc = "Reader of field `CH1IE`"] +pub type CH1IE_R = crate::R; +#[doc = "Write proxy for field `CH1IE`"] +pub struct CH1IE_W<'a> { w: &'a mut W, } -impl<'a> _CH1IEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1IE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CH0IEW<'a> { +#[doc = "Reader of field `CH0IE`"] +pub type CH0IE_R = crate::R; +#[doc = "Write proxy for field `CH0IE`"] +pub struct CH0IE_W<'a> { w: &'a mut W, } -impl<'a> _CH0IEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0IE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _UPIEW<'a> { +#[doc = "Reader of field `UPIE`"] +pub type UPIE_R = crate::R; +#[doc = "Write proxy for field `UPIE`"] +pub struct UPIE_W<'a> { w: &'a mut W, } -impl<'a> _UPIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 14 - Trigger DMA request enable"] - #[inline] - pub fn trgden(&self) -> TRGDENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TRGDENR { bits } + #[inline(always)] + pub fn trgden(&self) -> TRGDEN_R { + TRGDEN_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 12 - Channel 3 capture/compare DMA request enable"] - #[inline] - pub fn ch3den(&self) -> CH3DENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3DENR { bits } + #[inline(always)] + pub fn ch3den(&self) -> CH3DEN_R { + CH3DEN_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Channel 2 capture/compare DMA request enable"] - #[inline] - pub fn ch2den(&self) -> CH2DENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2DENR { bits } + #[inline(always)] + pub fn ch2den(&self) -> CH2DEN_R { + CH2DEN_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Channel 1 capture/compare DMA request enable"] - #[inline] - pub fn ch1den(&self) -> CH1DENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1DENR { bits } + #[inline(always)] + pub fn ch1den(&self) -> CH1DEN_R { + CH1DEN_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Channel 0 capture/compare DMA request enable"] - #[inline] - pub fn ch0den(&self) -> CH0DENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0DENR { bits } + #[inline(always)] + pub fn ch0den(&self) -> CH0DEN_R { + CH0DEN_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Update DMA request enable"] - #[inline] - pub fn upden(&self) -> UPDENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - UPDENR { bits } + #[inline(always)] + pub fn upden(&self) -> UPDEN_R { + UPDEN_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 6 - Trigger interrupt enable"] - #[inline] - pub fn trgie(&self) -> TRGIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TRGIER { bits } + #[inline(always)] + pub fn trgie(&self) -> TRGIE_R { + TRGIE_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 4 - Channel 3 capture/compare interrupt enable"] - #[inline] - pub fn ch3ie(&self) -> CH3IER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3IER { bits } + #[inline(always)] + pub fn ch3ie(&self) -> CH3IE_R { + CH3IE_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Channel 2 capture/compare interrupt enable"] - #[inline] - pub fn ch2ie(&self) -> CH2IER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2IER { bits } + #[inline(always)] + pub fn ch2ie(&self) -> CH2IE_R { + CH2IE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Channel 1 capture/compare interrupt enable"] - #[inline] - pub fn ch1ie(&self) -> CH1IER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1IER { bits } + #[inline(always)] + pub fn ch1ie(&self) -> CH1IE_R { + CH1IE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Channel 0 capture/compare interrupt enable"] - #[inline] - pub fn ch0ie(&self) -> CH0IER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0IER { bits } + #[inline(always)] + pub fn ch0ie(&self) -> CH0IE_R { + CH0IE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Update interrupt enable"] - #[inline] - pub fn upie(&self) -> UPIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - UPIER { bits } + #[inline(always)] + pub fn upie(&self) -> UPIE_R { + UPIE_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 14 - Trigger DMA request enable"] - #[inline] - pub fn trgden(&mut self) -> _TRGDENW { - _TRGDENW { w: self } + #[inline(always)] + pub fn trgden(&mut self) -> TRGDEN_W { + TRGDEN_W { w: self } } #[doc = "Bit 12 - Channel 3 capture/compare DMA request enable"] - #[inline] - pub fn ch3den(&mut self) -> _CH3DENW { - _CH3DENW { w: self } + #[inline(always)] + pub fn ch3den(&mut self) -> CH3DEN_W { + CH3DEN_W { w: self } } #[doc = "Bit 11 - Channel 2 capture/compare DMA request enable"] - #[inline] - pub fn ch2den(&mut self) -> _CH2DENW { - _CH2DENW { w: self } + #[inline(always)] + pub fn ch2den(&mut self) -> CH2DEN_W { + CH2DEN_W { w: self } } #[doc = "Bit 10 - Channel 1 capture/compare DMA request enable"] - #[inline] - pub fn ch1den(&mut self) -> _CH1DENW { - _CH1DENW { w: self } + #[inline(always)] + pub fn ch1den(&mut self) -> CH1DEN_W { + CH1DEN_W { w: self } } #[doc = "Bit 9 - Channel 0 capture/compare DMA request enable"] - #[inline] - pub fn ch0den(&mut self) -> _CH0DENW { - _CH0DENW { w: self } + #[inline(always)] + pub fn ch0den(&mut self) -> CH0DEN_W { + CH0DEN_W { w: self } } #[doc = "Bit 8 - Update DMA request enable"] - #[inline] - pub fn upden(&mut self) -> _UPDENW { - _UPDENW { w: self } + #[inline(always)] + pub fn upden(&mut self) -> UPDEN_W { + UPDEN_W { w: self } } #[doc = "Bit 6 - Trigger interrupt enable"] - #[inline] - pub fn trgie(&mut self) -> _TRGIEW { - _TRGIEW { w: self } + #[inline(always)] + pub fn trgie(&mut self) -> TRGIE_W { + TRGIE_W { w: self } } #[doc = "Bit 4 - Channel 3 capture/compare interrupt enable"] - #[inline] - pub fn ch3ie(&mut self) -> _CH3IEW { - _CH3IEW { w: self } + #[inline(always)] + pub fn ch3ie(&mut self) -> CH3IE_W { + CH3IE_W { w: self } } #[doc = "Bit 3 - Channel 2 capture/compare interrupt enable"] - #[inline] - pub fn ch2ie(&mut self) -> _CH2IEW { - _CH2IEW { w: self } + #[inline(always)] + pub fn ch2ie(&mut self) -> CH2IE_W { + CH2IE_W { w: self } } #[doc = "Bit 2 - Channel 1 capture/compare interrupt enable"] - #[inline] - pub fn ch1ie(&mut self) -> _CH1IEW { - _CH1IEW { w: self } + #[inline(always)] + pub fn ch1ie(&mut self) -> CH1IE_W { + CH1IE_W { w: self } } #[doc = "Bit 1 - Channel 0 capture/compare interrupt enable"] - #[inline] - pub fn ch0ie(&mut self) -> _CH0IEW { - _CH0IEW { w: self } + #[inline(always)] + pub fn ch0ie(&mut self) -> CH0IE_W { + CH0IE_W { w: self } } #[doc = "Bit 0 - Update interrupt enable"] - #[inline] - pub fn upie(&mut self) -> _UPIEW { - _UPIEW { w: self } + #[inline(always)] + pub fn upie(&mut self) -> UPIE_W { + UPIE_W { w: self } } } diff --git a/src/timer1/dmatb.rs b/src/timer1/dmatb.rs index d6de8142d3c23cce3f11263dfce2fb83272da636..0d7b921533c77f0abbe52e356a2a60198e566d7a 100644 --- a/src/timer1/dmatb.rs +++ b/src/timer1/dmatb.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DMATB { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DMATBR { - bits: u16, -} -impl DMATBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DMATBW<'a> { +#[doc = "Reader of register DMATB"] +pub type R = crate::R; +#[doc = "Writer for register DMATB"] +pub type W = crate::W; +#[doc = "Register DMATB `reset()`'s with value 0"] +impl crate::ResetValue for super::DMATB { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DMATB`"] +pub type DMATB_R = crate::R; +#[doc = "Write proxy for field `DMATB`"] +pub struct DMATB_W<'a> { w: &'a mut W, } -impl<'a> _DMATBW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DMATB_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - DMA transfer buffer"] - #[inline] - pub fn dmatb(&self) -> DMATBR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DMATBR { bits } + #[inline(always)] + pub fn dmatb(&self) -> DMATB_R { + DMATB_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - DMA transfer buffer"] - #[inline] - pub fn dmatb(&mut self) -> _DMATBW { - _DMATBW { w: self } + #[inline(always)] + pub fn dmatb(&mut self) -> DMATB_W { + DMATB_W { w: self } } } diff --git a/src/timer1/intf.rs b/src/timer1/intf.rs index ef4f85b3b4d20749726afc7ab84ffdf60ac1edb0..be81fbf4905938344fd439080ba66f120c8bdcae 100644 --- a/src/timer1/intf.rs +++ b/src/timer1/intf.rs @@ -1,654 +1,356 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CH3OFR { - bits: bool, -} -impl CH3OFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2OFR { - bits: bool, -} -impl CH2OFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1OFR { - bits: bool, -} -impl CH1OFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0OFR { - bits: bool, -} -impl CH0OFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TRGIFR { - bits: bool, -} -impl TRGIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH3IFR { - bits: bool, -} -impl CH3IFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH2IFR { - bits: bool, -} -impl CH2IFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH1IFR { - bits: bool, -} -impl CH1IFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CH0IFR { - bits: bool, -} -impl CH0IFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UPIFR { - bits: bool, -} -impl UPIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CH3OFW<'a> { +#[doc = "Reader of register INTF"] +pub type R = crate::R; +#[doc = "Writer for register INTF"] +pub type W = crate::W; +#[doc = "Register INTF `reset()`'s with value 0"] +impl crate::ResetValue for super::INTF { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CH3OF`"] +pub type CH3OF_R = crate::R; +#[doc = "Write proxy for field `CH3OF`"] +pub struct CH3OF_W<'a> { w: &'a mut W, } -impl<'a> _CH3OFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3OF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u16) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CH2OFW<'a> { +#[doc = "Reader of field `CH2OF`"] +pub type CH2OF_R = crate::R; +#[doc = "Write proxy for field `CH2OF`"] +pub struct CH2OF_W<'a> { w: &'a mut W, } -impl<'a> _CH2OFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2OF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u16) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _CH1OFW<'a> { +#[doc = "Reader of field `CH1OF`"] +pub type CH1OF_R = crate::R; +#[doc = "Write proxy for field `CH1OF`"] +pub struct CH1OF_W<'a> { w: &'a mut W, } -impl<'a> _CH1OFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1OF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u16) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _CH0OFW<'a> { +#[doc = "Reader of field `CH0OF`"] +pub type CH0OF_R = crate::R; +#[doc = "Write proxy for field `CH0OF`"] +pub struct CH0OF_W<'a> { w: &'a mut W, } -impl<'a> _CH0OFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0OF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u16) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _TRGIFW<'a> { +#[doc = "Reader of field `TRGIF`"] +pub type TRGIF_R = crate::R; +#[doc = "Write proxy for field `TRGIF`"] +pub struct TRGIF_W<'a> { w: &'a mut W, } -impl<'a> _TRGIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TRGIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u16) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _CH3IFW<'a> { +#[doc = "Reader of field `CH3IF`"] +pub type CH3IF_R = crate::R; +#[doc = "Write proxy for field `CH3IF`"] +pub struct CH3IF_W<'a> { w: &'a mut W, } -impl<'a> _CH3IFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3IF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u16) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CH2IFW<'a> { +#[doc = "Reader of field `CH2IF`"] +pub type CH2IF_R = crate::R; +#[doc = "Write proxy for field `CH2IF`"] +pub struct CH2IF_W<'a> { w: &'a mut W, } -impl<'a> _CH2IFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2IF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _CH1IFW<'a> { +#[doc = "Reader of field `CH1IF`"] +pub type CH1IF_R = crate::R; +#[doc = "Write proxy for field `CH1IF`"] +pub struct CH1IF_W<'a> { w: &'a mut W, } -impl<'a> _CH1IFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1IF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CH0IFW<'a> { +#[doc = "Reader of field `CH0IF`"] +pub type CH0IF_R = crate::R; +#[doc = "Write proxy for field `CH0IF`"] +pub struct CH0IF_W<'a> { w: &'a mut W, } -impl<'a> _CH0IFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0IF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _UPIFW<'a> { +#[doc = "Reader of field `UPIF`"] +pub type UPIF_R = crate::R; +#[doc = "Write proxy for field `UPIF`"] +pub struct UPIF_W<'a> { w: &'a mut W, } -impl<'a> _UPIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 12 - Channel 3 over capture flag"] - #[inline] - pub fn ch3of(&self) -> CH3OFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3OFR { bits } + #[inline(always)] + pub fn ch3of(&self) -> CH3OF_R { + CH3OF_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Channel 2 over capture flag"] - #[inline] - pub fn ch2of(&self) -> CH2OFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2OFR { bits } + #[inline(always)] + pub fn ch2of(&self) -> CH2OF_R { + CH2OF_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Channel 1 over capture flag"] - #[inline] - pub fn ch1of(&self) -> CH1OFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1OFR { bits } + #[inline(always)] + pub fn ch1of(&self) -> CH1OF_R { + CH1OF_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Channel 0 over capture flag"] - #[inline] - pub fn ch0of(&self) -> CH0OFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0OFR { bits } + #[inline(always)] + pub fn ch0of(&self) -> CH0OF_R { + CH0OF_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 6 - Trigger interrupt flag"] - #[inline] - pub fn trgif(&self) -> TRGIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - TRGIFR { bits } + #[inline(always)] + pub fn trgif(&self) -> TRGIF_R { + TRGIF_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 4 - Channel 3 capture/compare interrupt enable"] - #[inline] - pub fn ch3if(&self) -> CH3IFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH3IFR { bits } + #[inline(always)] + pub fn ch3if(&self) -> CH3IF_R { + CH3IF_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Channel 2 capture/compare interrupt enable"] - #[inline] - pub fn ch2if(&self) -> CH2IFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH2IFR { bits } + #[inline(always)] + pub fn ch2if(&self) -> CH2IF_R { + CH2IF_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Channel 1 capture/compare interrupt flag"] - #[inline] - pub fn ch1if(&self) -> CH1IFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH1IFR { bits } + #[inline(always)] + pub fn ch1if(&self) -> CH1IF_R { + CH1IF_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Channel 0 capture/compare interrupt flag"] - #[inline] - pub fn ch0if(&self) -> CH0IFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CH0IFR { bits } + #[inline(always)] + pub fn ch0if(&self) -> CH0IF_R { + CH0IF_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Update interrupt flag"] - #[inline] - pub fn upif(&self) -> UPIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - UPIFR { bits } + #[inline(always)] + pub fn upif(&self) -> UPIF_R { + UPIF_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 12 - Channel 3 over capture flag"] - #[inline] - pub fn ch3of(&mut self) -> _CH3OFW { - _CH3OFW { w: self } + #[inline(always)] + pub fn ch3of(&mut self) -> CH3OF_W { + CH3OF_W { w: self } } #[doc = "Bit 11 - Channel 2 over capture flag"] - #[inline] - pub fn ch2of(&mut self) -> _CH2OFW { - _CH2OFW { w: self } + #[inline(always)] + pub fn ch2of(&mut self) -> CH2OF_W { + CH2OF_W { w: self } } #[doc = "Bit 10 - Channel 1 over capture flag"] - #[inline] - pub fn ch1of(&mut self) -> _CH1OFW { - _CH1OFW { w: self } + #[inline(always)] + pub fn ch1of(&mut self) -> CH1OF_W { + CH1OF_W { w: self } } #[doc = "Bit 9 - Channel 0 over capture flag"] - #[inline] - pub fn ch0of(&mut self) -> _CH0OFW { - _CH0OFW { w: self } + #[inline(always)] + pub fn ch0of(&mut self) -> CH0OF_W { + CH0OF_W { w: self } } #[doc = "Bit 6 - Trigger interrupt flag"] - #[inline] - pub fn trgif(&mut self) -> _TRGIFW { - _TRGIFW { w: self } + #[inline(always)] + pub fn trgif(&mut self) -> TRGIF_W { + TRGIF_W { w: self } } #[doc = "Bit 4 - Channel 3 capture/compare interrupt enable"] - #[inline] - pub fn ch3if(&mut self) -> _CH3IFW { - _CH3IFW { w: self } + #[inline(always)] + pub fn ch3if(&mut self) -> CH3IF_W { + CH3IF_W { w: self } } #[doc = "Bit 3 - Channel 2 capture/compare interrupt enable"] - #[inline] - pub fn ch2if(&mut self) -> _CH2IFW { - _CH2IFW { w: self } + #[inline(always)] + pub fn ch2if(&mut self) -> CH2IF_W { + CH2IF_W { w: self } } #[doc = "Bit 2 - Channel 1 capture/compare interrupt flag"] - #[inline] - pub fn ch1if(&mut self) -> _CH1IFW { - _CH1IFW { w: self } + #[inline(always)] + pub fn ch1if(&mut self) -> CH1IF_W { + CH1IF_W { w: self } } #[doc = "Bit 1 - Channel 0 capture/compare interrupt flag"] - #[inline] - pub fn ch0if(&mut self) -> _CH0IFW { - _CH0IFW { w: self } + #[inline(always)] + pub fn ch0if(&mut self) -> CH0IF_W { + CH0IF_W { w: self } } #[doc = "Bit 0 - Update interrupt flag"] - #[inline] - pub fn upif(&mut self) -> _UPIFW { - _UPIFW { w: self } + #[inline(always)] + pub fn upif(&mut self) -> UPIF_W { + UPIF_W { w: self } } } diff --git a/src/timer1/psc.rs b/src/timer1/psc.rs index 126539147666bca5cb1822ea1263f4d3e26bcff0..800317abb385c289e7ac14b685c3e246ea45f77a 100644 --- a/src/timer1/psc.rs +++ b/src/timer1/psc.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::PSC { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PSCR { - bits: u16, -} -impl PSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PSCW<'a> { +#[doc = "Reader of register PSC"] +pub type R = crate::R; +#[doc = "Writer for register PSC"] +pub type W = crate::W; +#[doc = "Register PSC `reset()`'s with value 0"] +impl crate::ResetValue for super::PSC { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PSC`"] +pub type PSC_R = crate::R; +#[doc = "Write proxy for field `PSC`"] +pub struct PSC_W<'a> { w: &'a mut W, } -impl<'a> _PSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Prescaler value of the counter clock"] - #[inline] - pub fn psc(&self) -> PSCR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - PSCR { bits } + #[inline(always)] + pub fn psc(&self) -> PSC_R { + PSC_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Prescaler value of the counter clock"] - #[inline] - pub fn psc(&mut self) -> _PSCW { - _PSCW { w: self } + #[inline(always)] + pub fn psc(&mut self) -> PSC_W { + PSC_W { w: self } } } diff --git a/src/timer1/smcfg.rs b/src/timer1/smcfg.rs index a572d6e777486581b59cd805b9eb7ea6caccf9a7..b61936b7668d856cc76e79ba366571bd4928b8e9 100644 --- a/src/timer1/smcfg.rs +++ b/src/timer1/smcfg.rs @@ -1,405 +1,214 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::SMCFG { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct ETPR { - bits: bool, -} -impl ETPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SMC1R { - bits: bool, -} -impl SMC1R { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ETPSCR { - bits: u8, -} -impl ETPSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ETFCR { - bits: u8, -} -impl ETFCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct MSMR { - bits: bool, -} -impl MSMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TRGSR { - bits: u8, -} -impl TRGSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SMCR { - bits: u8, -} -impl SMCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _ETPW<'a> { +#[doc = "Reader of register SMCFG"] +pub type R = crate::R; +#[doc = "Writer for register SMCFG"] +pub type W = crate::W; +#[doc = "Register SMCFG `reset()`'s with value 0"] +impl crate::ResetValue for super::SMCFG { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `ETP`"] +pub type ETP_R = crate::R; +#[doc = "Write proxy for field `ETP`"] +pub struct ETP_W<'a> { w: &'a mut W, } -impl<'a> _ETPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ETP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u16) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _SMC1W<'a> { +#[doc = "Reader of field `SMC1`"] +pub type SMC1_R = crate::R; +#[doc = "Write proxy for field `SMC1`"] +pub struct SMC1_W<'a> { w: &'a mut W, } -impl<'a> _SMC1W<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SMC1_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u16) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _ETPSCW<'a> { +#[doc = "Reader of field `ETPSC`"] +pub type ETPSC_R = crate::R; +#[doc = "Write proxy for field `ETPSC`"] +pub struct ETPSC_W<'a> { w: &'a mut W, } -impl<'a> _ETPSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ETPSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u16) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _ETFCW<'a> { +#[doc = "Reader of field `ETFC`"] +pub type ETFC_R = crate::R; +#[doc = "Write proxy for field `ETFC`"] +pub struct ETFC_W<'a> { w: &'a mut W, } -impl<'a> _ETFCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ETFC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 8)) | (((value as u16) & 0x0f) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _MSMW<'a> { +#[doc = "Reader of field `MSM`"] +pub type MSM_R = crate::R; +#[doc = "Write proxy for field `MSM`"] +pub struct MSM_W<'a> { w: &'a mut W, } -impl<'a> _MSMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MSM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _TRGSW<'a> { +#[doc = "Reader of field `TRGS`"] +pub type TRGS_R = crate::R; +#[doc = "Write proxy for field `TRGS`"] +pub struct TRGS_W<'a> { w: &'a mut W, } -impl<'a> _TRGSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TRGS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 4)) | (((value as u16) & 0x07) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _SMCW<'a> { +#[doc = "Reader of field `SMC`"] +pub type SMC_R = crate::R; +#[doc = "Write proxy for field `SMC`"] +pub struct SMC_W<'a> { w: &'a mut W, } -impl<'a> _SMCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> SMC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x07) | ((value as u16) & 0x07); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 15 - External trigger polarity"] - #[inline] - pub fn etp(&self) -> ETPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ETPR { bits } + #[inline(always)] + pub fn etp(&self) -> ETP_R { + ETP_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 14 - Part of SMC for enable External clock mode1"] - #[inline] - pub fn smc1(&self) -> SMC1R { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - SMC1R { bits } + #[inline(always)] + pub fn smc1(&self) -> SMC1_R { + SMC1_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bits 12:13 - External trigger prescaler"] - #[inline] - pub fn etpsc(&self) -> ETPSCR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - ETPSCR { bits } + #[inline(always)] + pub fn etpsc(&self) -> ETPSC_R { + ETPSC_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bits 8:11 - External trigger filter control"] - #[inline] - pub fn etfc(&self) -> ETFCR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - ETFCR { bits } + #[inline(always)] + pub fn etfc(&self) -> ETFC_R { + ETFC_R::new(((self.bits >> 8) & 0x0f) as u8) } #[doc = "Bit 7 - Master-slave mode"] - #[inline] - pub fn msm(&self) -> MSMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - MSMR { bits } + #[inline(always)] + pub fn msm(&self) -> MSM_R { + MSM_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 4:6 - Trigger selection"] - #[inline] - pub fn trgs(&self) -> TRGSR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - TRGSR { bits } + #[inline(always)] + pub fn trgs(&self) -> TRGS_R { + TRGS_R::new(((self.bits >> 4) & 0x07) as u8) } #[doc = "Bits 0:2 - Slave mode control"] - #[inline] - pub fn smc(&self) -> SMCR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - SMCR { bits } + #[inline(always)] + pub fn smc(&self) -> SMC_R { + SMC_R::new((self.bits & 0x07) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 15 - External trigger polarity"] - #[inline] - pub fn etp(&mut self) -> _ETPW { - _ETPW { w: self } + #[inline(always)] + pub fn etp(&mut self) -> ETP_W { + ETP_W { w: self } } #[doc = "Bit 14 - Part of SMC for enable External clock mode1"] - #[inline] - pub fn smc1(&mut self) -> _SMC1W { - _SMC1W { w: self } + #[inline(always)] + pub fn smc1(&mut self) -> SMC1_W { + SMC1_W { w: self } } #[doc = "Bits 12:13 - External trigger prescaler"] - #[inline] - pub fn etpsc(&mut self) -> _ETPSCW { - _ETPSCW { w: self } + #[inline(always)] + pub fn etpsc(&mut self) -> ETPSC_W { + ETPSC_W { w: self } } #[doc = "Bits 8:11 - External trigger filter control"] - #[inline] - pub fn etfc(&mut self) -> _ETFCW { - _ETFCW { w: self } + #[inline(always)] + pub fn etfc(&mut self) -> ETFC_W { + ETFC_W { w: self } } #[doc = "Bit 7 - Master-slave mode"] - #[inline] - pub fn msm(&mut self) -> _MSMW { - _MSMW { w: self } + #[inline(always)] + pub fn msm(&mut self) -> MSM_W { + MSM_W { w: self } } #[doc = "Bits 4:6 - Trigger selection"] - #[inline] - pub fn trgs(&mut self) -> _TRGSW { - _TRGSW { w: self } + #[inline(always)] + pub fn trgs(&mut self) -> TRGS_W { + TRGS_W { w: self } } #[doc = "Bits 0:2 - Slave mode control"] - #[inline] - pub fn smc(&mut self) -> _SMCW { - _SMCW { w: self } + #[inline(always)] + pub fn smc(&mut self) -> SMC_W { + SMC_W { w: self } } } diff --git a/src/timer1/swevg.rs b/src/timer1/swevg.rs index 65d4098179f17f1d9d8fbe47d79d10625d597e4c..7f734d279d77de33614d3770d9cd742a2a6e597b 100644 --- a/src/timer1/swevg.rs +++ b/src/timer1/swevg.rs @@ -1,197 +1,174 @@ -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::SWEVG { - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); +#[doc = "Writer for register SWEVG"] +pub type W = crate::W; +#[doc = "Register SWEVG `reset()`'s with value 0"] +impl crate::ResetValue for super::SWEVG { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _TRGGW<'a> { +#[doc = "Write proxy for field `TRGG`"] +pub struct TRGG_W<'a> { w: &'a mut W, } -impl<'a> _TRGGW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TRGG_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u16) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _CH3GW<'a> { +#[doc = "Write proxy for field `CH3G`"] +pub struct CH3G_W<'a> { w: &'a mut W, } -impl<'a> _CH3GW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH3G_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u16) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CH2GW<'a> { +#[doc = "Write proxy for field `CH2G`"] +pub struct CH2G_W<'a> { w: &'a mut W, } -impl<'a> _CH2GW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH2G_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _CH1GW<'a> { +#[doc = "Write proxy for field `CH1G`"] +pub struct CH1G_W<'a> { w: &'a mut W, } -impl<'a> _CH1GW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH1G_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _CH0GW<'a> { +#[doc = "Write proxy for field `CH0G`"] +pub struct CH0G_W<'a> { w: &'a mut W, } -impl<'a> _CH0GW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH0G_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _UPGW<'a> { +#[doc = "Write proxy for field `UPG`"] +pub struct UPG_W<'a> { w: &'a mut W, } -impl<'a> _UPGW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPG_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 6 - Trigger event generation"] - #[inline] - pub fn trgg(&mut self) -> _TRGGW { - _TRGGW { w: self } + #[inline(always)] + pub fn trgg(&mut self) -> TRGG_W { + TRGG_W { w: self } } #[doc = "Bit 4 - Channel 3 capture or compare event generation"] - #[inline] - pub fn ch3g(&mut self) -> _CH3GW { - _CH3GW { w: self } + #[inline(always)] + pub fn ch3g(&mut self) -> CH3G_W { + CH3G_W { w: self } } #[doc = "Bit 3 - Channel 2 capture or compare event generation"] - #[inline] - pub fn ch2g(&mut self) -> _CH2GW { - _CH2GW { w: self } + #[inline(always)] + pub fn ch2g(&mut self) -> CH2G_W { + CH2G_W { w: self } } #[doc = "Bit 2 - Channel 1 capture or compare event generation"] - #[inline] - pub fn ch1g(&mut self) -> _CH1GW { - _CH1GW { w: self } + #[inline(always)] + pub fn ch1g(&mut self) -> CH1G_W { + CH1G_W { w: self } } #[doc = "Bit 1 - Channel 0 capture or compare event generation"] - #[inline] - pub fn ch0g(&mut self) -> _CH0GW { - _CH0GW { w: self } + #[inline(always)] + pub fn ch0g(&mut self) -> CH0G_W { + CH0G_W { w: self } } #[doc = "Bit 0 - Update generation"] - #[inline] - pub fn upg(&mut self) -> _UPGW { - _UPGW { w: self } + #[inline(always)] + pub fn upg(&mut self) -> UPG_W { + UPG_W { w: self } } } diff --git a/src/timer5.rs b/src/timer5.rs index 1825785c7a93f1b64c613c9bc1e1fac5a4fc5687..f51c636f8822ccaedf241268259c2c0e56bafe20 100644 --- a/src/timer5.rs +++ b/src/timer5.rs @@ -1,75 +1,113 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - control register 0"] pub ctl0: CTL0, - _reserved0: [u8; 2usize], + _reserved1: [u8; 2usize], #[doc = "0x04 - control register 1"] pub ctl1: CTL1, - _reserved1: [u8; 6usize], + _reserved2: [u8; 6usize], #[doc = "0x0c - DMA/Interrupt enable register"] pub dmainten: DMAINTEN, - _reserved2: [u8; 2usize], + _reserved3: [u8; 2usize], #[doc = "0x10 - Interrupt flag register"] pub intf: INTF, - _reserved3: [u8; 2usize], + _reserved4: [u8; 2usize], #[doc = "0x14 - event generation register"] pub swevg: SWEVG, - _reserved4: [u8; 14usize], + _reserved5: [u8; 14usize], #[doc = "0x24 - Counter register"] pub cnt: CNT, - _reserved5: [u8; 2usize], + _reserved6: [u8; 2usize], #[doc = "0x28 - Prescaler register"] pub psc: PSC, - _reserved6: [u8; 2usize], + _reserved7: [u8; 2usize], #[doc = "0x2c - Counter auto reload register"] pub car: CAR, } -#[doc = "control register 0"] -pub struct CTL0 { - register: ::vcell::VolatileCell, -} +#[doc = "control register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl0](ctl0) module"] +pub type CTL0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL0; +#[doc = "`read()` method returns [ctl0::R](ctl0::R) reader structure"] +impl crate::Readable for CTL0 {} +#[doc = "`write(|w| ..)` method takes [ctl0::W](ctl0::W) writer structure"] +impl crate::Writable for CTL0 {} #[doc = "control register 0"] pub mod ctl0; -#[doc = "control register 1"] -pub struct CTL1 { - register: ::vcell::VolatileCell, -} +#[doc = "control register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl1](ctl1) module"] +pub type CTL1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL1; +#[doc = "`read()` method returns [ctl1::R](ctl1::R) reader structure"] +impl crate::Readable for CTL1 {} +#[doc = "`write(|w| ..)` method takes [ctl1::W](ctl1::W) writer structure"] +impl crate::Writable for CTL1 {} #[doc = "control register 1"] pub mod ctl1; -#[doc = "DMA/Interrupt enable register"] -pub struct DMAINTEN { - register: ::vcell::VolatileCell, -} +#[doc = "DMA/Interrupt enable register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dmainten](dmainten) module"] +pub type DMAINTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DMAINTEN; +#[doc = "`read()` method returns [dmainten::R](dmainten::R) reader structure"] +impl crate::Readable for DMAINTEN {} +#[doc = "`write(|w| ..)` method takes [dmainten::W](dmainten::W) writer structure"] +impl crate::Writable for DMAINTEN {} #[doc = "DMA/Interrupt enable register"] pub mod dmainten; -#[doc = "Interrupt flag register"] -pub struct INTF { - register: ::vcell::VolatileCell, -} +#[doc = "Interrupt flag register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [intf](intf) module"] +pub type INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _INTF; +#[doc = "`read()` method returns [intf::R](intf::R) reader structure"] +impl crate::Readable for INTF {} +#[doc = "`write(|w| ..)` method takes [intf::W](intf::W) writer structure"] +impl crate::Writable for INTF {} #[doc = "Interrupt flag register"] pub mod intf; -#[doc = "event generation register"] -pub struct SWEVG { - register: ::vcell::VolatileCell, -} +#[doc = "event generation register\n\nThis register you can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [swevg](swevg) module"] +pub type SWEVG = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _SWEVG; +#[doc = "`write(|w| ..)` method takes [swevg::W](swevg::W) writer structure"] +impl crate::Writable for SWEVG {} #[doc = "event generation register"] pub mod swevg; -#[doc = "Counter register"] -pub struct CNT { - register: ::vcell::VolatileCell, -} +#[doc = "Counter register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cnt](cnt) module"] +pub type CNT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CNT; +#[doc = "`read()` method returns [cnt::R](cnt::R) reader structure"] +impl crate::Readable for CNT {} +#[doc = "`write(|w| ..)` method takes [cnt::W](cnt::W) writer structure"] +impl crate::Writable for CNT {} #[doc = "Counter register"] pub mod cnt; -#[doc = "Prescaler register"] -pub struct PSC { - register: ::vcell::VolatileCell, -} +#[doc = "Prescaler register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [psc](psc) module"] +pub type PSC = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _PSC; +#[doc = "`read()` method returns [psc::R](psc::R) reader structure"] +impl crate::Readable for PSC {} +#[doc = "`write(|w| ..)` method takes [psc::W](psc::W) writer structure"] +impl crate::Writable for PSC {} #[doc = "Prescaler register"] pub mod psc; -#[doc = "Counter auto reload register"] -pub struct CAR { - register: ::vcell::VolatileCell, -} +#[doc = "Counter auto reload register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [car](car) module"] +pub type CAR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CAR; +#[doc = "`read()` method returns [car::R](car::R) reader structure"] +impl crate::Readable for CAR {} +#[doc = "`write(|w| ..)` method takes [car::W](car::W) writer structure"] +impl crate::Writable for CAR {} #[doc = "Counter auto reload register"] pub mod car; diff --git a/src/timer5/car.rs b/src/timer5/car.rs index 2580b5a924b037de9a5cb8d9db0a6f0907d62221..c5c62ac0e44c4ee662653893c26b32e3f42fc6d1 100644 --- a/src/timer5/car.rs +++ b/src/timer5/car.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CAR { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CARLR { - bits: u16, -} -impl CARLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CARLW<'a> { +#[doc = "Reader of register CAR"] +pub type R = crate::R; +#[doc = "Writer for register CAR"] +pub type W = crate::W; +#[doc = "Register CAR `reset()`'s with value 0"] +impl crate::ResetValue for super::CAR { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CARL`"] +pub type CARL_R = crate::R; +#[doc = "Write proxy for field `CARL`"] +pub struct CARL_W<'a> { w: &'a mut W, } -impl<'a> _CARLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CARL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Counter auto reload value"] - #[inline] - pub fn carl(&self) -> CARLR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - CARLR { bits } + #[inline(always)] + pub fn carl(&self) -> CARL_R { + CARL_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Counter auto reload value"] - #[inline] - pub fn carl(&mut self) -> _CARLW { - _CARLW { w: self } + #[inline(always)] + pub fn carl(&mut self) -> CARL_W { + CARL_W { w: self } } } diff --git a/src/timer5/cnt.rs b/src/timer5/cnt.rs index 62191562ada0595e8719415b0df3e29fb2db4b58..e2f438a08cb31f83d03bcf4cf29ba263d4f7ac67 100644 --- a/src/timer5/cnt.rs +++ b/src/timer5/cnt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CNT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u16, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of register CNT"] +pub type R = crate::R; +#[doc = "Writer for register CNT"] +pub type W = crate::W; +#[doc = "Register CNT `reset()`'s with value 0"] +impl crate::ResetValue for super::CNT { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Low counter value"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Low counter value"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/timer5/ctl0.rs b/src/timer5/ctl0.rs index 968a8f8414de3a850febfc74472a77d0edd5196d..fadcaffc289175b1d595feb6ff827273aa143026 100644 --- a/src/timer5/ctl0.rs +++ b/src/timer5/ctl0.rs @@ -1,359 +1,186 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CTL0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct ARSER { - bits: bool, -} -impl ARSER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SPMR { - bits: bool, -} -impl SPMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UPSR { - bits: bool, -} -impl UPSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UPDISR { - bits: bool, -} -impl UPDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CENR { - bits: bool, -} -impl CENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _ARSEW<'a> { +#[doc = "Reader of register CTL0"] +pub type R = crate::R; +#[doc = "Writer for register CTL0"] +pub type W = crate::W; +#[doc = "Register CTL0 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL0 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `ARSE`"] +pub type ARSE_R = crate::R; +#[doc = "Write proxy for field `ARSE`"] +pub struct ARSE_W<'a> { w: &'a mut W, } -impl<'a> _ARSEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ARSE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u16) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _SPMW<'a> { +#[doc = "Reader of field `SPM`"] +pub type SPM_R = crate::R; +#[doc = "Write proxy for field `SPM`"] +pub struct SPM_W<'a> { w: &'a mut W, } -impl<'a> _SPMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SPM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u16) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _UPSW<'a> { +#[doc = "Reader of field `UPS`"] +pub type UPS_R = crate::R; +#[doc = "Write proxy for field `UPS`"] +pub struct UPS_W<'a> { w: &'a mut W, } -impl<'a> _UPSW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u16) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _UPDISW<'a> { +#[doc = "Reader of field `UPDIS`"] +pub type UPDIS_R = crate::R; +#[doc = "Write proxy for field `UPDIS`"] +pub struct UPDIS_W<'a> { w: &'a mut W, } -impl<'a> _UPDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u16) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _CENW<'a> { +#[doc = "Reader of field `CEN`"] +pub type CEN_R = crate::R; +#[doc = "Write proxy for field `CEN`"] +pub struct CEN_W<'a> { w: &'a mut W, } -impl<'a> _CENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 7 - Auto-reload shadow enable"] - #[inline] - pub fn arse(&self) -> ARSER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - ARSER { bits } + #[inline(always)] + pub fn arse(&self) -> ARSE_R { + ARSE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 3 - Single pulse mode"] - #[inline] - pub fn spm(&self) -> SPMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - SPMR { bits } + #[inline(always)] + pub fn spm(&self) -> SPM_R { + SPM_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Update source"] - #[inline] - pub fn ups(&self) -> UPSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - UPSR { bits } + #[inline(always)] + pub fn ups(&self) -> UPS_R { + UPS_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Update disable"] - #[inline] - pub fn updis(&self) -> UPDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - UPDISR { bits } + #[inline(always)] + pub fn updis(&self) -> UPDIS_R { + UPDIS_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Counter enable"] - #[inline] - pub fn cen(&self) -> CENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - CENR { bits } + #[inline(always)] + pub fn cen(&self) -> CEN_R { + CEN_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 7 - Auto-reload shadow enable"] - #[inline] - pub fn arse(&mut self) -> _ARSEW { - _ARSEW { w: self } + #[inline(always)] + pub fn arse(&mut self) -> ARSE_W { + ARSE_W { w: self } } #[doc = "Bit 3 - Single pulse mode"] - #[inline] - pub fn spm(&mut self) -> _SPMW { - _SPMW { w: self } + #[inline(always)] + pub fn spm(&mut self) -> SPM_W { + SPM_W { w: self } } #[doc = "Bit 2 - Update source"] - #[inline] - pub fn ups(&mut self) -> _UPSW { - _UPSW { w: self } + #[inline(always)] + pub fn ups(&mut self) -> UPS_W { + UPS_W { w: self } } #[doc = "Bit 1 - Update disable"] - #[inline] - pub fn updis(&mut self) -> _UPDISW { - _UPDISW { w: self } + #[inline(always)] + pub fn updis(&mut self) -> UPDIS_W { + UPDIS_W { w: self } } #[doc = "Bit 0 - Counter enable"] - #[inline] - pub fn cen(&mut self) -> _CENW { - _CENW { w: self } + #[inline(always)] + pub fn cen(&mut self) -> CEN_W { + CEN_W { w: self } } } diff --git a/src/timer5/ctl1.rs b/src/timer5/ctl1.rs index f08d29a19586cf77b99fa7b5fecb3b683a3d0e47..5627be985024cb16e456b9267296655c74a0fb3d 100644 --- a/src/timer5/ctl1.rs +++ b/src/timer5/ctl1.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::CTL1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MMCR { - bits: u8, -} -impl MMCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MMCW<'a> { +#[doc = "Reader of register CTL1"] +pub type R = crate::R; +#[doc = "Writer for register CTL1"] +pub type W = crate::W; +#[doc = "Register CTL1 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL1 { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MMC`"] +pub type MMC_R = crate::R; +#[doc = "Write proxy for field `MMC`"] +pub struct MMC_W<'a> { w: &'a mut W, } -impl<'a> _MMCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MMC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x07 << 4)) | (((value as u16) & 0x07) << 4); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 4:6 - Master mode control"] - #[inline] - pub fn mmc(&self) -> MMCR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u16) as u8 - }; - MMCR { bits } + #[inline(always)] + pub fn mmc(&self) -> MMC_R { + MMC_R::new(((self.bits >> 4) & 0x07) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 4:6 - Master mode control"] - #[inline] - pub fn mmc(&mut self) -> _MMCW { - _MMCW { w: self } + #[inline(always)] + pub fn mmc(&mut self) -> MMC_W { + MMC_W { w: self } } } diff --git a/src/timer5/dmainten.rs b/src/timer5/dmainten.rs index a3f0e11117b0bbfe53b8f99ddb81b67df887ae1d..a1674cb96d683798b2b8d10ff5be20cc6209684d 100644 --- a/src/timer5/dmainten.rs +++ b/src/timer5/dmainten.rs @@ -1,182 +1,84 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::DMAINTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct UPDENR { - bits: bool, -} -impl UPDENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() +#[doc = "Reader of register DMAINTEN"] +pub type R = crate::R; +#[doc = "Writer for register DMAINTEN"] +pub type W = crate::W; +#[doc = "Register DMAINTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::DMAINTEN { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UPIER { - bits: bool, } -impl UPIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _UPDENW<'a> { +#[doc = "Reader of field `UPDEN`"] +pub type UPDEN_R = crate::R; +#[doc = "Write proxy for field `UPDEN`"] +pub struct UPDEN_W<'a> { w: &'a mut W, } -impl<'a> _UPDENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPDEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u16) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _UPIEW<'a> { +#[doc = "Reader of field `UPIE`"] +pub type UPIE_R = crate::R; +#[doc = "Write proxy for field `UPIE`"] +pub struct UPIE_W<'a> { w: &'a mut W, } -impl<'a> _UPIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 8 - Update DMA request enable"] - #[inline] - pub fn upden(&self) -> UPDENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - UPDENR { bits } + #[inline(always)] + pub fn upden(&self) -> UPDEN_R { + UPDEN_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 0 - Update interrupt enable"] - #[inline] - pub fn upie(&self) -> UPIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - UPIER { bits } + #[inline(always)] + pub fn upie(&self) -> UPIE_R { + UPIE_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 8 - Update DMA request enable"] - #[inline] - pub fn upden(&mut self) -> _UPDENW { - _UPDENW { w: self } + #[inline(always)] + pub fn upden(&mut self) -> UPDEN_W { + UPDEN_W { w: self } } #[doc = "Bit 0 - Update interrupt enable"] - #[inline] - pub fn upie(&mut self) -> _UPIEW { - _UPIEW { w: self } + #[inline(always)] + pub fn upie(&mut self) -> UPIE_W { + UPIE_W { w: self } } } diff --git a/src/timer5/intf.rs b/src/timer5/intf.rs index 539df1bf98f91c810b2ccd428cba25e33b222964..c1b2d2f8e08d4023b58d316176e2444c5a0ffa88 100644 --- a/src/timer5/intf.rs +++ b/src/timer5/intf.rs @@ -1,123 +1,50 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct UPIFR { - bits: bool, -} -impl UPIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _UPIFW<'a> { +#[doc = "Reader of register INTF"] +pub type R = crate::R; +#[doc = "Writer for register INTF"] +pub type W = crate::W; +#[doc = "Register INTF `reset()`'s with value 0"] +impl crate::ResetValue for super::INTF { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `UPIF`"] +pub type UPIF_R = crate::R; +#[doc = "Write proxy for field `UPIF`"] +pub struct UPIF_W<'a> { w: &'a mut W, } -impl<'a> _UPIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bit 0 - Update interrupt flag"] - #[inline] - pub fn upif(&self) -> UPIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) != 0 - }; - UPIFR { bits } + #[inline(always)] + pub fn upif(&self) -> UPIF_R { + UPIF_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Update interrupt flag"] - #[inline] - pub fn upif(&mut self) -> _UPIFW { - _UPIFW { w: self } + #[inline(always)] + pub fn upif(&mut self) -> UPIF_W { + UPIF_W { w: self } } } diff --git a/src/timer5/psc.rs b/src/timer5/psc.rs index 126539147666bca5cb1822ea1263f4d3e26bcff0..800317abb385c289e7ac14b685c3e246ea45f77a 100644 --- a/src/timer5/psc.rs +++ b/src/timer5/psc.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u16, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::PSC { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PSCR { - bits: u16, -} -impl PSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PSCW<'a> { +#[doc = "Reader of register PSC"] +pub type R = crate::R; +#[doc = "Writer for register PSC"] +pub type W = crate::W; +#[doc = "Register PSC `reset()`'s with value 0"] +impl crate::ResetValue for super::PSC { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PSC`"] +pub type PSC_R = crate::R; +#[doc = "Write proxy for field `PSC`"] +pub struct PSC_W<'a> { w: &'a mut W, } -impl<'a> _PSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u16) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } #[doc = "Bits 0:15 - Prescaler value of the counter clock"] - #[inline] - pub fn psc(&self) -> PSCR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u16) as u16 - }; - PSCR { bits } + #[inline(always)] + pub fn psc(&self) -> PSC_R { + PSC_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Prescaler value of the counter clock"] - #[inline] - pub fn psc(&mut self) -> _PSCW { - _PSCW { w: self } + #[inline(always)] + pub fn psc(&mut self) -> PSC_W { + PSC_W { w: self } } } diff --git a/src/timer5/swevg.rs b/src/timer5/swevg.rs index 01d2d66a6dd18fabc1a524328a063ebbcd018508..f5c0b9cf7329f4063bdef29d7aeaf481734d8c7a 100644 --- a/src/timer5/swevg.rs +++ b/src/timer5/swevg.rs @@ -1,57 +1,39 @@ -#[doc = r" Value to write to the register"] -pub struct W { - bits: u16, -} -impl super::SWEVG { - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); +#[doc = "Writer for register SWEVG"] +pub type W = crate::W; +#[doc = "Register SWEVG `reset()`'s with value 0"] +impl crate::ResetValue for super::SWEVG { + type Type = u16; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _UPGW<'a> { +#[doc = "Write proxy for field `UPG`"] +pub struct UPG_W<'a> { w: &'a mut W, } -impl<'a> _UPGW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UPG_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u16) << OFFSET); - self.w.bits |= ((value & MASK) as u16) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u16) & 0x01); self.w } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u16) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Update generation"] - #[inline] - pub fn upg(&mut self) -> _UPGW { - _UPGW { w: self } + #[inline(always)] + pub fn upg(&mut self) -> UPG_W { + UPG_W { w: self } } } diff --git a/src/uart3.rs b/src/uart3.rs index 30e9a69c24eb585f85947f013218f7e6b6c6cf28..91a81c9cb4e87dd5aa8dee8d15daeac535becdb1 100644 --- a/src/uart3.rs +++ b/src/uart3.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Status register"] @@ -16,45 +16,80 @@ pub struct RegisterBlock { #[doc = "0x18 - Guard time and prescaler register"] pub gp: GP, } -#[doc = "Status register"] -pub struct STAT { - register: ::vcell::VolatileCell, -} +#[doc = "Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [stat](stat) module"] +pub type STAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _STAT; +#[doc = "`read()` method returns [stat::R](stat::R) reader structure"] +impl crate::Readable for STAT {} +#[doc = "`write(|w| ..)` method takes [stat::W](stat::W) writer structure"] +impl crate::Writable for STAT {} #[doc = "Status register"] pub mod stat; -#[doc = "Data register"] -pub struct DATA { - register: ::vcell::VolatileCell, -} +#[doc = "Data register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data](data) module"] +pub type DATA = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA; +#[doc = "`read()` method returns [data::R](data::R) reader structure"] +impl crate::Readable for DATA {} +#[doc = "`write(|w| ..)` method takes [data::W](data::W) writer structure"] +impl crate::Writable for DATA {} #[doc = "Data register"] pub mod data; -#[doc = "Baud rate register"] -pub struct BAUD { - register: ::vcell::VolatileCell, -} +#[doc = "Baud rate register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [baud](baud) module"] +pub type BAUD = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _BAUD; +#[doc = "`read()` method returns [baud::R](baud::R) reader structure"] +impl crate::Readable for BAUD {} +#[doc = "`write(|w| ..)` method takes [baud::W](baud::W) writer structure"] +impl crate::Writable for BAUD {} #[doc = "Baud rate register"] pub mod baud; -#[doc = "Control register 0"] -pub struct CTL0 { - register: ::vcell::VolatileCell, -} +#[doc = "Control register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl0](ctl0) module"] +pub type CTL0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL0; +#[doc = "`read()` method returns [ctl0::R](ctl0::R) reader structure"] +impl crate::Readable for CTL0 {} +#[doc = "`write(|w| ..)` method takes [ctl0::W](ctl0::W) writer structure"] +impl crate::Writable for CTL0 {} #[doc = "Control register 0"] pub mod ctl0; -#[doc = "Control register 1"] -pub struct CTL1 { - register: ::vcell::VolatileCell, -} +#[doc = "Control register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl1](ctl1) module"] +pub type CTL1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL1; +#[doc = "`read()` method returns [ctl1::R](ctl1::R) reader structure"] +impl crate::Readable for CTL1 {} +#[doc = "`write(|w| ..)` method takes [ctl1::W](ctl1::W) writer structure"] +impl crate::Writable for CTL1 {} #[doc = "Control register 1"] pub mod ctl1; -#[doc = "Control register 2"] -pub struct CTL2 { - register: ::vcell::VolatileCell, -} +#[doc = "Control register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl2](ctl2) module"] +pub type CTL2 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL2; +#[doc = "`read()` method returns [ctl2::R](ctl2::R) reader structure"] +impl crate::Readable for CTL2 {} +#[doc = "`write(|w| ..)` method takes [ctl2::W](ctl2::W) writer structure"] +impl crate::Writable for CTL2 {} #[doc = "Control register 2"] pub mod ctl2; -#[doc = "Guard time and prescaler register"] -pub struct GP { - register: ::vcell::VolatileCell, -} +#[doc = "Guard time and prescaler register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gp](gp) module"] +pub type GP = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _GP; +#[doc = "`read()` method returns [gp::R](gp::R) reader structure"] +impl crate::Readable for GP {} +#[doc = "`write(|w| ..)` method takes [gp::W](gp::W) writer structure"] +impl crate::Writable for GP {} #[doc = "Guard time and prescaler register"] pub mod gp; diff --git a/src/uart3/baud.rs b/src/uart3/baud.rs index 484596bcf8542be6ae80f91974b1e26f68bd424f..9cd9435323d6a2ce6c58711a3fa60c4de7ec0768 100644 --- a/src/uart3/baud.rs +++ b/src/uart3/baud.rs @@ -1,146 +1,64 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::BAUD { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct INTDIVR { - bits: u16, -} -impl INTDIVR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct FRADIVR { - bits: u8, -} -impl FRADIVR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits +#[doc = "Reader of register BAUD"] +pub type R = crate::R; +#[doc = "Writer for register BAUD"] +pub type W = crate::W; +#[doc = "Register BAUD `reset()`'s with value 0"] +impl crate::ResetValue for super::BAUD { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _INTDIVW<'a> { +#[doc = "Reader of field `INTDIV`"] +pub type INTDIV_R = crate::R; +#[doc = "Write proxy for field `INTDIV`"] +pub struct INTDIV_W<'a> { w: &'a mut W, } -impl<'a> _INTDIVW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> INTDIV_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0fff << 4)) | (((value as u32) & 0x0fff) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FRADIVW<'a> { +#[doc = "Reader of field `FRADIV`"] +pub type FRADIV_R = crate::R; +#[doc = "Write proxy for field `FRADIV`"] +pub struct FRADIV_W<'a> { w: &'a mut W, } -impl<'a> _FRADIVW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> FRADIV_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 4:15 - Integer part of baud-rate divider"] - #[inline] - pub fn intdiv(&self) -> INTDIVR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - INTDIVR { bits } + #[inline(always)] + pub fn intdiv(&self) -> INTDIV_R { + INTDIV_R::new(((self.bits >> 4) & 0x0fff) as u16) } #[doc = "Bits 0:3 - Fraction part of baud-rate divider"] - #[inline] - pub fn fradiv(&self) -> FRADIVR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - FRADIVR { bits } + #[inline(always)] + pub fn fradiv(&self) -> FRADIV_R { + FRADIV_R::new((self.bits & 0x0f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 4:15 - Integer part of baud-rate divider"] - #[inline] - pub fn intdiv(&mut self) -> _INTDIVW { - _INTDIVW { w: self } + #[inline(always)] + pub fn intdiv(&mut self) -> INTDIV_W { + INTDIV_W { w: self } } #[doc = "Bits 0:3 - Fraction part of baud-rate divider"] - #[inline] - pub fn fradiv(&mut self) -> _FRADIVW { - _FRADIVW { w: self } + #[inline(always)] + pub fn fradiv(&mut self) -> FRADIV_W { + FRADIV_W { w: self } } } diff --git a/src/uart3/ctl0.rs b/src/uart3/ctl0.rs index 1148803ea6c773e534c8bb553b31c9dd203dc9c8..c5778c44f20a290e0b9d9ef180fa3c74ae3a20c9 100644 --- a/src/uart3/ctl0.rs +++ b/src/uart3/ctl0.rs @@ -1,890 +1,492 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct UENR { - bits: bool, -} -impl UENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WLR { - bits: bool, -} -impl WLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WMR { - bits: bool, -} -impl WMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PCENR { - bits: bool, -} -impl PCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PMR { - bits: bool, -} -impl PMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PERRIER { - bits: bool, -} -impl PERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TBEIER { - bits: bool, -} -impl TBEIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TCIER { - bits: bool, -} -impl TCIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RBNEIER { - bits: bool, -} -impl RBNEIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IDLEIER { - bits: bool, -} -impl IDLEIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TENR { - bits: bool, -} -impl TENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RENR { - bits: bool, -} -impl RENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RWUR { - bits: bool, -} -impl RWUR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SBKCMDR { - bits: bool, -} -impl SBKCMDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _UENW<'a> { +#[doc = "Reader of register CTL0"] +pub type R = crate::R; +#[doc = "Writer for register CTL0"] +pub type W = crate::W; +#[doc = "Register CTL0 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `UEN`"] +pub type UEN_R = crate::R; +#[doc = "Write proxy for field `UEN`"] +pub struct UEN_W<'a> { w: &'a mut W, } -impl<'a> _UENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _WLW<'a> { +#[doc = "Reader of field `WL`"] +pub type WL_R = crate::R; +#[doc = "Write proxy for field `WL`"] +pub struct WL_W<'a> { w: &'a mut W, } -impl<'a> _WLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _WMW<'a> { +#[doc = "Reader of field `WM`"] +pub type WM_R = crate::R; +#[doc = "Write proxy for field `WM`"] +pub struct WM_W<'a> { w: &'a mut W, } -impl<'a> _WMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _PCENW<'a> { +#[doc = "Reader of field `PCEN`"] +pub type PCEN_R = crate::R; +#[doc = "Write proxy for field `PCEN`"] +pub struct PCEN_W<'a> { w: &'a mut W, } -impl<'a> _PCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PMW<'a> { +#[doc = "Reader of field `PM`"] +pub type PM_R = crate::R; +#[doc = "Write proxy for field `PM`"] +pub struct PM_W<'a> { w: &'a mut W, } -impl<'a> _PMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _PERRIEW<'a> { +#[doc = "Reader of field `PERRIE`"] +pub type PERRIE_R = crate::R; +#[doc = "Write proxy for field `PERRIE`"] +pub struct PERRIE_W<'a> { w: &'a mut W, } -impl<'a> _PERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _TBEIEW<'a> { +#[doc = "Reader of field `TBEIE`"] +pub type TBEIE_R = crate::R; +#[doc = "Write proxy for field `TBEIE`"] +pub struct TBEIE_W<'a> { w: &'a mut W, } -impl<'a> _TBEIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TBEIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _TCIEW<'a> { +#[doc = "Reader of field `TCIE`"] +pub type TCIE_R = crate::R; +#[doc = "Write proxy for field `TCIE`"] +pub struct TCIE_W<'a> { w: &'a mut W, } -impl<'a> _TCIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TCIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _RBNEIEW<'a> { +#[doc = "Reader of field `RBNEIE`"] +pub type RBNEIE_R = crate::R; +#[doc = "Write proxy for field `RBNEIE`"] +pub struct RBNEIE_W<'a> { w: &'a mut W, } -impl<'a> _RBNEIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RBNEIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _IDLEIEW<'a> { +#[doc = "Reader of field `IDLEIE`"] +pub type IDLEIE_R = crate::R; +#[doc = "Write proxy for field `IDLEIE`"] +pub struct IDLEIE_W<'a> { w: &'a mut W, } -impl<'a> _IDLEIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IDLEIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _TENW<'a> { +#[doc = "Reader of field `TEN`"] +pub type TEN_R = crate::R; +#[doc = "Write proxy for field `TEN`"] +pub struct TEN_W<'a> { w: &'a mut W, } -impl<'a> _TENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _RENW<'a> { +#[doc = "Reader of field `REN`"] +pub type REN_R = crate::R; +#[doc = "Write proxy for field `REN`"] +pub struct REN_W<'a> { w: &'a mut W, } -impl<'a> _RENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _RWUW<'a> { +#[doc = "Reader of field `RWU`"] +pub type RWU_R = crate::R; +#[doc = "Write proxy for field `RWU`"] +pub struct RWU_W<'a> { w: &'a mut W, } -impl<'a> _RWUW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RWU_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _SBKCMDW<'a> { +#[doc = "Reader of field `SBKCMD`"] +pub type SBKCMD_R = crate::R; +#[doc = "Write proxy for field `SBKCMD`"] +pub struct SBKCMD_W<'a> { w: &'a mut W, } -impl<'a> _SBKCMDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SBKCMD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 13 - USART enable"] - #[inline] - pub fn uen(&self) -> UENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - UENR { bits } + #[inline(always)] + pub fn uen(&self) -> UEN_R { + UEN_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - Word length"] - #[inline] - pub fn wl(&self) -> WLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WLR { bits } + #[inline(always)] + pub fn wl(&self) -> WL_R { + WL_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Wakeup method in mute mode"] - #[inline] - pub fn wm(&self) -> WMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WMR { bits } + #[inline(always)] + pub fn wm(&self) -> WM_R { + WM_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Parity check function enable"] - #[inline] - pub fn pcen(&self) -> PCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PCENR { bits } + #[inline(always)] + pub fn pcen(&self) -> PCEN_R { + PCEN_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Parity mode"] - #[inline] - pub fn pm(&self) -> PMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PMR { bits } + #[inline(always)] + pub fn pm(&self) -> PM_R { + PM_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Parity error interrupt enable"] - #[inline] - pub fn perrie(&self) -> PERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PERRIER { bits } + #[inline(always)] + pub fn perrie(&self) -> PERRIE_R { + PERRIE_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - Transmitter buffer empty interrupt enable"] - #[inline] - pub fn tbeie(&self) -> TBEIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TBEIER { bits } + #[inline(always)] + pub fn tbeie(&self) -> TBEIE_R { + TBEIE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Transmission complete interrupt enable"] - #[inline] - pub fn tcie(&self) -> TCIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TCIER { bits } + #[inline(always)] + pub fn tcie(&self) -> TCIE_R { + TCIE_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Read data buffer not empty interrupt and overrun error interrupt enable"] - #[inline] - pub fn rbneie(&self) -> RBNEIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RBNEIER { bits } + #[inline(always)] + pub fn rbneie(&self) -> RBNEIE_R { + RBNEIE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - IDLE line detected interrupt enable"] - #[inline] - pub fn idleie(&self) -> IDLEIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IDLEIER { bits } + #[inline(always)] + pub fn idleie(&self) -> IDLEIE_R { + IDLEIE_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Transmitter enable"] - #[inline] - pub fn ten(&self) -> TENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TENR { bits } + #[inline(always)] + pub fn ten(&self) -> TEN_R { + TEN_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Receiver enable"] - #[inline] - pub fn ren(&self) -> RENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RENR { bits } + #[inline(always)] + pub fn ren(&self) -> REN_R { + REN_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Receiver wakeup from mute mode"] - #[inline] - pub fn rwu(&self) -> RWUR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RWUR { bits } + #[inline(always)] + pub fn rwu(&self) -> RWU_R { + RWU_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Send break command"] - #[inline] - pub fn sbkcmd(&self) -> SBKCMDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SBKCMDR { bits } + #[inline(always)] + pub fn sbkcmd(&self) -> SBKCMD_R { + SBKCMD_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 13 - USART enable"] - #[inline] - pub fn uen(&mut self) -> _UENW { - _UENW { w: self } + #[inline(always)] + pub fn uen(&mut self) -> UEN_W { + UEN_W { w: self } } #[doc = "Bit 12 - Word length"] - #[inline] - pub fn wl(&mut self) -> _WLW { - _WLW { w: self } + #[inline(always)] + pub fn wl(&mut self) -> WL_W { + WL_W { w: self } } #[doc = "Bit 11 - Wakeup method in mute mode"] - #[inline] - pub fn wm(&mut self) -> _WMW { - _WMW { w: self } + #[inline(always)] + pub fn wm(&mut self) -> WM_W { + WM_W { w: self } } #[doc = "Bit 10 - Parity check function enable"] - #[inline] - pub fn pcen(&mut self) -> _PCENW { - _PCENW { w: self } + #[inline(always)] + pub fn pcen(&mut self) -> PCEN_W { + PCEN_W { w: self } } #[doc = "Bit 9 - Parity mode"] - #[inline] - pub fn pm(&mut self) -> _PMW { - _PMW { w: self } + #[inline(always)] + pub fn pm(&mut self) -> PM_W { + PM_W { w: self } } #[doc = "Bit 8 - Parity error interrupt enable"] - #[inline] - pub fn perrie(&mut self) -> _PERRIEW { - _PERRIEW { w: self } + #[inline(always)] + pub fn perrie(&mut self) -> PERRIE_W { + PERRIE_W { w: self } } #[doc = "Bit 7 - Transmitter buffer empty interrupt enable"] - #[inline] - pub fn tbeie(&mut self) -> _TBEIEW { - _TBEIEW { w: self } + #[inline(always)] + pub fn tbeie(&mut self) -> TBEIE_W { + TBEIE_W { w: self } } #[doc = "Bit 6 - Transmission complete interrupt enable"] - #[inline] - pub fn tcie(&mut self) -> _TCIEW { - _TCIEW { w: self } + #[inline(always)] + pub fn tcie(&mut self) -> TCIE_W { + TCIE_W { w: self } } #[doc = "Bit 5 - Read data buffer not empty interrupt and overrun error interrupt enable"] - #[inline] - pub fn rbneie(&mut self) -> _RBNEIEW { - _RBNEIEW { w: self } + #[inline(always)] + pub fn rbneie(&mut self) -> RBNEIE_W { + RBNEIE_W { w: self } } #[doc = "Bit 4 - IDLE line detected interrupt enable"] - #[inline] - pub fn idleie(&mut self) -> _IDLEIEW { - _IDLEIEW { w: self } + #[inline(always)] + pub fn idleie(&mut self) -> IDLEIE_W { + IDLEIE_W { w: self } } #[doc = "Bit 3 - Transmitter enable"] - #[inline] - pub fn ten(&mut self) -> _TENW { - _TENW { w: self } + #[inline(always)] + pub fn ten(&mut self) -> TEN_W { + TEN_W { w: self } } #[doc = "Bit 2 - Receiver enable"] - #[inline] - pub fn ren(&mut self) -> _RENW { - _RENW { w: self } + #[inline(always)] + pub fn ren(&mut self) -> REN_W { + REN_W { w: self } } #[doc = "Bit 1 - Receiver wakeup from mute mode"] - #[inline] - pub fn rwu(&mut self) -> _RWUW { - _RWUW { w: self } + #[inline(always)] + pub fn rwu(&mut self) -> RWU_W { + RWU_W { w: self } } #[doc = "Bit 0 - Send break command"] - #[inline] - pub fn sbkcmd(&mut self) -> _SBKCMDW { - _SBKCMDW { w: self } + #[inline(always)] + pub fn sbkcmd(&mut self) -> SBKCMD_W { + SBKCMD_W { w: self } } } diff --git a/src/uart3/ctl1.rs b/src/uart3/ctl1.rs index 159ac3e432742675e7e72e10838138837e6625be..c5a653e24a2c39f7bbe3cd80ec691102eec1afe3 100644 --- a/src/uart3/ctl1.rs +++ b/src/uart3/ctl1.rs @@ -1,323 +1,166 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct LMENR { - bits: bool, -} -impl LMENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STBR { - bits: u8, -} -impl STBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct LBDIER { - bits: bool, -} -impl LBDIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LBLENR { - bits: bool, -} -impl LBLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ADDRR { - bits: u8, -} -impl ADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _LMENW<'a> { +#[doc = "Reader of register CTL1"] +pub type R = crate::R; +#[doc = "Writer for register CTL1"] +pub type W = crate::W; +#[doc = "Register CTL1 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `LMEN`"] +pub type LMEN_R = crate::R; +#[doc = "Write proxy for field `LMEN`"] +pub struct LMEN_W<'a> { w: &'a mut W, } -impl<'a> _LMENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LMEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _STBW<'a> { +#[doc = "Reader of field `STB`"] +pub type STB_R = crate::R; +#[doc = "Write proxy for field `STB`"] +pub struct STB_W<'a> { w: &'a mut W, } -impl<'a> _STBW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> STB_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _LBDIEW<'a> { +#[doc = "Reader of field `LBDIE`"] +pub type LBDIE_R = crate::R; +#[doc = "Write proxy for field `LBDIE`"] +pub struct LBDIE_W<'a> { w: &'a mut W, } -impl<'a> _LBDIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LBDIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _LBLENW<'a> { +#[doc = "Reader of field `LBLEN`"] +pub type LBLEN_R = crate::R; +#[doc = "Write proxy for field `LBLEN`"] +pub struct LBLEN_W<'a> { w: &'a mut W, } -impl<'a> _LBLENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LBLEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _ADDRW<'a> { +#[doc = "Reader of field `ADDR`"] +pub type ADDR_R = crate::R; +#[doc = "Write proxy for field `ADDR`"] +pub struct ADDR_W<'a> { w: &'a mut W, } -impl<'a> _ADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 14 - LIN mode enable"] - #[inline] - pub fn lmen(&self) -> LMENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LMENR { bits } + #[inline(always)] + pub fn lmen(&self) -> LMEN_R { + LMEN_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bits 12:13 - STOP bits length"] - #[inline] - pub fn stb(&self) -> STBR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - STBR { bits } + #[inline(always)] + pub fn stb(&self) -> STB_R { + STB_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bit 6 - LIN break detection interrupt enable"] - #[inline] - pub fn lbdie(&self) -> LBDIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LBDIER { bits } + #[inline(always)] + pub fn lbdie(&self) -> LBDIE_R { + LBDIE_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - LIN break frame length"] - #[inline] - pub fn lblen(&self) -> LBLENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LBLENR { bits } + #[inline(always)] + pub fn lblen(&self) -> LBLEN_R { + LBLEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bits 0:3 - Address of the USART"] - #[inline] - pub fn addr(&self) -> ADDRR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ADDRR { bits } + #[inline(always)] + pub fn addr(&self) -> ADDR_R { + ADDR_R::new((self.bits & 0x0f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 14 - LIN mode enable"] - #[inline] - pub fn lmen(&mut self) -> _LMENW { - _LMENW { w: self } + #[inline(always)] + pub fn lmen(&mut self) -> LMEN_W { + LMEN_W { w: self } } #[doc = "Bits 12:13 - STOP bits length"] - #[inline] - pub fn stb(&mut self) -> _STBW { - _STBW { w: self } + #[inline(always)] + pub fn stb(&mut self) -> STB_W { + STB_W { w: self } } #[doc = "Bit 6 - LIN break detection interrupt enable"] - #[inline] - pub fn lbdie(&mut self) -> _LBDIEW { - _LBDIEW { w: self } + #[inline(always)] + pub fn lbdie(&mut self) -> LBDIE_W { + LBDIE_W { w: self } } #[doc = "Bit 5 - LIN break frame length"] - #[inline] - pub fn lblen(&mut self) -> _LBLENW { - _LBLENW { w: self } + #[inline(always)] + pub fn lblen(&mut self) -> LBLEN_W { + LBLEN_W { w: self } } #[doc = "Bits 0:3 - Address of the USART"] - #[inline] - pub fn addr(&mut self) -> _ADDRW { - _ADDRW { w: self } + #[inline(always)] + pub fn addr(&mut self) -> ADDR_W { + ADDR_W { w: self } } } diff --git a/src/uart3/ctl2.rs b/src/uart3/ctl2.rs index 9cc677b457fe0b07aaabab074e39ae6ab84adac1..dd368bca1afe24ed829223d03de7557f0bdc6c6d 100644 --- a/src/uart3/ctl2.rs +++ b/src/uart3/ctl2.rs @@ -1,418 +1,220 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL2 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DENTR { - bits: bool, -} -impl DENTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DENRR { - bits: bool, -} -impl DENRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HDENR { - bits: bool, -} -impl HDENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IRLPR { - bits: bool, -} -impl IRLPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IRENR { - bits: bool, -} -impl IRENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _DENTW<'a> { +#[doc = "Reader of register CTL2"] +pub type R = crate::R; +#[doc = "Writer for register CTL2"] +pub type W = crate::W; +#[doc = "Register CTL2 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL2 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DENT`"] +pub type DENT_R = crate::R; +#[doc = "Write proxy for field `DENT`"] +pub struct DENT_W<'a> { w: &'a mut W, } -impl<'a> _DENTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DENT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _DENRW<'a> { +#[doc = "Reader of field `DENR`"] +pub type DENR_R = crate::R; +#[doc = "Write proxy for field `DENR`"] +pub struct DENR_W<'a> { w: &'a mut W, } -impl<'a> _DENRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DENR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _HDENW<'a> { +#[doc = "Reader of field `HDEN`"] +pub type HDEN_R = crate::R; +#[doc = "Write proxy for field `HDEN`"] +pub struct HDEN_W<'a> { w: &'a mut W, } -impl<'a> _HDENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HDEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _IRLPW<'a> { +#[doc = "Reader of field `IRLP`"] +pub type IRLP_R = crate::R; +#[doc = "Write proxy for field `IRLP`"] +pub struct IRLP_W<'a> { w: &'a mut W, } -impl<'a> _IRLPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IRLP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _IRENW<'a> { +#[doc = "Reader of field `IREN`"] +pub type IREN_R = crate::R; +#[doc = "Write proxy for field `IREN`"] +pub struct IREN_W<'a> { w: &'a mut W, } -impl<'a> _IRENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IREN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 7 - DMA request enable for transmission"] - #[inline] - pub fn dent(&self) -> DENTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DENTR { bits } + #[inline(always)] + pub fn dent(&self) -> DENT_R { + DENT_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - DMA request enable for reception"] - #[inline] - pub fn denr(&self) -> DENRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DENRR { bits } + #[inline(always)] + pub fn denr(&self) -> DENR_R { + DENR_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 3 - Half-duplex selection"] - #[inline] - pub fn hden(&self) -> HDENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HDENR { bits } + #[inline(always)] + pub fn hden(&self) -> HDEN_R { + HDEN_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - IrDA low-power"] - #[inline] - pub fn irlp(&self) -> IRLPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IRLPR { bits } + #[inline(always)] + pub fn irlp(&self) -> IRLP_R { + IRLP_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - IrDA mode enable"] - #[inline] - pub fn iren(&self) -> IRENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IRENR { bits } + #[inline(always)] + pub fn iren(&self) -> IREN_R { + IREN_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Error interrupt enable"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 7 - DMA request enable for transmission"] - #[inline] - pub fn dent(&mut self) -> _DENTW { - _DENTW { w: self } + #[inline(always)] + pub fn dent(&mut self) -> DENT_W { + DENT_W { w: self } } #[doc = "Bit 6 - DMA request enable for reception"] - #[inline] - pub fn denr(&mut self) -> _DENRW { - _DENRW { w: self } + #[inline(always)] + pub fn denr(&mut self) -> DENR_W { + DENR_W { w: self } } #[doc = "Bit 3 - Half-duplex selection"] - #[inline] - pub fn hden(&mut self) -> _HDENW { - _HDENW { w: self } + #[inline(always)] + pub fn hden(&mut self) -> HDEN_W { + HDEN_W { w: self } } #[doc = "Bit 2 - IrDA low-power"] - #[inline] - pub fn irlp(&mut self) -> _IRLPW { - _IRLPW { w: self } + #[inline(always)] + pub fn irlp(&mut self) -> IRLP_W { + IRLP_W { w: self } } #[doc = "Bit 1 - IrDA mode enable"] - #[inline] - pub fn iren(&mut self) -> _IRENW { - _IRENW { w: self } + #[inline(always)] + pub fn iren(&mut self) -> IREN_W { + IREN_W { w: self } } #[doc = "Bit 0 - Error interrupt enable"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } } diff --git a/src/uart3/data.rs b/src/uart3/data.rs index ee4918113bdc8f0dce2875b1f21392d5170b3f8b..4ff98ba8d5bdcc17fc43b195bd1930a48c0f9cd8 100644 --- a/src/uart3/data.rs +++ b/src/uart3/data.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DATA { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA"] +pub type R = crate::R; +#[doc = "Writer for register DATA"] +pub type W = crate::W; +#[doc = "Register DATA `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x01ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01ff) | ((value as u32) & 0x01ff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:8 - Transmit or read data value"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0x01ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0x01ff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:8 - Transmit or read data value"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/uart3/gp.rs b/src/uart3/gp.rs index b5b43fe37a432e5cf8c74e79520464dcbadc50c8..57d5defa0464f2d69a575169cb2062aab4000618 100644 --- a/src/uart3/gp.rs +++ b/src/uart3/gp.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::GP { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PSCR { - bits: u8, -} -impl PSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PSCW<'a> { +#[doc = "Reader of register GP"] +pub type R = crate::R; +#[doc = "Writer for register GP"] +pub type W = crate::W; +#[doc = "Register GP `reset()`'s with value 0"] +impl crate::ResetValue for super::GP { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PSC`"] +pub type PSC_R = crate::R; +#[doc = "Write proxy for field `PSC`"] +pub struct PSC_W<'a> { w: &'a mut W, } -impl<'a> _PSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:7 - Prescaler value"] - #[inline] - pub fn psc(&self) -> PSCR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PSCR { bits } + #[inline(always)] + pub fn psc(&self) -> PSC_R { + PSC_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:7 - Prescaler value"] - #[inline] - pub fn psc(&mut self) -> _PSCW { - _PSCW { w: self } + #[inline(always)] + pub fn psc(&mut self) -> PSC_W { + PSC_W { w: self } } } diff --git a/src/uart3/stat.rs b/src/uart3/stat.rs index cef94ac30805171afecd7315ff1dd7573b0d3726..1d4e46ce61e1cebd518ee7524e9ab890fc52b062 100644 --- a/src/uart3/stat.rs +++ b/src/uart3/stat.rs @@ -1,427 +1,160 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::STAT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct LBDFR { - bits: bool, -} -impl LBDFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TBER { - bits: bool, -} -impl TBER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TCR { - bits: bool, -} -impl TCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RBNER { - bits: bool, -} -impl RBNER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IDLEFR { - bits: bool, -} -impl IDLEFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ORERRR { - bits: bool, -} -impl ORERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NERRR { - bits: bool, -} -impl NERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FERRR { - bits: bool, -} -impl FERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PERRR { - bits: bool, -} -impl PERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _LBDFW<'a> { +#[doc = "Reader of register STAT"] +pub type R = crate::R; +#[doc = "Writer for register STAT"] +pub type W = crate::W; +#[doc = "Register STAT `reset()`'s with value 0xc0"] +impl crate::ResetValue for super::STAT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0xc0 + } +} +#[doc = "Reader of field `LBDF`"] +pub type LBDF_R = crate::R; +#[doc = "Write proxy for field `LBDF`"] +pub struct LBDF_W<'a> { w: &'a mut W, } -impl<'a> _LBDFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LBDF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _TCW<'a> { +#[doc = "Reader of field `TBE`"] +pub type TBE_R = crate::R; +#[doc = "Reader of field `TC`"] +pub type TC_R = crate::R; +#[doc = "Write proxy for field `TC`"] +pub struct TC_W<'a> { w: &'a mut W, } -impl<'a> _TCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _RBNEW<'a> { +#[doc = "Reader of field `RBNE`"] +pub type RBNE_R = crate::R; +#[doc = "Write proxy for field `RBNE`"] +pub struct RBNE_W<'a> { w: &'a mut W, } -impl<'a> _RBNEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RBNE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } +#[doc = "Reader of field `IDLEF`"] +pub type IDLEF_R = crate::R; +#[doc = "Reader of field `ORERR`"] +pub type ORERR_R = crate::R; +#[doc = "Reader of field `NERR`"] +pub type NERR_R = crate::R; +#[doc = "Reader of field `FERR`"] +pub type FERR_R = crate::R; +#[doc = "Reader of field `PERR`"] +pub type PERR_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 8 - LIN break detection flag"] - #[inline] - pub fn lbdf(&self) -> LBDFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LBDFR { bits } + #[inline(always)] + pub fn lbdf(&self) -> LBDF_R { + LBDF_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - Transmit data buffer empty"] - #[inline] - pub fn tbe(&self) -> TBER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TBER { bits } + #[inline(always)] + pub fn tbe(&self) -> TBE_R { + TBE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Transmission complete"] - #[inline] - pub fn tc(&self) -> TCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TCR { bits } + #[inline(always)] + pub fn tc(&self) -> TC_R { + TC_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Read data buffer not empty"] - #[inline] - pub fn rbne(&self) -> RBNER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RBNER { bits } + #[inline(always)] + pub fn rbne(&self) -> RBNE_R { + RBNE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - IDLE frame detected flag"] - #[inline] - pub fn idlef(&self) -> IDLEFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IDLEFR { bits } + #[inline(always)] + pub fn idlef(&self) -> IDLEF_R { + IDLEF_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Overrun error"] - #[inline] - pub fn orerr(&self) -> ORERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ORERRR { bits } + #[inline(always)] + pub fn orerr(&self) -> ORERR_R { + ORERR_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Noise error flag"] - #[inline] - pub fn nerr(&self) -> NERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NERRR { bits } + #[inline(always)] + pub fn nerr(&self) -> NERR_R { + NERR_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Frame error flag"] - #[inline] - pub fn ferr(&self) -> FERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FERRR { bits } + #[inline(always)] + pub fn ferr(&self) -> FERR_R { + FERR_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Parity error flag"] - #[inline] - pub fn perr(&self) -> PERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PERRR { bits } + #[inline(always)] + pub fn perr(&self) -> PERR_R { + PERR_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0xc0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 8 - LIN break detection flag"] - #[inline] - pub fn lbdf(&mut self) -> _LBDFW { - _LBDFW { w: self } + #[inline(always)] + pub fn lbdf(&mut self) -> LBDF_W { + LBDF_W { w: self } } #[doc = "Bit 6 - Transmission complete"] - #[inline] - pub fn tc(&mut self) -> _TCW { - _TCW { w: self } + #[inline(always)] + pub fn tc(&mut self) -> TC_W { + TC_W { w: self } } #[doc = "Bit 5 - Read data buffer not empty"] - #[inline] - pub fn rbne(&mut self) -> _RBNEW { - _RBNEW { w: self } + #[inline(always)] + pub fn rbne(&mut self) -> RBNE_W { + RBNE_W { w: self } } } diff --git a/src/usart0.rs b/src/usart0.rs index 30e9a69c24eb585f85947f013218f7e6b6c6cf28..91a81c9cb4e87dd5aa8dee8d15daeac535becdb1 100644 --- a/src/usart0.rs +++ b/src/usart0.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Status register"] @@ -16,45 +16,80 @@ pub struct RegisterBlock { #[doc = "0x18 - Guard time and prescaler register"] pub gp: GP, } -#[doc = "Status register"] -pub struct STAT { - register: ::vcell::VolatileCell, -} +#[doc = "Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [stat](stat) module"] +pub type STAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _STAT; +#[doc = "`read()` method returns [stat::R](stat::R) reader structure"] +impl crate::Readable for STAT {} +#[doc = "`write(|w| ..)` method takes [stat::W](stat::W) writer structure"] +impl crate::Writable for STAT {} #[doc = "Status register"] pub mod stat; -#[doc = "Data register"] -pub struct DATA { - register: ::vcell::VolatileCell, -} +#[doc = "Data register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [data](data) module"] +pub type DATA = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DATA; +#[doc = "`read()` method returns [data::R](data::R) reader structure"] +impl crate::Readable for DATA {} +#[doc = "`write(|w| ..)` method takes [data::W](data::W) writer structure"] +impl crate::Writable for DATA {} #[doc = "Data register"] pub mod data; -#[doc = "Baud rate register"] -pub struct BAUD { - register: ::vcell::VolatileCell, -} +#[doc = "Baud rate register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [baud](baud) module"] +pub type BAUD = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _BAUD; +#[doc = "`read()` method returns [baud::R](baud::R) reader structure"] +impl crate::Readable for BAUD {} +#[doc = "`write(|w| ..)` method takes [baud::W](baud::W) writer structure"] +impl crate::Writable for BAUD {} #[doc = "Baud rate register"] pub mod baud; -#[doc = "Control register 0"] -pub struct CTL0 { - register: ::vcell::VolatileCell, -} +#[doc = "Control register 0\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl0](ctl0) module"] +pub type CTL0 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL0; +#[doc = "`read()` method returns [ctl0::R](ctl0::R) reader structure"] +impl crate::Readable for CTL0 {} +#[doc = "`write(|w| ..)` method takes [ctl0::W](ctl0::W) writer structure"] +impl crate::Writable for CTL0 {} #[doc = "Control register 0"] pub mod ctl0; -#[doc = "Control register 1"] -pub struct CTL1 { - register: ::vcell::VolatileCell, -} +#[doc = "Control register 1\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl1](ctl1) module"] +pub type CTL1 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL1; +#[doc = "`read()` method returns [ctl1::R](ctl1::R) reader structure"] +impl crate::Readable for CTL1 {} +#[doc = "`write(|w| ..)` method takes [ctl1::W](ctl1::W) writer structure"] +impl crate::Writable for CTL1 {} #[doc = "Control register 1"] pub mod ctl1; -#[doc = "Control register 2"] -pub struct CTL2 { - register: ::vcell::VolatileCell, -} +#[doc = "Control register 2\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl2](ctl2) module"] +pub type CTL2 = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL2; +#[doc = "`read()` method returns [ctl2::R](ctl2::R) reader structure"] +impl crate::Readable for CTL2 {} +#[doc = "`write(|w| ..)` method takes [ctl2::W](ctl2::W) writer structure"] +impl crate::Writable for CTL2 {} #[doc = "Control register 2"] pub mod ctl2; -#[doc = "Guard time and prescaler register"] -pub struct GP { - register: ::vcell::VolatileCell, -} +#[doc = "Guard time and prescaler register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gp](gp) module"] +pub type GP = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _GP; +#[doc = "`read()` method returns [gp::R](gp::R) reader structure"] +impl crate::Readable for GP {} +#[doc = "`write(|w| ..)` method takes [gp::W](gp::W) writer structure"] +impl crate::Writable for GP {} #[doc = "Guard time and prescaler register"] pub mod gp; diff --git a/src/usart0/baud.rs b/src/usart0/baud.rs index 484596bcf8542be6ae80f91974b1e26f68bd424f..9cd9435323d6a2ce6c58711a3fa60c4de7ec0768 100644 --- a/src/usart0/baud.rs +++ b/src/usart0/baud.rs @@ -1,146 +1,64 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::BAUD { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct INTDIVR { - bits: u16, -} -impl INTDIVR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct FRADIVR { - bits: u8, -} -impl FRADIVR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits +#[doc = "Reader of register BAUD"] +pub type R = crate::R; +#[doc = "Writer for register BAUD"] +pub type W = crate::W; +#[doc = "Register BAUD `reset()`'s with value 0"] +impl crate::ResetValue for super::BAUD { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _INTDIVW<'a> { +#[doc = "Reader of field `INTDIV`"] +pub type INTDIV_R = crate::R; +#[doc = "Write proxy for field `INTDIV`"] +pub struct INTDIV_W<'a> { w: &'a mut W, } -impl<'a> _INTDIVW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> INTDIV_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0fff << 4)) | (((value as u32) & 0x0fff) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _FRADIVW<'a> { +#[doc = "Reader of field `FRADIV`"] +pub type FRADIV_R = crate::R; +#[doc = "Write proxy for field `FRADIV`"] +pub struct FRADIV_W<'a> { w: &'a mut W, } -impl<'a> _FRADIVW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> FRADIV_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 4:15 - Integer part of baud-rate divider"] - #[inline] - pub fn intdiv(&self) -> INTDIVR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - INTDIVR { bits } + #[inline(always)] + pub fn intdiv(&self) -> INTDIV_R { + INTDIV_R::new(((self.bits >> 4) & 0x0fff) as u16) } #[doc = "Bits 0:3 - Fraction part of baud-rate divider"] - #[inline] - pub fn fradiv(&self) -> FRADIVR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - FRADIVR { bits } + #[inline(always)] + pub fn fradiv(&self) -> FRADIV_R { + FRADIV_R::new((self.bits & 0x0f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 4:15 - Integer part of baud-rate divider"] - #[inline] - pub fn intdiv(&mut self) -> _INTDIVW { - _INTDIVW { w: self } + #[inline(always)] + pub fn intdiv(&mut self) -> INTDIV_W { + INTDIV_W { w: self } } #[doc = "Bits 0:3 - Fraction part of baud-rate divider"] - #[inline] - pub fn fradiv(&mut self) -> _FRADIVW { - _FRADIVW { w: self } + #[inline(always)] + pub fn fradiv(&mut self) -> FRADIV_W { + FRADIV_W { w: self } } } diff --git a/src/usart0/ctl0.rs b/src/usart0/ctl0.rs index 1148803ea6c773e534c8bb553b31c9dd203dc9c8..c5778c44f20a290e0b9d9ef180fa3c74ae3a20c9 100644 --- a/src/usart0/ctl0.rs +++ b/src/usart0/ctl0.rs @@ -1,890 +1,492 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL0 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct UENR { - bits: bool, -} -impl UENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WLR { - bits: bool, -} -impl WLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WMR { - bits: bool, -} -impl WMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PCENR { - bits: bool, -} -impl PCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PMR { - bits: bool, -} -impl PMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PERRIER { - bits: bool, -} -impl PERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TBEIER { - bits: bool, -} -impl TBEIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TCIER { - bits: bool, -} -impl TCIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RBNEIER { - bits: bool, -} -impl RBNEIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IDLEIER { - bits: bool, -} -impl IDLEIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TENR { - bits: bool, -} -impl TENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RENR { - bits: bool, -} -impl RENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RWUR { - bits: bool, -} -impl RWUR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SBKCMDR { - bits: bool, -} -impl SBKCMDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _UENW<'a> { +#[doc = "Reader of register CTL0"] +pub type R = crate::R; +#[doc = "Writer for register CTL0"] +pub type W = crate::W; +#[doc = "Register CTL0 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL0 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `UEN`"] +pub type UEN_R = crate::R; +#[doc = "Write proxy for field `UEN`"] +pub struct UEN_W<'a> { w: &'a mut W, } -impl<'a> _UENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> UEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _WLW<'a> { +#[doc = "Reader of field `WL`"] +pub type WL_R = crate::R; +#[doc = "Write proxy for field `WL`"] +pub struct WL_W<'a> { w: &'a mut W, } -impl<'a> _WLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _WMW<'a> { +#[doc = "Reader of field `WM`"] +pub type WM_R = crate::R; +#[doc = "Write proxy for field `WM`"] +pub struct WM_W<'a> { w: &'a mut W, } -impl<'a> _WMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _PCENW<'a> { +#[doc = "Reader of field `PCEN`"] +pub type PCEN_R = crate::R; +#[doc = "Write proxy for field `PCEN`"] +pub struct PCEN_W<'a> { w: &'a mut W, } -impl<'a> _PCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _PMW<'a> { +#[doc = "Reader of field `PM`"] +pub type PM_R = crate::R; +#[doc = "Write proxy for field `PM`"] +pub struct PM_W<'a> { w: &'a mut W, } -impl<'a> _PMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _PERRIEW<'a> { +#[doc = "Reader of field `PERRIE`"] +pub type PERRIE_R = crate::R; +#[doc = "Write proxy for field `PERRIE`"] +pub struct PERRIE_W<'a> { w: &'a mut W, } -impl<'a> _PERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _TBEIEW<'a> { +#[doc = "Reader of field `TBEIE`"] +pub type TBEIE_R = crate::R; +#[doc = "Write proxy for field `TBEIE`"] +pub struct TBEIE_W<'a> { w: &'a mut W, } -impl<'a> _TBEIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TBEIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _TCIEW<'a> { +#[doc = "Reader of field `TCIE`"] +pub type TCIE_R = crate::R; +#[doc = "Write proxy for field `TCIE`"] +pub struct TCIE_W<'a> { w: &'a mut W, } -impl<'a> _TCIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TCIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _RBNEIEW<'a> { +#[doc = "Reader of field `RBNEIE`"] +pub type RBNEIE_R = crate::R; +#[doc = "Write proxy for field `RBNEIE`"] +pub struct RBNEIE_W<'a> { w: &'a mut W, } -impl<'a> _RBNEIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RBNEIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _IDLEIEW<'a> { +#[doc = "Reader of field `IDLEIE`"] +pub type IDLEIE_R = crate::R; +#[doc = "Write proxy for field `IDLEIE`"] +pub struct IDLEIE_W<'a> { w: &'a mut W, } -impl<'a> _IDLEIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IDLEIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _TENW<'a> { +#[doc = "Reader of field `TEN`"] +pub type TEN_R = crate::R; +#[doc = "Write proxy for field `TEN`"] +pub struct TEN_W<'a> { w: &'a mut W, } -impl<'a> _TENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _RENW<'a> { +#[doc = "Reader of field `REN`"] +pub type REN_R = crate::R; +#[doc = "Write proxy for field `REN`"] +pub struct REN_W<'a> { w: &'a mut W, } -impl<'a> _RENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _RWUW<'a> { +#[doc = "Reader of field `RWU`"] +pub type RWU_R = crate::R; +#[doc = "Write proxy for field `RWU`"] +pub struct RWU_W<'a> { w: &'a mut W, } -impl<'a> _RWUW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RWU_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _SBKCMDW<'a> { +#[doc = "Reader of field `SBKCMD`"] +pub type SBKCMD_R = crate::R; +#[doc = "Write proxy for field `SBKCMD`"] +pub struct SBKCMD_W<'a> { w: &'a mut W, } -impl<'a> _SBKCMDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SBKCMD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 13 - USART enable"] - #[inline] - pub fn uen(&self) -> UENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - UENR { bits } + #[inline(always)] + pub fn uen(&self) -> UEN_R { + UEN_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 12 - Word length"] - #[inline] - pub fn wl(&self) -> WLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WLR { bits } + #[inline(always)] + pub fn wl(&self) -> WL_R { + WL_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 11 - Wakeup method in mute mode"] - #[inline] - pub fn wm(&self) -> WMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WMR { bits } + #[inline(always)] + pub fn wm(&self) -> WM_R { + WM_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Parity check function enable"] - #[inline] - pub fn pcen(&self) -> PCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PCENR { bits } + #[inline(always)] + pub fn pcen(&self) -> PCEN_R { + PCEN_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Parity mode"] - #[inline] - pub fn pm(&self) -> PMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PMR { bits } + #[inline(always)] + pub fn pm(&self) -> PM_R { + PM_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - Parity error interrupt enable"] - #[inline] - pub fn perrie(&self) -> PERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PERRIER { bits } + #[inline(always)] + pub fn perrie(&self) -> PERRIE_R { + PERRIE_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - Transmitter buffer empty interrupt enable"] - #[inline] - pub fn tbeie(&self) -> TBEIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TBEIER { bits } + #[inline(always)] + pub fn tbeie(&self) -> TBEIE_R { + TBEIE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Transmission complete interrupt enable"] - #[inline] - pub fn tcie(&self) -> TCIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TCIER { bits } + #[inline(always)] + pub fn tcie(&self) -> TCIE_R { + TCIE_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Read data buffer not empty interrupt and overrun error interrupt enable"] - #[inline] - pub fn rbneie(&self) -> RBNEIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RBNEIER { bits } + #[inline(always)] + pub fn rbneie(&self) -> RBNEIE_R { + RBNEIE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - IDLE line detected interrupt enable"] - #[inline] - pub fn idleie(&self) -> IDLEIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IDLEIER { bits } + #[inline(always)] + pub fn idleie(&self) -> IDLEIE_R { + IDLEIE_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Transmitter enable"] - #[inline] - pub fn ten(&self) -> TENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TENR { bits } + #[inline(always)] + pub fn ten(&self) -> TEN_R { + TEN_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Receiver enable"] - #[inline] - pub fn ren(&self) -> RENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RENR { bits } + #[inline(always)] + pub fn ren(&self) -> REN_R { + REN_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Receiver wakeup from mute mode"] - #[inline] - pub fn rwu(&self) -> RWUR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RWUR { bits } + #[inline(always)] + pub fn rwu(&self) -> RWU_R { + RWU_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Send break command"] - #[inline] - pub fn sbkcmd(&self) -> SBKCMDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SBKCMDR { bits } + #[inline(always)] + pub fn sbkcmd(&self) -> SBKCMD_R { + SBKCMD_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 13 - USART enable"] - #[inline] - pub fn uen(&mut self) -> _UENW { - _UENW { w: self } + #[inline(always)] + pub fn uen(&mut self) -> UEN_W { + UEN_W { w: self } } #[doc = "Bit 12 - Word length"] - #[inline] - pub fn wl(&mut self) -> _WLW { - _WLW { w: self } + #[inline(always)] + pub fn wl(&mut self) -> WL_W { + WL_W { w: self } } #[doc = "Bit 11 - Wakeup method in mute mode"] - #[inline] - pub fn wm(&mut self) -> _WMW { - _WMW { w: self } + #[inline(always)] + pub fn wm(&mut self) -> WM_W { + WM_W { w: self } } #[doc = "Bit 10 - Parity check function enable"] - #[inline] - pub fn pcen(&mut self) -> _PCENW { - _PCENW { w: self } + #[inline(always)] + pub fn pcen(&mut self) -> PCEN_W { + PCEN_W { w: self } } #[doc = "Bit 9 - Parity mode"] - #[inline] - pub fn pm(&mut self) -> _PMW { - _PMW { w: self } + #[inline(always)] + pub fn pm(&mut self) -> PM_W { + PM_W { w: self } } #[doc = "Bit 8 - Parity error interrupt enable"] - #[inline] - pub fn perrie(&mut self) -> _PERRIEW { - _PERRIEW { w: self } + #[inline(always)] + pub fn perrie(&mut self) -> PERRIE_W { + PERRIE_W { w: self } } #[doc = "Bit 7 - Transmitter buffer empty interrupt enable"] - #[inline] - pub fn tbeie(&mut self) -> _TBEIEW { - _TBEIEW { w: self } + #[inline(always)] + pub fn tbeie(&mut self) -> TBEIE_W { + TBEIE_W { w: self } } #[doc = "Bit 6 - Transmission complete interrupt enable"] - #[inline] - pub fn tcie(&mut self) -> _TCIEW { - _TCIEW { w: self } + #[inline(always)] + pub fn tcie(&mut self) -> TCIE_W { + TCIE_W { w: self } } #[doc = "Bit 5 - Read data buffer not empty interrupt and overrun error interrupt enable"] - #[inline] - pub fn rbneie(&mut self) -> _RBNEIEW { - _RBNEIEW { w: self } + #[inline(always)] + pub fn rbneie(&mut self) -> RBNEIE_W { + RBNEIE_W { w: self } } #[doc = "Bit 4 - IDLE line detected interrupt enable"] - #[inline] - pub fn idleie(&mut self) -> _IDLEIEW { - _IDLEIEW { w: self } + #[inline(always)] + pub fn idleie(&mut self) -> IDLEIE_W { + IDLEIE_W { w: self } } #[doc = "Bit 3 - Transmitter enable"] - #[inline] - pub fn ten(&mut self) -> _TENW { - _TENW { w: self } + #[inline(always)] + pub fn ten(&mut self) -> TEN_W { + TEN_W { w: self } } #[doc = "Bit 2 - Receiver enable"] - #[inline] - pub fn ren(&mut self) -> _RENW { - _RENW { w: self } + #[inline(always)] + pub fn ren(&mut self) -> REN_W { + REN_W { w: self } } #[doc = "Bit 1 - Receiver wakeup from mute mode"] - #[inline] - pub fn rwu(&mut self) -> _RWUW { - _RWUW { w: self } + #[inline(always)] + pub fn rwu(&mut self) -> RWU_W { + RWU_W { w: self } } #[doc = "Bit 0 - Send break command"] - #[inline] - pub fn sbkcmd(&mut self) -> _SBKCMDW { - _SBKCMDW { w: self } + #[inline(always)] + pub fn sbkcmd(&mut self) -> SBKCMD_W { + SBKCMD_W { w: self } } } diff --git a/src/usart0/ctl1.rs b/src/usart0/ctl1.rs index 5d447092c8012641521303c61ba580a64df78b9f..111b51dd1354f5d72c76cc22a7bcb5be7a223498 100644 --- a/src/usart0/ctl1.rs +++ b/src/usart0/ctl1.rs @@ -1,559 +1,302 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL1 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct LMENR { - bits: bool, -} -impl LMENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STBR { - bits: u8, -} -impl STBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct CKENR { - bits: bool, -} -impl CKENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CPLR { - bits: bool, -} -impl CPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CPHR { - bits: bool, -} -impl CPHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CLENR { - bits: bool, -} -impl CLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LBDIER { - bits: bool, -} -impl LBDIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LBLENR { - bits: bool, -} -impl LBLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ADDRR { - bits: u8, -} -impl ADDRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _LMENW<'a> { +#[doc = "Reader of register CTL1"] +pub type R = crate::R; +#[doc = "Writer for register CTL1"] +pub type W = crate::W; +#[doc = "Register CTL1 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL1 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `LMEN`"] +pub type LMEN_R = crate::R; +#[doc = "Write proxy for field `LMEN`"] +pub struct LMEN_W<'a> { w: &'a mut W, } -impl<'a> _LMENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LMEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _STBW<'a> { +#[doc = "Reader of field `STB`"] +pub type STB_R = crate::R; +#[doc = "Write proxy for field `STB`"] +pub struct STB_W<'a> { w: &'a mut W, } -impl<'a> _STBW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> STB_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 12)) | (((value as u32) & 0x03) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _CKENW<'a> { +#[doc = "Reader of field `CKEN`"] +pub type CKEN_R = crate::R; +#[doc = "Write proxy for field `CKEN`"] +pub struct CKEN_W<'a> { w: &'a mut W, } -impl<'a> _CKENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CKEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _CPLW<'a> { +#[doc = "Reader of field `CPL`"] +pub type CPL_R = crate::R; +#[doc = "Write proxy for field `CPL`"] +pub struct CPL_W<'a> { w: &'a mut W, } -impl<'a> _CPLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CPL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _CPHW<'a> { +#[doc = "Reader of field `CPH`"] +pub type CPH_R = crate::R; +#[doc = "Write proxy for field `CPH`"] +pub struct CPH_W<'a> { w: &'a mut W, } -impl<'a> _CPHW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CPH_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _CLENW<'a> { +#[doc = "Reader of field `CLEN`"] +pub type CLEN_R = crate::R; +#[doc = "Write proxy for field `CLEN`"] +pub struct CLEN_W<'a> { w: &'a mut W, } -impl<'a> _CLENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CLEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _LBDIEW<'a> { +#[doc = "Reader of field `LBDIE`"] +pub type LBDIE_R = crate::R; +#[doc = "Write proxy for field `LBDIE`"] +pub struct LBDIE_W<'a> { w: &'a mut W, } -impl<'a> _LBDIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LBDIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _LBLENW<'a> { +#[doc = "Reader of field `LBLEN`"] +pub type LBLEN_R = crate::R; +#[doc = "Write proxy for field `LBLEN`"] +pub struct LBLEN_W<'a> { w: &'a mut W, } -impl<'a> _LBLENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LBLEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _ADDRW<'a> { +#[doc = "Reader of field `ADDR`"] +pub type ADDR_R = crate::R; +#[doc = "Write proxy for field `ADDR`"] +pub struct ADDR_W<'a> { w: &'a mut W, } -impl<'a> _ADDRW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> ADDR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 14 - LIN mode enable"] - #[inline] - pub fn lmen(&self) -> LMENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LMENR { bits } + #[inline(always)] + pub fn lmen(&self) -> LMEN_R { + LMEN_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bits 12:13 - STOP bits length"] - #[inline] - pub fn stb(&self) -> STBR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - STBR { bits } + #[inline(always)] + pub fn stb(&self) -> STB_R { + STB_R::new(((self.bits >> 12) & 0x03) as u8) } #[doc = "Bit 11 - CK pin enable"] - #[inline] - pub fn cken(&self) -> CKENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CKENR { bits } + #[inline(always)] + pub fn cken(&self) -> CKEN_R { + CKEN_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 10 - Clock polarity"] - #[inline] - pub fn cpl(&self) -> CPLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CPLR { bits } + #[inline(always)] + pub fn cpl(&self) -> CPL_R { + CPL_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - Clock phase"] - #[inline] - pub fn cph(&self) -> CPHR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CPHR { bits } + #[inline(always)] + pub fn cph(&self) -> CPH_R { + CPH_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - CK Length"] - #[inline] - pub fn clen(&self) -> CLENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CLENR { bits } + #[inline(always)] + pub fn clen(&self) -> CLEN_R { + CLEN_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 6 - LIN break detection interrupt enable"] - #[inline] - pub fn lbdie(&self) -> LBDIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LBDIER { bits } + #[inline(always)] + pub fn lbdie(&self) -> LBDIE_R { + LBDIE_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - LIN break frame length"] - #[inline] - pub fn lblen(&self) -> LBLENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LBLENR { bits } + #[inline(always)] + pub fn lblen(&self) -> LBLEN_R { + LBLEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bits 0:3 - Address of the USART"] - #[inline] - pub fn addr(&self) -> ADDRR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ADDRR { bits } + #[inline(always)] + pub fn addr(&self) -> ADDR_R { + ADDR_R::new((self.bits & 0x0f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 14 - LIN mode enable"] - #[inline] - pub fn lmen(&mut self) -> _LMENW { - _LMENW { w: self } + #[inline(always)] + pub fn lmen(&mut self) -> LMEN_W { + LMEN_W { w: self } } #[doc = "Bits 12:13 - STOP bits length"] - #[inline] - pub fn stb(&mut self) -> _STBW { - _STBW { w: self } + #[inline(always)] + pub fn stb(&mut self) -> STB_W { + STB_W { w: self } } #[doc = "Bit 11 - CK pin enable"] - #[inline] - pub fn cken(&mut self) -> _CKENW { - _CKENW { w: self } + #[inline(always)] + pub fn cken(&mut self) -> CKEN_W { + CKEN_W { w: self } } #[doc = "Bit 10 - Clock polarity"] - #[inline] - pub fn cpl(&mut self) -> _CPLW { - _CPLW { w: self } + #[inline(always)] + pub fn cpl(&mut self) -> CPL_W { + CPL_W { w: self } } #[doc = "Bit 9 - Clock phase"] - #[inline] - pub fn cph(&mut self) -> _CPHW { - _CPHW { w: self } + #[inline(always)] + pub fn cph(&mut self) -> CPH_W { + CPH_W { w: self } } #[doc = "Bit 8 - CK Length"] - #[inline] - pub fn clen(&mut self) -> _CLENW { - _CLENW { w: self } + #[inline(always)] + pub fn clen(&mut self) -> CLEN_W { + CLEN_W { w: self } } #[doc = "Bit 6 - LIN break detection interrupt enable"] - #[inline] - pub fn lbdie(&mut self) -> _LBDIEW { - _LBDIEW { w: self } + #[inline(always)] + pub fn lbdie(&mut self) -> LBDIE_W { + LBDIE_W { w: self } } #[doc = "Bit 5 - LIN break frame length"] - #[inline] - pub fn lblen(&mut self) -> _LBLENW { - _LBLENW { w: self } + #[inline(always)] + pub fn lblen(&mut self) -> LBLEN_W { + LBLEN_W { w: self } } #[doc = "Bits 0:3 - Address of the USART"] - #[inline] - pub fn addr(&mut self) -> _ADDRW { - _ADDRW { w: self } + #[inline(always)] + pub fn addr(&mut self) -> ADDR_W { + ADDR_W { w: self } } } diff --git a/src/usart0/ctl2.rs b/src/usart0/ctl2.rs index afbe828106734a69ca5bd802341ac11ce4636493..4014de771e4793a2886aaab6dc798f528ca568f1 100644 --- a/src/usart0/ctl2.rs +++ b/src/usart0/ctl2.rs @@ -1,713 +1,390 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL2 { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CTSIER { - bits: bool, -} -impl CTSIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CTSENR { - bits: bool, -} -impl CTSENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RTSENR { - bits: bool, -} -impl RTSENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DENTR { - bits: bool, -} -impl DENTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DENRR { - bits: bool, -} -impl DENRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SCENR { - bits: bool, -} -impl SCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NKENR { - bits: bool, -} -impl NKENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HDENR { - bits: bool, -} -impl HDENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IRLPR { - bits: bool, -} -impl IRLPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IRENR { - bits: bool, -} -impl IRENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ERRIER { - bits: bool, -} -impl ERRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CTSIEW<'a> { +#[doc = "Reader of register CTL2"] +pub type R = crate::R; +#[doc = "Writer for register CTL2"] +pub type W = crate::W; +#[doc = "Register CTL2 `reset()`'s with value 0"] +impl crate::ResetValue for super::CTL2 { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CTSIE`"] +pub type CTSIE_R = crate::R; +#[doc = "Write proxy for field `CTSIE`"] +pub struct CTSIE_W<'a> { w: &'a mut W, } -impl<'a> _CTSIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CTSIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _CTSENW<'a> { +#[doc = "Reader of field `CTSEN`"] +pub type CTSEN_R = crate::R; +#[doc = "Write proxy for field `CTSEN`"] +pub struct CTSEN_W<'a> { w: &'a mut W, } -impl<'a> _CTSENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CTSEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _RTSENW<'a> { +#[doc = "Reader of field `RTSEN`"] +pub type RTSEN_R = crate::R; +#[doc = "Write proxy for field `RTSEN`"] +pub struct RTSEN_W<'a> { w: &'a mut W, } -impl<'a> _RTSENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RTSEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _DENTW<'a> { +#[doc = "Reader of field `DENT`"] +pub type DENT_R = crate::R; +#[doc = "Write proxy for field `DENT`"] +pub struct DENT_W<'a> { w: &'a mut W, } -impl<'a> _DENTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DENT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _DENRW<'a> { +#[doc = "Reader of field `DENR`"] +pub type DENR_R = crate::R; +#[doc = "Write proxy for field `DENR`"] +pub struct DENR_W<'a> { w: &'a mut W, } -impl<'a> _DENRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DENR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _SCENW<'a> { +#[doc = "Reader of field `SCEN`"] +pub type SCEN_R = crate::R; +#[doc = "Write proxy for field `SCEN`"] +pub struct SCEN_W<'a> { w: &'a mut W, } -impl<'a> _SCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _NKENW<'a> { +#[doc = "Reader of field `NKEN`"] +pub type NKEN_R = crate::R; +#[doc = "Write proxy for field `NKEN`"] +pub struct NKEN_W<'a> { w: &'a mut W, } -impl<'a> _NKENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NKEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _HDENW<'a> { +#[doc = "Reader of field `HDEN`"] +pub type HDEN_R = crate::R; +#[doc = "Write proxy for field `HDEN`"] +pub struct HDEN_W<'a> { w: &'a mut W, } -impl<'a> _HDENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HDEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _IRLPW<'a> { +#[doc = "Reader of field `IRLP`"] +pub type IRLP_R = crate::R; +#[doc = "Write proxy for field `IRLP`"] +pub struct IRLP_W<'a> { w: &'a mut W, } -impl<'a> _IRLPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IRLP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _IRENW<'a> { +#[doc = "Reader of field `IREN`"] +pub type IREN_R = crate::R; +#[doc = "Write proxy for field `IREN`"] +pub struct IREN_W<'a> { w: &'a mut W, } -impl<'a> _IRENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IREN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _ERRIEW<'a> { +#[doc = "Reader of field `ERRIE`"] +pub type ERRIE_R = crate::R; +#[doc = "Write proxy for field `ERRIE`"] +pub struct ERRIE_W<'a> { w: &'a mut W, } -impl<'a> _ERRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ERRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 10 - CTS interrupt enable"] - #[inline] - pub fn ctsie(&self) -> CTSIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CTSIER { bits } + #[inline(always)] + pub fn ctsie(&self) -> CTSIE_R { + CTSIE_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 9 - CTS enable"] - #[inline] - pub fn ctsen(&self) -> CTSENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CTSENR { bits } + #[inline(always)] + pub fn ctsen(&self) -> CTSEN_R { + CTSEN_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - RTS enable"] - #[inline] - pub fn rtsen(&self) -> RTSENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RTSENR { bits } + #[inline(always)] + pub fn rtsen(&self) -> RTSEN_R { + RTSEN_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - DMA request enable for transmission"] - #[inline] - pub fn dent(&self) -> DENTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DENTR { bits } + #[inline(always)] + pub fn dent(&self) -> DENT_R { + DENT_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - DMA request enable for reception"] - #[inline] - pub fn denr(&self) -> DENRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DENRR { bits } + #[inline(always)] + pub fn denr(&self) -> DENR_R { + DENR_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Smartcard mode enable"] - #[inline] - pub fn scen(&self) -> SCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SCENR { bits } + #[inline(always)] + pub fn scen(&self) -> SCEN_R { + SCEN_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - Smartcard NACK enable"] - #[inline] - pub fn nken(&self) -> NKENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NKENR { bits } + #[inline(always)] + pub fn nken(&self) -> NKEN_R { + NKEN_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Half-duplex selection"] - #[inline] - pub fn hden(&self) -> HDENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HDENR { bits } + #[inline(always)] + pub fn hden(&self) -> HDEN_R { + HDEN_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - IrDA low-power"] - #[inline] - pub fn irlp(&self) -> IRLPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IRLPR { bits } + #[inline(always)] + pub fn irlp(&self) -> IRLP_R { + IRLP_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - IrDA mode enable"] - #[inline] - pub fn iren(&self) -> IRENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IRENR { bits } + #[inline(always)] + pub fn iren(&self) -> IREN_R { + IREN_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Error interrupt enable"] - #[inline] - pub fn errie(&self) -> ERRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ERRIER { bits } + #[inline(always)] + pub fn errie(&self) -> ERRIE_R { + ERRIE_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 10 - CTS interrupt enable"] - #[inline] - pub fn ctsie(&mut self) -> _CTSIEW { - _CTSIEW { w: self } + #[inline(always)] + pub fn ctsie(&mut self) -> CTSIE_W { + CTSIE_W { w: self } } #[doc = "Bit 9 - CTS enable"] - #[inline] - pub fn ctsen(&mut self) -> _CTSENW { - _CTSENW { w: self } + #[inline(always)] + pub fn ctsen(&mut self) -> CTSEN_W { + CTSEN_W { w: self } } #[doc = "Bit 8 - RTS enable"] - #[inline] - pub fn rtsen(&mut self) -> _RTSENW { - _RTSENW { w: self } + #[inline(always)] + pub fn rtsen(&mut self) -> RTSEN_W { + RTSEN_W { w: self } } #[doc = "Bit 7 - DMA request enable for transmission"] - #[inline] - pub fn dent(&mut self) -> _DENTW { - _DENTW { w: self } + #[inline(always)] + pub fn dent(&mut self) -> DENT_W { + DENT_W { w: self } } #[doc = "Bit 6 - DMA request enable for reception"] - #[inline] - pub fn denr(&mut self) -> _DENRW { - _DENRW { w: self } + #[inline(always)] + pub fn denr(&mut self) -> DENR_W { + DENR_W { w: self } } #[doc = "Bit 5 - Smartcard mode enable"] - #[inline] - pub fn scen(&mut self) -> _SCENW { - _SCENW { w: self } + #[inline(always)] + pub fn scen(&mut self) -> SCEN_W { + SCEN_W { w: self } } #[doc = "Bit 4 - Smartcard NACK enable"] - #[inline] - pub fn nken(&mut self) -> _NKENW { - _NKENW { w: self } + #[inline(always)] + pub fn nken(&mut self) -> NKEN_W { + NKEN_W { w: self } } #[doc = "Bit 3 - Half-duplex selection"] - #[inline] - pub fn hden(&mut self) -> _HDENW { - _HDENW { w: self } + #[inline(always)] + pub fn hden(&mut self) -> HDEN_W { + HDEN_W { w: self } } #[doc = "Bit 2 - IrDA low-power"] - #[inline] - pub fn irlp(&mut self) -> _IRLPW { - _IRLPW { w: self } + #[inline(always)] + pub fn irlp(&mut self) -> IRLP_W { + IRLP_W { w: self } } #[doc = "Bit 1 - IrDA mode enable"] - #[inline] - pub fn iren(&mut self) -> _IRENW { - _IRENW { w: self } + #[inline(always)] + pub fn iren(&mut self) -> IREN_W { + IREN_W { w: self } } #[doc = "Bit 0 - Error interrupt enable"] - #[inline] - pub fn errie(&mut self) -> _ERRIEW { - _ERRIEW { w: self } + #[inline(always)] + pub fn errie(&mut self) -> ERRIE_W { + ERRIE_W { w: self } } } diff --git a/src/usart0/data.rs b/src/usart0/data.rs index ee4918113bdc8f0dce2875b1f21392d5170b3f8b..4ff98ba8d5bdcc17fc43b195bd1930a48c0f9cd8 100644 --- a/src/usart0/data.rs +++ b/src/usart0/data.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DATA { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DATAR { - bits: u16, -} -impl DATAR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DATAW<'a> { +#[doc = "Reader of register DATA"] +pub type R = crate::R; +#[doc = "Writer for register DATA"] +pub type W = crate::W; +#[doc = "Register DATA `reset()`'s with value 0"] +impl crate::ResetValue for super::DATA { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DATA`"] +pub type DATA_R = crate::R; +#[doc = "Write proxy for field `DATA`"] +pub struct DATA_W<'a> { w: &'a mut W, } -impl<'a> _DATAW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DATA_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x01ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01ff) | ((value as u32) & 0x01ff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:8 - Transmit or read data value"] - #[inline] - pub fn data(&self) -> DATAR { - let bits = { - const MASK: u16 = 0x01ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DATAR { bits } + #[inline(always)] + pub fn data(&self) -> DATA_R { + DATA_R::new((self.bits & 0x01ff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:8 - Transmit or read data value"] - #[inline] - pub fn data(&mut self) -> _DATAW { - _DATAW { w: self } + #[inline(always)] + pub fn data(&mut self) -> DATA_W { + DATA_W { w: self } } } diff --git a/src/usart0/gp.rs b/src/usart0/gp.rs index c287cf41de8d3840b9e4702f2d5d42bf370ff1cf..7cbf93830a9eed3dbbae984e226274fe56f8a79b 100644 --- a/src/usart0/gp.rs +++ b/src/usart0/gp.rs @@ -1,146 +1,64 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::GP { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct GUATR { - bits: u8, -} -impl GUATR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PSCR { - bits: u8, -} -impl PSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits +#[doc = "Reader of register GP"] +pub type R = crate::R; +#[doc = "Writer for register GP"] +pub type W = crate::W; +#[doc = "Register GP `reset()`'s with value 0"] +impl crate::ResetValue for super::GP { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _GUATW<'a> { +#[doc = "Reader of field `GUAT`"] +pub type GUAT_R = crate::R; +#[doc = "Write proxy for field `GUAT`"] +pub struct GUAT_W<'a> { w: &'a mut W, } -impl<'a> _GUATW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> GUAT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xff << 8)) | (((value as u32) & 0xff) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _PSCW<'a> { +#[doc = "Reader of field `PSC`"] +pub type PSC_R = crate::R; +#[doc = "Write proxy for field `PSC`"] +pub struct PSC_W<'a> { w: &'a mut W, } -impl<'a> _PSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 8:15 - Guard time value in Smartcard mode"] - #[inline] - pub fn guat(&self) -> GUATR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - GUATR { bits } + #[inline(always)] + pub fn guat(&self) -> GUAT_R { + GUAT_R::new(((self.bits >> 8) & 0xff) as u8) } #[doc = "Bits 0:7 - Prescaler value"] - #[inline] - pub fn psc(&self) -> PSCR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PSCR { bits } + #[inline(always)] + pub fn psc(&self) -> PSC_R { + PSC_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 8:15 - Guard time value in Smartcard mode"] - #[inline] - pub fn guat(&mut self) -> _GUATW { - _GUATW { w: self } + #[inline(always)] + pub fn guat(&mut self) -> GUAT_W { + GUAT_W { w: self } } #[doc = "Bits 0:7 - Prescaler value"] - #[inline] - pub fn psc(&mut self) -> _PSCW { - _PSCW { w: self } + #[inline(always)] + pub fn psc(&mut self) -> PSC_W { + PSC_W { w: self } } } diff --git a/src/usart0/stat.rs b/src/usart0/stat.rs index 0fd25666ba7814ae5d640a44a992d5e4bf447d56..f63b56ccfa69dd154e52134858e16fe9c69cbbd9 100644 --- a/src/usart0/stat.rs +++ b/src/usart0/stat.rs @@ -1,486 +1,194 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::STAT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CTSFR { - bits: bool, -} -impl CTSFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LBDFR { - bits: bool, -} -impl LBDFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TBER { - bits: bool, -} -impl TBER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TCR { - bits: bool, -} -impl TCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RBNER { - bits: bool, -} -impl RBNER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IDLEFR { - bits: bool, -} -impl IDLEFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ORERRR { - bits: bool, -} -impl ORERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NERRR { - bits: bool, -} -impl NERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FERRR { - bits: bool, -} -impl FERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PERRR { - bits: bool, -} -impl PERRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _CTSFW<'a> { +#[doc = "Reader of register STAT"] +pub type R = crate::R; +#[doc = "Writer for register STAT"] +pub type W = crate::W; +#[doc = "Register STAT `reset()`'s with value 0xc0"] +impl crate::ResetValue for super::STAT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0xc0 + } +} +#[doc = "Reader of field `CTSF`"] +pub type CTSF_R = crate::R; +#[doc = "Write proxy for field `CTSF`"] +pub struct CTSF_W<'a> { w: &'a mut W, } -impl<'a> _CTSFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CTSF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _LBDFW<'a> { +#[doc = "Reader of field `LBDF`"] +pub type LBDF_R = crate::R; +#[doc = "Write proxy for field `LBDF`"] +pub struct LBDF_W<'a> { w: &'a mut W, } -impl<'a> _LBDFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LBDF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _TCW<'a> { +#[doc = "Reader of field `TBE`"] +pub type TBE_R = crate::R; +#[doc = "Reader of field `TC`"] +pub type TC_R = crate::R; +#[doc = "Write proxy for field `TC`"] +pub struct TC_W<'a> { w: &'a mut W, } -impl<'a> _TCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _RBNEW<'a> { +#[doc = "Reader of field `RBNE`"] +pub type RBNE_R = crate::R; +#[doc = "Write proxy for field `RBNE`"] +pub struct RBNE_W<'a> { w: &'a mut W, } -impl<'a> _RBNEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RBNE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } +#[doc = "Reader of field `IDLEF`"] +pub type IDLEF_R = crate::R; +#[doc = "Reader of field `ORERR`"] +pub type ORERR_R = crate::R; +#[doc = "Reader of field `NERR`"] +pub type NERR_R = crate::R; +#[doc = "Reader of field `FERR`"] +pub type FERR_R = crate::R; +#[doc = "Reader of field `PERR`"] +pub type PERR_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 9 - CTS change flag"] - #[inline] - pub fn ctsf(&self) -> CTSFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CTSFR { bits } + #[inline(always)] + pub fn ctsf(&self) -> CTSF_R { + CTSF_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 8 - LIN break detection flag"] - #[inline] - pub fn lbdf(&self) -> LBDFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LBDFR { bits } + #[inline(always)] + pub fn lbdf(&self) -> LBDF_R { + LBDF_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 7 - Transmit data buffer empty"] - #[inline] - pub fn tbe(&self) -> TBER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TBER { bits } + #[inline(always)] + pub fn tbe(&self) -> TBE_R { + TBE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - Transmission complete"] - #[inline] - pub fn tc(&self) -> TCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TCR { bits } + #[inline(always)] + pub fn tc(&self) -> TC_R { + TC_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 5 - Read data buffer not empty"] - #[inline] - pub fn rbne(&self) -> RBNER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RBNER { bits } + #[inline(always)] + pub fn rbne(&self) -> RBNE_R { + RBNE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 4 - IDLE frame detected flag"] - #[inline] - pub fn idlef(&self) -> IDLEFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IDLEFR { bits } + #[inline(always)] + pub fn idlef(&self) -> IDLEF_R { + IDLEF_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Overrun error"] - #[inline] - pub fn orerr(&self) -> ORERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ORERRR { bits } + #[inline(always)] + pub fn orerr(&self) -> ORERR_R { + ORERR_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 2 - Noise error flag"] - #[inline] - pub fn nerr(&self) -> NERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NERRR { bits } + #[inline(always)] + pub fn nerr(&self) -> NERR_R { + NERR_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 1 - Frame error flag"] - #[inline] - pub fn ferr(&self) -> FERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FERRR { bits } + #[inline(always)] + pub fn ferr(&self) -> FERR_R { + FERR_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Parity error flag"] - #[inline] - pub fn perr(&self) -> PERRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PERRR { bits } + #[inline(always)] + pub fn perr(&self) -> PERR_R { + PERR_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0xc0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 9 - CTS change flag"] - #[inline] - pub fn ctsf(&mut self) -> _CTSFW { - _CTSFW { w: self } + #[inline(always)] + pub fn ctsf(&mut self) -> CTSF_W { + CTSF_W { w: self } } #[doc = "Bit 8 - LIN break detection flag"] - #[inline] - pub fn lbdf(&mut self) -> _LBDFW { - _LBDFW { w: self } + #[inline(always)] + pub fn lbdf(&mut self) -> LBDF_W { + LBDF_W { w: self } } #[doc = "Bit 6 - Transmission complete"] - #[inline] - pub fn tc(&mut self) -> _TCW { - _TCW { w: self } + #[inline(always)] + pub fn tc(&mut self) -> TC_W { + TC_W { w: self } } #[doc = "Bit 5 - Read data buffer not empty"] - #[inline] - pub fn rbne(&mut self) -> _RBNEW { - _RBNEW { w: self } + #[inline(always)] + pub fn rbne(&mut self) -> RBNE_W { + RBNE_W { w: self } } } diff --git a/src/usbfs_device.rs b/src/usbfs_device.rs index ac9312bbfe6d2840f167143bf3736ac14a078190..2967620e3a2ccad64cb65ed7c547052c6261dcf8 100644 --- a/src/usbfs_device.rs +++ b/src/usbfs_device.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - device configuration register (DCFG)"] @@ -7,7 +7,7 @@ pub struct RegisterBlock { pub dctl: DCTL, #[doc = "0x08 - device status register (DSTAT)"] pub dstat: DSTAT, - _reserved0: [u8; 4usize], + _reserved3: [u8; 4usize], #[doc = "0x10 - device IN endpoint common interrupt mask register (DIEPINTEN)"] pub diepinten: DIEPINTEN, #[doc = "0x14 - device OUT endpoint common interrupt enable register (DOEPINTEN)"] @@ -16,324 +16,502 @@ pub struct RegisterBlock { pub daepint: DAEPINT, #[doc = "0x1c - Device all endpoints interrupt enable register (DAEPINTEN)"] pub daepinten: DAEPINTEN, - _reserved1: [u8; 8usize], + _reserved7: [u8; 8usize], #[doc = "0x28 - device VBUS discharge time register"] pub dvbusdt: DVBUSDT, #[doc = "0x2c - device VBUS pulsing time register"] pub dvbuspt: DVBUSPT, - _reserved2: [u8; 4usize], + _reserved9: [u8; 4usize], #[doc = "0x34 - device IN endpoint FIFO empty interrupt enable register"] pub diepfeinten: DIEPFEINTEN, - _reserved3: [u8; 200usize], + _reserved10: [u8; 200usize], #[doc = "0x100 - device IN endpoint 0 control register (DIEP0CTL)"] pub diep0ctl: DIEP0CTL, - _reserved4: [u8; 4usize], + _reserved11: [u8; 4usize], #[doc = "0x108 - device endpoint-0 interrupt register"] pub diep0intf: DIEP0INTF, - _reserved5: [u8; 4usize], + _reserved12: [u8; 4usize], #[doc = "0x110 - device IN endpoint-0 transfer length register"] pub diep0len: DIEP0LEN, - _reserved6: [u8; 4usize], + _reserved13: [u8; 4usize], #[doc = "0x118 - device IN endpoint 0 transmit FIFO status register"] pub diep0tfstat: DIEP0TFSTAT, - _reserved7: [u8; 4usize], + _reserved14: [u8; 4usize], #[doc = "0x120 - device in endpoint-1 control register"] pub diep1ctl: DIEP1CTL, - _reserved8: [u8; 4usize], + _reserved15: [u8; 4usize], #[doc = "0x128 - device endpoint-1 interrupt register"] pub diep1intf: DIEP1INTF, - _reserved9: [u8; 4usize], + _reserved16: [u8; 4usize], #[doc = "0x130 - device IN endpoint-1 transfer length register"] pub diep1len: DIEP1LEN, - _reserved10: [u8; 4usize], + _reserved17: [u8; 4usize], #[doc = "0x138 - device IN endpoint 1 transmit FIFO status register"] pub diep1tfstat: DIEP1TFSTAT, - _reserved11: [u8; 4usize], + _reserved18: [u8; 4usize], #[doc = "0x140 - device endpoint-2 control register"] pub diep2ctl: DIEP2CTL, - _reserved12: [u8; 4usize], + _reserved19: [u8; 4usize], #[doc = "0x148 - device endpoint-2 interrupt register"] pub diep2intf: DIEP2INTF, - _reserved13: [u8; 4usize], + _reserved20: [u8; 4usize], #[doc = "0x150 - device IN endpoint-2 transfer length register"] pub diep2len: DIEP2LEN, - _reserved14: [u8; 4usize], + _reserved21: [u8; 4usize], #[doc = "0x158 - device IN endpoint 2 transmit FIFO status register"] pub diep2tfstat: DIEP2TFSTAT, - _reserved15: [u8; 4usize], + _reserved22: [u8; 4usize], #[doc = "0x160 - device endpoint-3 control register"] pub diep3ctl: DIEP3CTL, - _reserved16: [u8; 4usize], + _reserved23: [u8; 4usize], #[doc = "0x168 - device endpoint-3 interrupt register"] pub diep3intf: DIEP3INTF, - _reserved17: [u8; 4usize], + _reserved24: [u8; 4usize], #[doc = "0x170 - device IN endpoint-3 transfer length register"] pub diep3len: DIEP3LEN, - _reserved18: [u8; 4usize], + _reserved25: [u8; 4usize], #[doc = "0x178 - device IN endpoint 3 transmit FIFO status register"] pub diep3tfstat: DIEP3TFSTAT, - _reserved19: [u8; 388usize], + _reserved26: [u8; 388usize], #[doc = "0x300 - device endpoint-0 control register"] pub doep0ctl: DOEP0CTL, - _reserved20: [u8; 4usize], + _reserved27: [u8; 4usize], #[doc = "0x308 - device out endpoint-0 interrupt flag register"] pub doep0intf: DOEP0INTF, - _reserved21: [u8; 4usize], + _reserved28: [u8; 4usize], #[doc = "0x310 - device OUT endpoint-0 transfer length register"] pub doep0len: DOEP0LEN, - _reserved22: [u8; 12usize], + _reserved29: [u8; 12usize], #[doc = "0x320 - device endpoint-1 control register"] pub doep1ctl: DOEP1CTL, - _reserved23: [u8; 4usize], + _reserved30: [u8; 4usize], #[doc = "0x328 - device out endpoint-1 interrupt flag register"] pub doep1intf: DOEP1INTF, - _reserved24: [u8; 4usize], + _reserved31: [u8; 4usize], #[doc = "0x330 - device OUT endpoint-1 transfer length register"] pub doep1len: DOEP1LEN, - _reserved25: [u8; 12usize], + _reserved32: [u8; 12usize], #[doc = "0x340 - device endpoint-2 control register"] pub doep2ctl: DOEP2CTL, - _reserved26: [u8; 4usize], + _reserved33: [u8; 4usize], #[doc = "0x348 - device out endpoint-2 interrupt flag register"] pub doep2intf: DOEP2INTF, - _reserved27: [u8; 4usize], + _reserved34: [u8; 4usize], #[doc = "0x350 - device OUT endpoint-2 transfer length register"] pub doep2len: DOEP2LEN, - _reserved28: [u8; 12usize], + _reserved35: [u8; 12usize], #[doc = "0x360 - device endpoint-3 control register"] pub doep3ctl: DOEP3CTL, - _reserved29: [u8; 4usize], + _reserved36: [u8; 4usize], #[doc = "0x368 - device out endpoint-3 interrupt flag register"] pub doep3intf: DOEP3INTF, - _reserved30: [u8; 4usize], + _reserved37: [u8; 4usize], #[doc = "0x370 - device OUT endpoint-3 transfer length register"] pub doep3len: DOEP3LEN, } -#[doc = "device configuration register (DCFG)"] -pub struct DCFG { - register: ::vcell::VolatileCell, -} +#[doc = "device configuration register (DCFG)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dcfg](dcfg) module"] +pub type DCFG = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DCFG; +#[doc = "`read()` method returns [dcfg::R](dcfg::R) reader structure"] +impl crate::Readable for DCFG {} +#[doc = "`write(|w| ..)` method takes [dcfg::W](dcfg::W) writer structure"] +impl crate::Writable for DCFG {} #[doc = "device configuration register (DCFG)"] pub mod dcfg; -#[doc = "device control register (DCTL)"] -pub struct DCTL { - register: ::vcell::VolatileCell, -} +#[doc = "device control register (DCTL)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dctl](dctl) module"] +pub type DCTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DCTL; +#[doc = "`read()` method returns [dctl::R](dctl::R) reader structure"] +impl crate::Readable for DCTL {} +#[doc = "`write(|w| ..)` method takes [dctl::W](dctl::W) writer structure"] +impl crate::Writable for DCTL {} #[doc = "device control register (DCTL)"] pub mod dctl; -#[doc = "device status register (DSTAT)"] -pub struct DSTAT { - register: ::vcell::VolatileCell, -} +#[doc = "device status register (DSTAT)\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dstat](dstat) module"] +pub type DSTAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DSTAT; +#[doc = "`read()` method returns [dstat::R](dstat::R) reader structure"] +impl crate::Readable for DSTAT {} #[doc = "device status register (DSTAT)"] pub mod dstat; -#[doc = "device IN endpoint common interrupt mask register (DIEPINTEN)"] -pub struct DIEPINTEN { - register: ::vcell::VolatileCell, -} +#[doc = "device IN endpoint common interrupt mask register (DIEPINTEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diepinten](diepinten) module"] +pub type DIEPINTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEPINTEN; +#[doc = "`read()` method returns [diepinten::R](diepinten::R) reader structure"] +impl crate::Readable for DIEPINTEN {} +#[doc = "`write(|w| ..)` method takes [diepinten::W](diepinten::W) writer structure"] +impl crate::Writable for DIEPINTEN {} #[doc = "device IN endpoint common interrupt mask register (DIEPINTEN)"] pub mod diepinten; -#[doc = "device OUT endpoint common interrupt enable register (DOEPINTEN)"] -pub struct DOEPINTEN { - register: ::vcell::VolatileCell, -} +#[doc = "device OUT endpoint common interrupt enable register (DOEPINTEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [doepinten](doepinten) module"] +pub type DOEPINTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DOEPINTEN; +#[doc = "`read()` method returns [doepinten::R](doepinten::R) reader structure"] +impl crate::Readable for DOEPINTEN {} +#[doc = "`write(|w| ..)` method takes [doepinten::W](doepinten::W) writer structure"] +impl crate::Writable for DOEPINTEN {} #[doc = "device OUT endpoint common interrupt enable register (DOEPINTEN)"] pub mod doepinten; -#[doc = "device all endpoints interrupt register (DAEPINT)"] -pub struct DAEPINT { - register: ::vcell::VolatileCell, -} +#[doc = "device all endpoints interrupt register (DAEPINT)\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [daepint](daepint) module"] +pub type DAEPINT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DAEPINT; +#[doc = "`read()` method returns [daepint::R](daepint::R) reader structure"] +impl crate::Readable for DAEPINT {} #[doc = "device all endpoints interrupt register (DAEPINT)"] pub mod daepint; -#[doc = "Device all endpoints interrupt enable register (DAEPINTEN)"] -pub struct DAEPINTEN { - register: ::vcell::VolatileCell, -} +#[doc = "Device all endpoints interrupt enable register (DAEPINTEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [daepinten](daepinten) module"] +pub type DAEPINTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DAEPINTEN; +#[doc = "`read()` method returns [daepinten::R](daepinten::R) reader structure"] +impl crate::Readable for DAEPINTEN {} +#[doc = "`write(|w| ..)` method takes [daepinten::W](daepinten::W) writer structure"] +impl crate::Writable for DAEPINTEN {} #[doc = "Device all endpoints interrupt enable register (DAEPINTEN)"] pub mod daepinten; -#[doc = "device VBUS discharge time register"] -pub struct DVBUSDT { - register: ::vcell::VolatileCell, -} +#[doc = "device VBUS discharge time register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dvbusdt](dvbusdt) module"] +pub type DVBUSDT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DVBUSDT; +#[doc = "`read()` method returns [dvbusdt::R](dvbusdt::R) reader structure"] +impl crate::Readable for DVBUSDT {} +#[doc = "`write(|w| ..)` method takes [dvbusdt::W](dvbusdt::W) writer structure"] +impl crate::Writable for DVBUSDT {} #[doc = "device VBUS discharge time register"] pub mod dvbusdt; -#[doc = "device VBUS pulsing time register"] -pub struct DVBUSPT { - register: ::vcell::VolatileCell, -} +#[doc = "device VBUS pulsing time register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [dvbuspt](dvbuspt) module"] +pub type DVBUSPT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DVBUSPT; +#[doc = "`read()` method returns [dvbuspt::R](dvbuspt::R) reader structure"] +impl crate::Readable for DVBUSPT {} +#[doc = "`write(|w| ..)` method takes [dvbuspt::W](dvbuspt::W) writer structure"] +impl crate::Writable for DVBUSPT {} #[doc = "device VBUS pulsing time register"] pub mod dvbuspt; -#[doc = "device IN endpoint FIFO empty interrupt enable register"] -pub struct DIEPFEINTEN { - register: ::vcell::VolatileCell, -} +#[doc = "device IN endpoint FIFO empty interrupt enable register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diepfeinten](diepfeinten) module"] +pub type DIEPFEINTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEPFEINTEN; +#[doc = "`read()` method returns [diepfeinten::R](diepfeinten::R) reader structure"] +impl crate::Readable for DIEPFEINTEN {} +#[doc = "`write(|w| ..)` method takes [diepfeinten::W](diepfeinten::W) writer structure"] +impl crate::Writable for DIEPFEINTEN {} #[doc = "device IN endpoint FIFO empty interrupt enable register"] pub mod diepfeinten; -#[doc = "device IN endpoint 0 control register (DIEP0CTL)"] -pub struct DIEP0CTL { - register: ::vcell::VolatileCell, -} +#[doc = "device IN endpoint 0 control register (DIEP0CTL)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep0ctl](diep0ctl) module"] +pub type DIEP0CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP0CTL; +#[doc = "`read()` method returns [diep0ctl::R](diep0ctl::R) reader structure"] +impl crate::Readable for DIEP0CTL {} +#[doc = "`write(|w| ..)` method takes [diep0ctl::W](diep0ctl::W) writer structure"] +impl crate::Writable for DIEP0CTL {} #[doc = "device IN endpoint 0 control register (DIEP0CTL)"] pub mod diep0ctl; -#[doc = "device in endpoint-1 control register"] -pub struct DIEP1CTL { - register: ::vcell::VolatileCell, -} +#[doc = "device in endpoint-1 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep1ctl](diep1ctl) module"] +pub type DIEP1CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP1CTL; +#[doc = "`read()` method returns [diep1ctl::R](diep1ctl::R) reader structure"] +impl crate::Readable for DIEP1CTL {} +#[doc = "`write(|w| ..)` method takes [diep1ctl::W](diep1ctl::W) writer structure"] +impl crate::Writable for DIEP1CTL {} #[doc = "device in endpoint-1 control register"] pub mod diep1ctl; -#[doc = "device endpoint-2 control register"] -pub struct DIEP2CTL { - register: ::vcell::VolatileCell, -} +#[doc = "device endpoint-2 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep2ctl](diep2ctl) module"] +pub type DIEP2CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP2CTL; +#[doc = "`read()` method returns [diep2ctl::R](diep2ctl::R) reader structure"] +impl crate::Readable for DIEP2CTL {} +#[doc = "`write(|w| ..)` method takes [diep2ctl::W](diep2ctl::W) writer structure"] +impl crate::Writable for DIEP2CTL {} #[doc = "device endpoint-2 control register"] pub mod diep2ctl; -#[doc = "device endpoint-3 control register"] -pub struct DIEP3CTL { - register: ::vcell::VolatileCell, -} +#[doc = "device endpoint-3 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep3ctl](diep3ctl) module"] +pub type DIEP3CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP3CTL; +#[doc = "`read()` method returns [diep3ctl::R](diep3ctl::R) reader structure"] +impl crate::Readable for DIEP3CTL {} +#[doc = "`write(|w| ..)` method takes [diep3ctl::W](diep3ctl::W) writer structure"] +impl crate::Writable for DIEP3CTL {} #[doc = "device endpoint-3 control register"] pub mod diep3ctl; -#[doc = "device endpoint-0 control register"] -pub struct DOEP0CTL { - register: ::vcell::VolatileCell, -} +#[doc = "device endpoint-0 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [doep0ctl](doep0ctl) module"] +pub type DOEP0CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DOEP0CTL; +#[doc = "`read()` method returns [doep0ctl::R](doep0ctl::R) reader structure"] +impl crate::Readable for DOEP0CTL {} +#[doc = "`write(|w| ..)` method takes [doep0ctl::W](doep0ctl::W) writer structure"] +impl crate::Writable for DOEP0CTL {} #[doc = "device endpoint-0 control register"] pub mod doep0ctl; -#[doc = "device endpoint-1 control register"] -pub struct DOEP1CTL { - register: ::vcell::VolatileCell, -} +#[doc = "device endpoint-1 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [doep1ctl](doep1ctl) module"] +pub type DOEP1CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DOEP1CTL; +#[doc = "`read()` method returns [doep1ctl::R](doep1ctl::R) reader structure"] +impl crate::Readable for DOEP1CTL {} +#[doc = "`write(|w| ..)` method takes [doep1ctl::W](doep1ctl::W) writer structure"] +impl crate::Writable for DOEP1CTL {} #[doc = "device endpoint-1 control register"] pub mod doep1ctl; -#[doc = "device endpoint-2 control register"] -pub struct DOEP2CTL { - register: ::vcell::VolatileCell, -} +#[doc = "device endpoint-2 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [doep2ctl](doep2ctl) module"] +pub type DOEP2CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DOEP2CTL; +#[doc = "`read()` method returns [doep2ctl::R](doep2ctl::R) reader structure"] +impl crate::Readable for DOEP2CTL {} +#[doc = "`write(|w| ..)` method takes [doep2ctl::W](doep2ctl::W) writer structure"] +impl crate::Writable for DOEP2CTL {} #[doc = "device endpoint-2 control register"] pub mod doep2ctl; -#[doc = "device endpoint-3 control register"] -pub struct DOEP3CTL { - register: ::vcell::VolatileCell, -} +#[doc = "device endpoint-3 control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [doep3ctl](doep3ctl) module"] +pub type DOEP3CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DOEP3CTL; +#[doc = "`read()` method returns [doep3ctl::R](doep3ctl::R) reader structure"] +impl crate::Readable for DOEP3CTL {} +#[doc = "`write(|w| ..)` method takes [doep3ctl::W](doep3ctl::W) writer structure"] +impl crate::Writable for DOEP3CTL {} #[doc = "device endpoint-3 control register"] pub mod doep3ctl; -#[doc = "device endpoint-0 interrupt register"] -pub struct DIEP0INTF { - register: ::vcell::VolatileCell, -} +#[doc = "device endpoint-0 interrupt register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep0intf](diep0intf) module"] +pub type DIEP0INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP0INTF; +#[doc = "`read()` method returns [diep0intf::R](diep0intf::R) reader structure"] +impl crate::Readable for DIEP0INTF {} +#[doc = "`write(|w| ..)` method takes [diep0intf::W](diep0intf::W) writer structure"] +impl crate::Writable for DIEP0INTF {} #[doc = "device endpoint-0 interrupt register"] pub mod diep0intf; -#[doc = "device endpoint-1 interrupt register"] -pub struct DIEP1INTF { - register: ::vcell::VolatileCell, -} +#[doc = "device endpoint-1 interrupt register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep1intf](diep1intf) module"] +pub type DIEP1INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP1INTF; +#[doc = "`read()` method returns [diep1intf::R](diep1intf::R) reader structure"] +impl crate::Readable for DIEP1INTF {} +#[doc = "`write(|w| ..)` method takes [diep1intf::W](diep1intf::W) writer structure"] +impl crate::Writable for DIEP1INTF {} #[doc = "device endpoint-1 interrupt register"] pub mod diep1intf; -#[doc = "device endpoint-2 interrupt register"] -pub struct DIEP2INTF { - register: ::vcell::VolatileCell, -} +#[doc = "device endpoint-2 interrupt register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep2intf](diep2intf) module"] +pub type DIEP2INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP2INTF; +#[doc = "`read()` method returns [diep2intf::R](diep2intf::R) reader structure"] +impl crate::Readable for DIEP2INTF {} +#[doc = "`write(|w| ..)` method takes [diep2intf::W](diep2intf::W) writer structure"] +impl crate::Writable for DIEP2INTF {} #[doc = "device endpoint-2 interrupt register"] pub mod diep2intf; -#[doc = "device endpoint-3 interrupt register"] -pub struct DIEP3INTF { - register: ::vcell::VolatileCell, -} +#[doc = "device endpoint-3 interrupt register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep3intf](diep3intf) module"] +pub type DIEP3INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP3INTF; +#[doc = "`read()` method returns [diep3intf::R](diep3intf::R) reader structure"] +impl crate::Readable for DIEP3INTF {} +#[doc = "`write(|w| ..)` method takes [diep3intf::W](diep3intf::W) writer structure"] +impl crate::Writable for DIEP3INTF {} #[doc = "device endpoint-3 interrupt register"] pub mod diep3intf; -#[doc = "device out endpoint-0 interrupt flag register"] -pub struct DOEP0INTF { - register: ::vcell::VolatileCell, -} +#[doc = "device out endpoint-0 interrupt flag register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [doep0intf](doep0intf) module"] +pub type DOEP0INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DOEP0INTF; +#[doc = "`read()` method returns [doep0intf::R](doep0intf::R) reader structure"] +impl crate::Readable for DOEP0INTF {} +#[doc = "`write(|w| ..)` method takes [doep0intf::W](doep0intf::W) writer structure"] +impl crate::Writable for DOEP0INTF {} #[doc = "device out endpoint-0 interrupt flag register"] pub mod doep0intf; -#[doc = "device out endpoint-1 interrupt flag register"] -pub struct DOEP1INTF { - register: ::vcell::VolatileCell, -} +#[doc = "device out endpoint-1 interrupt flag register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [doep1intf](doep1intf) module"] +pub type DOEP1INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DOEP1INTF; +#[doc = "`read()` method returns [doep1intf::R](doep1intf::R) reader structure"] +impl crate::Readable for DOEP1INTF {} +#[doc = "`write(|w| ..)` method takes [doep1intf::W](doep1intf::W) writer structure"] +impl crate::Writable for DOEP1INTF {} #[doc = "device out endpoint-1 interrupt flag register"] pub mod doep1intf; -#[doc = "device out endpoint-2 interrupt flag register"] -pub struct DOEP2INTF { - register: ::vcell::VolatileCell, -} +#[doc = "device out endpoint-2 interrupt flag register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [doep2intf](doep2intf) module"] +pub type DOEP2INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DOEP2INTF; +#[doc = "`read()` method returns [doep2intf::R](doep2intf::R) reader structure"] +impl crate::Readable for DOEP2INTF {} +#[doc = "`write(|w| ..)` method takes [doep2intf::W](doep2intf::W) writer structure"] +impl crate::Writable for DOEP2INTF {} #[doc = "device out endpoint-2 interrupt flag register"] pub mod doep2intf; -#[doc = "device out endpoint-3 interrupt flag register"] -pub struct DOEP3INTF { - register: ::vcell::VolatileCell, -} +#[doc = "device out endpoint-3 interrupt flag register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [doep3intf](doep3intf) module"] +pub type DOEP3INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DOEP3INTF; +#[doc = "`read()` method returns [doep3intf::R](doep3intf::R) reader structure"] +impl crate::Readable for DOEP3INTF {} +#[doc = "`write(|w| ..)` method takes [doep3intf::W](doep3intf::W) writer structure"] +impl crate::Writable for DOEP3INTF {} #[doc = "device out endpoint-3 interrupt flag register"] pub mod doep3intf; -#[doc = "device IN endpoint-0 transfer length register"] -pub struct DIEP0LEN { - register: ::vcell::VolatileCell, -} +#[doc = "device IN endpoint-0 transfer length register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep0len](diep0len) module"] +pub type DIEP0LEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP0LEN; +#[doc = "`read()` method returns [diep0len::R](diep0len::R) reader structure"] +impl crate::Readable for DIEP0LEN {} +#[doc = "`write(|w| ..)` method takes [diep0len::W](diep0len::W) writer structure"] +impl crate::Writable for DIEP0LEN {} #[doc = "device IN endpoint-0 transfer length register"] pub mod diep0len; -#[doc = "device OUT endpoint-0 transfer length register"] -pub struct DOEP0LEN { - register: ::vcell::VolatileCell, -} +#[doc = "device OUT endpoint-0 transfer length register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [doep0len](doep0len) module"] +pub type DOEP0LEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DOEP0LEN; +#[doc = "`read()` method returns [doep0len::R](doep0len::R) reader structure"] +impl crate::Readable for DOEP0LEN {} +#[doc = "`write(|w| ..)` method takes [doep0len::W](doep0len::W) writer structure"] +impl crate::Writable for DOEP0LEN {} #[doc = "device OUT endpoint-0 transfer length register"] pub mod doep0len; -#[doc = "device IN endpoint-1 transfer length register"] -pub struct DIEP1LEN { - register: ::vcell::VolatileCell, -} +#[doc = "device IN endpoint-1 transfer length register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep1len](diep1len) module"] +pub type DIEP1LEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP1LEN; +#[doc = "`read()` method returns [diep1len::R](diep1len::R) reader structure"] +impl crate::Readable for DIEP1LEN {} +#[doc = "`write(|w| ..)` method takes [diep1len::W](diep1len::W) writer structure"] +impl crate::Writable for DIEP1LEN {} #[doc = "device IN endpoint-1 transfer length register"] pub mod diep1len; -#[doc = "device IN endpoint-2 transfer length register"] -pub struct DIEP2LEN { - register: ::vcell::VolatileCell, -} +#[doc = "device IN endpoint-2 transfer length register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep2len](diep2len) module"] +pub type DIEP2LEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP2LEN; +#[doc = "`read()` method returns [diep2len::R](diep2len::R) reader structure"] +impl crate::Readable for DIEP2LEN {} +#[doc = "`write(|w| ..)` method takes [diep2len::W](diep2len::W) writer structure"] +impl crate::Writable for DIEP2LEN {} #[doc = "device IN endpoint-2 transfer length register"] pub mod diep2len; -#[doc = "device IN endpoint-3 transfer length register"] -pub struct DIEP3LEN { - register: ::vcell::VolatileCell, -} +#[doc = "device IN endpoint-3 transfer length register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep3len](diep3len) module"] +pub type DIEP3LEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP3LEN; +#[doc = "`read()` method returns [diep3len::R](diep3len::R) reader structure"] +impl crate::Readable for DIEP3LEN {} +#[doc = "`write(|w| ..)` method takes [diep3len::W](diep3len::W) writer structure"] +impl crate::Writable for DIEP3LEN {} #[doc = "device IN endpoint-3 transfer length register"] pub mod diep3len; -#[doc = "device OUT endpoint-1 transfer length register"] -pub struct DOEP1LEN { - register: ::vcell::VolatileCell, -} +#[doc = "device OUT endpoint-1 transfer length register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [doep1len](doep1len) module"] +pub type DOEP1LEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DOEP1LEN; +#[doc = "`read()` method returns [doep1len::R](doep1len::R) reader structure"] +impl crate::Readable for DOEP1LEN {} +#[doc = "`write(|w| ..)` method takes [doep1len::W](doep1len::W) writer structure"] +impl crate::Writable for DOEP1LEN {} #[doc = "device OUT endpoint-1 transfer length register"] pub mod doep1len; -#[doc = "device OUT endpoint-2 transfer length register"] -pub struct DOEP2LEN { - register: ::vcell::VolatileCell, -} +#[doc = "device OUT endpoint-2 transfer length register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [doep2len](doep2len) module"] +pub type DOEP2LEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DOEP2LEN; +#[doc = "`read()` method returns [doep2len::R](doep2len::R) reader structure"] +impl crate::Readable for DOEP2LEN {} +#[doc = "`write(|w| ..)` method takes [doep2len::W](doep2len::W) writer structure"] +impl crate::Writable for DOEP2LEN {} #[doc = "device OUT endpoint-2 transfer length register"] pub mod doep2len; -#[doc = "device OUT endpoint-3 transfer length register"] -pub struct DOEP3LEN { - register: ::vcell::VolatileCell, -} +#[doc = "device OUT endpoint-3 transfer length register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [doep3len](doep3len) module"] +pub type DOEP3LEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DOEP3LEN; +#[doc = "`read()` method returns [doep3len::R](doep3len::R) reader structure"] +impl crate::Readable for DOEP3LEN {} +#[doc = "`write(|w| ..)` method takes [doep3len::W](doep3len::W) writer structure"] +impl crate::Writable for DOEP3LEN {} #[doc = "device OUT endpoint-3 transfer length register"] pub mod doep3len; -#[doc = "device IN endpoint 0 transmit FIFO status register"] -pub struct DIEP0TFSTAT { - register: ::vcell::VolatileCell, -} +#[doc = "device IN endpoint 0 transmit FIFO status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep0tfstat](diep0tfstat) module"] +pub type DIEP0TFSTAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP0TFSTAT; +#[doc = "`read()` method returns [diep0tfstat::R](diep0tfstat::R) reader structure"] +impl crate::Readable for DIEP0TFSTAT {} #[doc = "device IN endpoint 0 transmit FIFO status register"] pub mod diep0tfstat; -#[doc = "device IN endpoint 1 transmit FIFO status register"] -pub struct DIEP1TFSTAT { - register: ::vcell::VolatileCell, -} +#[doc = "device IN endpoint 1 transmit FIFO status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep1tfstat](diep1tfstat) module"] +pub type DIEP1TFSTAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP1TFSTAT; +#[doc = "`read()` method returns [diep1tfstat::R](diep1tfstat::R) reader structure"] +impl crate::Readable for DIEP1TFSTAT {} #[doc = "device IN endpoint 1 transmit FIFO status register"] pub mod diep1tfstat; -#[doc = "device IN endpoint 2 transmit FIFO status register"] -pub struct DIEP2TFSTAT { - register: ::vcell::VolatileCell, -} +#[doc = "device IN endpoint 2 transmit FIFO status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep2tfstat](diep2tfstat) module"] +pub type DIEP2TFSTAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP2TFSTAT; +#[doc = "`read()` method returns [diep2tfstat::R](diep2tfstat::R) reader structure"] +impl crate::Readable for DIEP2TFSTAT {} #[doc = "device IN endpoint 2 transmit FIFO status register"] pub mod diep2tfstat; -#[doc = "device IN endpoint 3 transmit FIFO status register"] -pub struct DIEP3TFSTAT { - register: ::vcell::VolatileCell, -} +#[doc = "device IN endpoint 3 transmit FIFO status register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep3tfstat](diep3tfstat) module"] +pub type DIEP3TFSTAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP3TFSTAT; +#[doc = "`read()` method returns [diep3tfstat::R](diep3tfstat::R) reader structure"] +impl crate::Readable for DIEP3TFSTAT {} #[doc = "device IN endpoint 3 transmit FIFO status register"] pub mod diep3tfstat; diff --git a/src/usbfs_device/daepint.rs b/src/usbfs_device/daepint.rs index 13165e636945c475516d454119c3057ba0341eec..997e564ee104c6af5ad124d72d6a74db072a74b2 100644 --- a/src/usbfs_device/daepint.rs +++ b/src/usbfs_device/daepint.rs @@ -1,62 +1,18 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::DAEPINT { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct IEPITBR { - bits: u8, -} -impl IEPITBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct OEPITBR { - bits: u8, -} -impl OEPITBR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} +#[doc = "Reader of register DAEPINT"] +pub type R = crate::R; +#[doc = "Reader of field `IEPITB`"] +pub type IEPITB_R = crate::R; +#[doc = "Reader of field `OEPITB`"] +pub type OEPITB_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:3 - Device all IN endpoint interrupt bits"] - #[inline] - pub fn iepitb(&self) -> IEPITBR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - IEPITBR { bits } + #[inline(always)] + pub fn iepitb(&self) -> IEPITB_R { + IEPITB_R::new((self.bits & 0x0f) as u8) } #[doc = "Bits 16:19 - Device all OUT endpoint interrupt bits"] - #[inline] - pub fn oepitb(&self) -> OEPITBR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - OEPITBR { bits } + #[inline(always)] + pub fn oepitb(&self) -> OEPITB_R { + OEPITB_R::new(((self.bits >> 16) & 0x0f) as u8) } } diff --git a/src/usbfs_device/daepinten.rs b/src/usbfs_device/daepinten.rs index 084cafdbb5dc7db3ff30fcd674be4e1bc0d889ae..7603aaeb8a72db487fce1f273c2d5a884f67f164 100644 --- a/src/usbfs_device/daepinten.rs +++ b/src/usbfs_device/daepinten.rs @@ -1,146 +1,64 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DAEPINTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IEPIER { - bits: u8, -} -impl IEPIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct OEPIER { - bits: u8, -} -impl OEPIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits +#[doc = "Reader of register DAEPINTEN"] +pub type R = crate::R; +#[doc = "Writer for register DAEPINTEN"] +pub type W = crate::W; +#[doc = "Register DAEPINTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::DAEPINTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _IEPIEW<'a> { +#[doc = "Reader of field `IEPIE`"] +pub type IEPIE_R = crate::R; +#[doc = "Write proxy for field `IEPIE`"] +pub struct IEPIE_W<'a> { w: &'a mut W, } -impl<'a> _IEPIEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IEPIE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } -#[doc = r" Proxy"] -pub struct _OEPIEW<'a> { +#[doc = "Reader of field `OEPIE`"] +pub type OEPIE_R = crate::R; +#[doc = "Write proxy for field `OEPIE`"] +pub struct OEPIE_W<'a> { w: &'a mut W, } -impl<'a> _OEPIEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> OEPIE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 16)) | (((value as u32) & 0x0f) << 16); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:3 - IN EP interrupt interrupt enable bits"] - #[inline] - pub fn iepie(&self) -> IEPIER { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - IEPIER { bits } + #[inline(always)] + pub fn iepie(&self) -> IEPIE_R { + IEPIE_R::new((self.bits & 0x0f) as u8) } #[doc = "Bits 16:19 - OUT endpoint interrupt enable bits"] - #[inline] - pub fn oepie(&self) -> OEPIER { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - OEPIER { bits } + #[inline(always)] + pub fn oepie(&self) -> OEPIE_R { + OEPIE_R::new(((self.bits >> 16) & 0x0f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:3 - IN EP interrupt interrupt enable bits"] - #[inline] - pub fn iepie(&mut self) -> _IEPIEW { - _IEPIEW { w: self } + #[inline(always)] + pub fn iepie(&mut self) -> IEPIE_W { + IEPIE_W { w: self } } #[doc = "Bits 16:19 - OUT endpoint interrupt enable bits"] - #[inline] - pub fn oepie(&mut self) -> _OEPIEW { - _OEPIEW { w: self } + #[inline(always)] + pub fn oepie(&mut self) -> OEPIE_W { + OEPIE_W { w: self } } } diff --git a/src/usbfs_device/dcfg.rs b/src/usbfs_device/dcfg.rs index 240c421520058f1801be3dc2e97e77564205c79b..e7cc1e9e7a3530e22923425c000d325b422e878c 100644 --- a/src/usbfs_device/dcfg.rs +++ b/src/usbfs_device/dcfg.rs @@ -1,246 +1,122 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DCFG { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DSR { - bits: u8, -} -impl DSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct NZLSOHR { - bits: bool, -} -impl NZLSOHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DARR { - bits: u8, -} -impl DARR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EOPFTR { - bits: u8, -} -impl EOPFTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DSW<'a> { +#[doc = "Reader of register DCFG"] +pub type R = crate::R; +#[doc = "Writer for register DCFG"] +pub type W = crate::W; +#[doc = "Register DCFG `reset()`'s with value 0"] +impl crate::ResetValue for super::DCFG { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `DS`"] +pub type DS_R = crate::R; +#[doc = "Write proxy for field `DS`"] +pub struct DS_W<'a> { w: &'a mut W, } -impl<'a> _DSW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DS_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x03) | ((value as u32) & 0x03); self.w } } -#[doc = r" Proxy"] -pub struct _NZLSOHW<'a> { +#[doc = "Reader of field `NZLSOH`"] +pub type NZLSOH_R = crate::R; +#[doc = "Write proxy for field `NZLSOH`"] +pub struct NZLSOH_W<'a> { w: &'a mut W, } -impl<'a> _NZLSOHW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NZLSOH_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _DARW<'a> { +#[doc = "Reader of field `DAR`"] +pub type DAR_R = crate::R; +#[doc = "Write proxy for field `DAR`"] +pub struct DAR_W<'a> { w: &'a mut W, } -impl<'a> _DARW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x7f << 4)) | (((value as u32) & 0x7f) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _EOPFTW<'a> { +#[doc = "Reader of field `EOPFT`"] +pub type EOPFT_R = crate::R; +#[doc = "Write proxy for field `EOPFT`"] +pub struct EOPFT_W<'a> { w: &'a mut W, } -impl<'a> _EOPFTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EOPFT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 11)) | (((value as u32) & 0x03) << 11); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:1 - Device speed"] - #[inline] - pub fn ds(&self) -> DSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DSR { bits } + #[inline(always)] + pub fn ds(&self) -> DS_R { + DS_R::new((self.bits & 0x03) as u8) } #[doc = "Bit 2 - Non-zero-length status OUT handshake"] - #[inline] - pub fn nzlsoh(&self) -> NZLSOHR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NZLSOHR { bits } + #[inline(always)] + pub fn nzlsoh(&self) -> NZLSOH_R { + NZLSOH_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bits 4:10 - Device address"] - #[inline] - pub fn dar(&self) -> DARR { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DARR { bits } + #[inline(always)] + pub fn dar(&self) -> DAR_R { + DAR_R::new(((self.bits >> 4) & 0x7f) as u8) } #[doc = "Bits 11:12 - end of periodic frame time"] - #[inline] - pub fn eopft(&self) -> EOPFTR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EOPFTR { bits } + #[inline(always)] + pub fn eopft(&self) -> EOPFT_R { + EOPFT_R::new(((self.bits >> 11) & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:1 - Device speed"] - #[inline] - pub fn ds(&mut self) -> _DSW { - _DSW { w: self } + #[inline(always)] + pub fn ds(&mut self) -> DS_W { + DS_W { w: self } } #[doc = "Bit 2 - Non-zero-length status OUT handshake"] - #[inline] - pub fn nzlsoh(&mut self) -> _NZLSOHW { - _NZLSOHW { w: self } + #[inline(always)] + pub fn nzlsoh(&mut self) -> NZLSOH_W { + NZLSOH_W { w: self } } #[doc = "Bits 4:10 - Device address"] - #[inline] - pub fn dar(&mut self) -> _DARW { - _DARW { w: self } + #[inline(always)] + pub fn dar(&mut self) -> DAR_W { + DAR_W { w: self } } #[doc = "Bits 11:12 - end of periodic frame time"] - #[inline] - pub fn eopft(&mut self) -> _EOPFTW { - _EOPFTW { w: self } + #[inline(always)] + pub fn eopft(&mut self) -> EOPFT_W { + EOPFT_W { w: self } } } diff --git a/src/usbfs_device/dctl.rs b/src/usbfs_device/dctl.rs index b9b1c8f19e497d49770011963b38cf5ebd94ba6d..befad092c09b147c197e96624fcd8ba701ac216c 100644 --- a/src/usbfs_device/dctl.rs +++ b/src/usbfs_device/dctl.rs @@ -1,415 +1,240 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DCTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RWKUPR { - bits: bool, -} -impl RWKUPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SDR { - bits: bool, -} -impl SDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GINSR { - bits: bool, -} -impl GINSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GONSR { - bits: bool, -} -impl GONSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct POIFR { - bits: bool, -} -impl POIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _RWKUPW<'a> { +#[doc = "Reader of register DCTL"] +pub type R = crate::R; +#[doc = "Writer for register DCTL"] +pub type W = crate::W; +#[doc = "Register DCTL `reset()`'s with value 0"] +impl crate::ResetValue for super::DCTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `RWKUP`"] +pub type RWKUP_R = crate::R; +#[doc = "Write proxy for field `RWKUP`"] +pub struct RWKUP_W<'a> { w: &'a mut W, } -impl<'a> _RWKUPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RWKUP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _SDW<'a> { +#[doc = "Reader of field `SD`"] +pub type SD_R = crate::R; +#[doc = "Write proxy for field `SD`"] +pub struct SD_W<'a> { w: &'a mut W, } -impl<'a> _SDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _SGINAKW<'a> { +#[doc = "Reader of field `GINS`"] +pub type GINS_R = crate::R; +#[doc = "Reader of field `GONS`"] +pub type GONS_R = crate::R; +#[doc = "Write proxy for field `SGINAK`"] +pub struct SGINAK_W<'a> { w: &'a mut W, } -impl<'a> _SGINAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SGINAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _CGINAKW<'a> { +#[doc = "Write proxy for field `CGINAK`"] +pub struct CGINAK_W<'a> { w: &'a mut W, } -impl<'a> _CGINAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CGINAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _SGONAKW<'a> { +#[doc = "Write proxy for field `SGONAK`"] +pub struct SGONAK_W<'a> { w: &'a mut W, } -impl<'a> _SGONAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SGONAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _CGONAKW<'a> { +#[doc = "Write proxy for field `CGONAK`"] +pub struct CGONAK_W<'a> { w: &'a mut W, } -impl<'a> _CGONAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CGONAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _POIFW<'a> { +#[doc = "Reader of field `POIF`"] +pub type POIF_R = crate::R; +#[doc = "Write proxy for field `POIF`"] +pub struct POIF_W<'a> { w: &'a mut W, } -impl<'a> _POIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> POIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Remote wakeup"] - #[inline] - pub fn rwkup(&self) -> RWKUPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RWKUPR { bits } + #[inline(always)] + pub fn rwkup(&self) -> RWKUP_R { + RWKUP_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Soft disconnect"] - #[inline] - pub fn sd(&self) -> SDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SDR { bits } + #[inline(always)] + pub fn sd(&self) -> SD_R { + SD_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Global IN NAK status"] - #[inline] - pub fn gins(&self) -> GINSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GINSR { bits } + #[inline(always)] + pub fn gins(&self) -> GINS_R { + GINS_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Global OUT NAK status"] - #[inline] - pub fn gons(&self) -> GONSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GONSR { bits } + #[inline(always)] + pub fn gons(&self) -> GONS_R { + GONS_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 11 - Power-on initialization flag"] - #[inline] - pub fn poif(&self) -> POIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - POIFR { bits } + #[inline(always)] + pub fn poif(&self) -> POIF_R { + POIF_R::new(((self.bits >> 11) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Remote wakeup"] - #[inline] - pub fn rwkup(&mut self) -> _RWKUPW { - _RWKUPW { w: self } + #[inline(always)] + pub fn rwkup(&mut self) -> RWKUP_W { + RWKUP_W { w: self } } #[doc = "Bit 1 - Soft disconnect"] - #[inline] - pub fn sd(&mut self) -> _SDW { - _SDW { w: self } + #[inline(always)] + pub fn sd(&mut self) -> SD_W { + SD_W { w: self } } #[doc = "Bit 7 - Set global IN NAK"] - #[inline] - pub fn sginak(&mut self) -> _SGINAKW { - _SGINAKW { w: self } + #[inline(always)] + pub fn sginak(&mut self) -> SGINAK_W { + SGINAK_W { w: self } } #[doc = "Bit 8 - Clear global IN NAK"] - #[inline] - pub fn cginak(&mut self) -> _CGINAKW { - _CGINAKW { w: self } + #[inline(always)] + pub fn cginak(&mut self) -> CGINAK_W { + CGINAK_W { w: self } } #[doc = "Bit 9 - Set global OUT NAK"] - #[inline] - pub fn sgonak(&mut self) -> _SGONAKW { - _SGONAKW { w: self } + #[inline(always)] + pub fn sgonak(&mut self) -> SGONAK_W { + SGONAK_W { w: self } } #[doc = "Bit 10 - Clear global OUT NAK"] - #[inline] - pub fn cgonak(&mut self) -> _CGONAKW { - _CGONAKW { w: self } + #[inline(always)] + pub fn cgonak(&mut self) -> CGONAK_W { + CGONAK_W { w: self } } #[doc = "Bit 11 - Power-on initialization flag"] - #[inline] - pub fn poif(&mut self) -> _POIFW { - _POIFW { w: self } + #[inline(always)] + pub fn poif(&mut self) -> POIF_W { + POIF_W { w: self } } } diff --git a/src/usbfs_device/diep0ctl.rs b/src/usbfs_device/diep0ctl.rs index 11598d9fb026080c7448149259090df7049243ab..ea5da69ba0794b5eb4731315647f70831f714554 100644 --- a/src/usbfs_device/diep0ctl.rs +++ b/src/usbfs_device/diep0ctl.rs @@ -1,462 +1,241 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEP0CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MPLR { - bits: u8, -} -impl MPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPACTR { - bits: bool, -} -impl EPACTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKSR { - bits: bool, -} -impl NAKSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTYPER { - bits: u8, -} -impl EPTYPER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct STALLR { - bits: bool, -} -impl STALLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TXFNUMR { - bits: u8, -} -impl TXFNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPDR { - bits: bool, -} -impl EPDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPENR { - bits: bool, -} -impl EPENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _MPLW<'a> { +#[doc = "Reader of register DIEP0CTL"] +pub type R = crate::R; +#[doc = "Writer for register DIEP0CTL"] +pub type W = crate::W; +#[doc = "Register DIEP0CTL `reset()`'s with value 0x8000"] +impl crate::ResetValue for super::DIEP0CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x8000 + } +} +#[doc = "Reader of field `MPL`"] +pub type MPL_R = crate::R; +#[doc = "Write proxy for field `MPL`"] +pub struct MPL_W<'a> { w: &'a mut W, } -impl<'a> _MPLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MPL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x03) | ((value as u32) & 0x03); self.w } } -#[doc = r" Proxy"] -pub struct _STALLW<'a> { +#[doc = "Reader of field `EPACT`"] +pub type EPACT_R = crate::R; +#[doc = "Reader of field `NAKS`"] +pub type NAKS_R = crate::R; +#[doc = "Reader of field `EPTYPE`"] +pub type EPTYPE_R = crate::R; +#[doc = "Reader of field `STALL`"] +pub type STALL_R = crate::R; +#[doc = "Write proxy for field `STALL`"] +pub struct STALL_W<'a> { w: &'a mut W, } -impl<'a> _STALLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _TXFNUMW<'a> { +#[doc = "Reader of field `TXFNUM`"] +pub type TXFNUM_R = crate::R; +#[doc = "Write proxy for field `TXFNUM`"] +pub struct TXFNUM_W<'a> { w: &'a mut W, } -impl<'a> _TXFNUMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TXFNUM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 22)) | (((value as u32) & 0x0f) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _CNAKW<'a> { +#[doc = "Write proxy for field `CNAK`"] +pub struct CNAK_W<'a> { w: &'a mut W, } -impl<'a> _CNAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CNAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _SNAKW<'a> { +#[doc = "Write proxy for field `SNAK`"] +pub struct SNAK_W<'a> { w: &'a mut W, } -impl<'a> _SNAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SNAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _EPDW<'a> { +#[doc = "Reader of field `EPD`"] +pub type EPD_R = crate::R; +#[doc = "Write proxy for field `EPD`"] +pub struct EPD_W<'a> { w: &'a mut W, } -impl<'a> _EPDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _EPENW<'a> { +#[doc = "Reader of field `EPEN`"] +pub type EPEN_R = crate::R; +#[doc = "Write proxy for field `EPEN`"] +pub struct EPEN_W<'a> { w: &'a mut W, } -impl<'a> _EPENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:1 - Maximum packet length"] - #[inline] - pub fn mpl(&self) -> MPLR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MPLR { bits } + #[inline(always)] + pub fn mpl(&self) -> MPL_R { + MPL_R::new((self.bits & 0x03) as u8) } #[doc = "Bit 15 - endpoint active"] - #[inline] - pub fn epact(&self) -> EPACTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPACTR { bits } + #[inline(always)] + pub fn epact(&self) -> EPACT_R { + EPACT_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 17 - NAK status"] - #[inline] - pub fn naks(&self) -> NAKSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKSR { bits } + #[inline(always)] + pub fn naks(&self) -> NAKS_R { + NAKS_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&self) -> EPTYPER { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPTYPER { bits } + #[inline(always)] + pub fn eptype(&self) -> EPTYPE_R { + EPTYPE_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bit 21 - STALL handshake"] - #[inline] - pub fn stall(&self) -> STALLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLR { bits } + #[inline(always)] + pub fn stall(&self) -> STALL_R { + STALL_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bits 22:25 - TxFIFO number"] - #[inline] - pub fn txfnum(&self) -> TXFNUMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - TXFNUMR { bits } + #[inline(always)] + pub fn txfnum(&self) -> TXFNUM_R { + TXFNUM_R::new(((self.bits >> 22) & 0x0f) as u8) } #[doc = "Bit 30 - Endpoint disable"] - #[inline] - pub fn epd(&self) -> EPDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDR { bits } + #[inline(always)] + pub fn epd(&self) -> EPD_R { + EPD_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Endpoint enable"] - #[inline] - pub fn epen(&self) -> EPENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPENR { bits } + #[inline(always)] + pub fn epen(&self) -> EPEN_R { + EPEN_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x8000 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:1 - Maximum packet length"] - #[inline] - pub fn mpl(&mut self) -> _MPLW { - _MPLW { w: self } + #[inline(always)] + pub fn mpl(&mut self) -> MPL_W { + MPL_W { w: self } } #[doc = "Bit 21 - STALL handshake"] - #[inline] - pub fn stall(&mut self) -> _STALLW { - _STALLW { w: self } + #[inline(always)] + pub fn stall(&mut self) -> STALL_W { + STALL_W { w: self } } #[doc = "Bits 22:25 - TxFIFO number"] - #[inline] - pub fn txfnum(&mut self) -> _TXFNUMW { - _TXFNUMW { w: self } + #[inline(always)] + pub fn txfnum(&mut self) -> TXFNUM_W { + TXFNUM_W { w: self } } #[doc = "Bit 26 - Clear NAK"] - #[inline] - pub fn cnak(&mut self) -> _CNAKW { - _CNAKW { w: self } + #[inline(always)] + pub fn cnak(&mut self) -> CNAK_W { + CNAK_W { w: self } } #[doc = "Bit 27 - Set NAK"] - #[inline] - pub fn snak(&mut self) -> _SNAKW { - _SNAKW { w: self } + #[inline(always)] + pub fn snak(&mut self) -> SNAK_W { + SNAK_W { w: self } } #[doc = "Bit 30 - Endpoint disable"] - #[inline] - pub fn epd(&mut self) -> _EPDW { - _EPDW { w: self } + #[inline(always)] + pub fn epd(&mut self) -> EPD_W { + EPD_W { w: self } } #[doc = "Bit 31 - Endpoint enable"] - #[inline] - pub fn epen(&mut self) -> _EPENW { - _EPENW { w: self } + #[inline(always)] + pub fn epen(&mut self) -> EPEN_W { + EPEN_W { w: self } } } diff --git a/src/usbfs_device/diep0intf.rs b/src/usbfs_device/diep0intf.rs index c109ab6a3dad018aecd4098f6cf10f65ea1201bb..d699fdb9f7f313c4061b595c1401336c6c9880e4 100644 --- a/src/usbfs_device/diep0intf.rs +++ b/src/usbfs_device/diep0intf.rs @@ -1,390 +1,193 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEP0INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TXFER { - bits: bool, -} -impl TXFER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IEPNER { - bits: bool, -} -impl IEPNER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTXFUDR { - bits: bool, -} -impl EPTXFUDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CITOR { - bits: bool, -} -impl CITOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDISR { - bits: bool, -} -impl EPDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TFR { - bits: bool, -} -impl TFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _IEPNEW<'a> { +#[doc = "Reader of register DIEP0INTF"] +pub type R = crate::R; +#[doc = "Writer for register DIEP0INTF"] +pub type W = crate::W; +#[doc = "Register DIEP0INTF `reset()`'s with value 0x80"] +impl crate::ResetValue for super::DIEP0INTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x80 + } +} +#[doc = "Reader of field `TXFE`"] +pub type TXFE_R = crate::R; +#[doc = "Reader of field `IEPNE`"] +pub type IEPNE_R = crate::R; +#[doc = "Write proxy for field `IEPNE`"] +pub struct IEPNE_W<'a> { w: &'a mut W, } -impl<'a> _IEPNEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IEPNE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _EPTXFUDW<'a> { +#[doc = "Reader of field `EPTXFUD`"] +pub type EPTXFUD_R = crate::R; +#[doc = "Write proxy for field `EPTXFUD`"] +pub struct EPTXFUD_W<'a> { w: &'a mut W, } -impl<'a> _EPTXFUDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPTXFUD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CITOW<'a> { +#[doc = "Reader of field `CITO`"] +pub type CITO_R = crate::R; +#[doc = "Write proxy for field `CITO`"] +pub struct CITO_W<'a> { w: &'a mut W, } -impl<'a> _CITOW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CITO_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _EPDISW<'a> { +#[doc = "Reader of field `EPDIS`"] +pub type EPDIS_R = crate::R; +#[doc = "Write proxy for field `EPDIS`"] +pub struct EPDIS_W<'a> { w: &'a mut W, } -impl<'a> _EPDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _TFW<'a> { +#[doc = "Reader of field `TF`"] +pub type TF_R = crate::R; +#[doc = "Write proxy for field `TF`"] +pub struct TF_W<'a> { w: &'a mut W, } -impl<'a> _TFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 7 - Transmit FIFO empty"] - #[inline] - pub fn txfe(&self) -> TXFER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TXFER { bits } + #[inline(always)] + pub fn txfe(&self) -> TXFE_R { + TXFE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - IN endpoint NAK effective"] - #[inline] - pub fn iepne(&self) -> IEPNER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IEPNER { bits } + #[inline(always)] + pub fn iepne(&self) -> IEPNE_R { + IEPNE_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 4 - Endpoint Tx FIFO underrun"] - #[inline] - pub fn eptxfud(&self) -> EPTXFUDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPTXFUDR { bits } + #[inline(always)] + pub fn eptxfud(&self) -> EPTXFUD_R { + EPTXFUD_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Control in timeout interrupt"] - #[inline] - pub fn cito(&self) -> CITOR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CITOR { bits } + #[inline(always)] + pub fn cito(&self) -> CITO_R { + CITO_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 1 - Endpoint finished"] - #[inline] - pub fn epdis(&self) -> EPDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDISR { bits } + #[inline(always)] + pub fn epdis(&self) -> EPDIS_R { + EPDIS_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&self) -> TFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFR { bits } + #[inline(always)] + pub fn tf(&self) -> TF_R { + TF_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x80 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 6 - IN endpoint NAK effective"] - #[inline] - pub fn iepne(&mut self) -> _IEPNEW { - _IEPNEW { w: self } + #[inline(always)] + pub fn iepne(&mut self) -> IEPNE_W { + IEPNE_W { w: self } } #[doc = "Bit 4 - Endpoint Tx FIFO underrun"] - #[inline] - pub fn eptxfud(&mut self) -> _EPTXFUDW { - _EPTXFUDW { w: self } + #[inline(always)] + pub fn eptxfud(&mut self) -> EPTXFUD_W { + EPTXFUD_W { w: self } } #[doc = "Bit 3 - Control in timeout interrupt"] - #[inline] - pub fn cito(&mut self) -> _CITOW { - _CITOW { w: self } + #[inline(always)] + pub fn cito(&mut self) -> CITO_W { + CITO_W { w: self } } #[doc = "Bit 1 - Endpoint finished"] - #[inline] - pub fn epdis(&mut self) -> _EPDISW { - _EPDISW { w: self } + #[inline(always)] + pub fn epdis(&mut self) -> EPDIS_W { + EPDIS_W { w: self } } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&mut self) -> _TFW { - _TFW { w: self } + #[inline(always)] + pub fn tf(&mut self) -> TF_W { + TF_W { w: self } } } diff --git a/src/usbfs_device/diep0len.rs b/src/usbfs_device/diep0len.rs index d2f574a4d103df030c00a2f87deaa49dd7c0d214..f1424dcccbaa1cd1865ea2dda02f1d5807b939e2 100644 --- a/src/usbfs_device/diep0len.rs +++ b/src/usbfs_device/diep0len.rs @@ -1,146 +1,64 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEP0LEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PCNTR { - bits: u8, -} -impl PCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct TLENR { - bits: u8, -} -impl TLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits +#[doc = "Reader of register DIEP0LEN"] +pub type R = crate::R; +#[doc = "Writer for register DIEP0LEN"] +pub type W = crate::W; +#[doc = "Register DIEP0LEN `reset()`'s with value 0"] +impl crate::ResetValue for super::DIEP0LEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } } -#[doc = r" Proxy"] -pub struct _PCNTW<'a> { +#[doc = "Reader of field `PCNT`"] +pub type PCNT_R = crate::R; +#[doc = "Write proxy for field `PCNT`"] +pub struct PCNT_W<'a> { w: &'a mut W, } -impl<'a> _PCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 19)) | (((value as u32) & 0x03) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _TLENW<'a> { +#[doc = "Reader of field `TLEN`"] +pub type TLEN_R = crate::R; +#[doc = "Write proxy for field `TLEN`"] +pub struct TLEN_W<'a> { w: &'a mut W, } -impl<'a> _TLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x7f) | ((value as u32) & 0x7f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 19:20 - Packet count"] - #[inline] - pub fn pcnt(&self) -> PCNTR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PCNTR { bits } + #[inline(always)] + pub fn pcnt(&self) -> PCNT_R { + PCNT_R::new(((self.bits >> 19) & 0x03) as u8) } #[doc = "Bits 0:6 - Transfer length"] - #[inline] - pub fn tlen(&self) -> TLENR { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - TLENR { bits } + #[inline(always)] + pub fn tlen(&self) -> TLEN_R { + TLEN_R::new((self.bits & 0x7f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 19:20 - Packet count"] - #[inline] - pub fn pcnt(&mut self) -> _PCNTW { - _PCNTW { w: self } + #[inline(always)] + pub fn pcnt(&mut self) -> PCNT_W { + PCNT_W { w: self } } #[doc = "Bits 0:6 - Transfer length"] - #[inline] - pub fn tlen(&mut self) -> _TLENW { - _TLENW { w: self } + #[inline(always)] + pub fn tlen(&mut self) -> TLEN_W { + TLEN_W { w: self } } } diff --git a/src/usbfs_device/diep0tfstat.rs b/src/usbfs_device/diep0tfstat.rs index c696c63e533c6e4f4592b961b4e437f5b49f765e..37da38a6b7cdd77527a3f87063c0b3082d1cdc8b 100644 --- a/src/usbfs_device/diep0tfstat.rs +++ b/src/usbfs_device/diep0tfstat.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::DIEP0TFSTAT { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct IEPTFSR { - bits: u16, -} -impl IEPTFSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register DIEP0TFSTAT"] +pub type R = crate::R; +#[doc = "Reader of field `IEPTFS`"] +pub type IEPTFS_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - IN endpoint TxFIFO space remaining"] - #[inline] - pub fn ieptfs(&self) -> IEPTFSR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IEPTFSR { bits } + #[inline(always)] + pub fn ieptfs(&self) -> IEPTFS_R { + IEPTFS_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/usbfs_device/diep1ctl.rs b/src/usbfs_device/diep1ctl.rs index 4d7035be2c6827479feb850226f41bf2275ea9ba..0b6b39ffa3ad6d4b965ef4298f7fe1e3c8c191d3 100644 --- a/src/usbfs_device/diep1ctl.rs +++ b/src/usbfs_device/diep1ctl.rs @@ -1,597 +1,346 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEP1CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct EPENR { - bits: bool, -} -impl EPENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDR { - bits: bool, -} -impl EPDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TXFNUMR { - bits: u8, -} -impl TXFNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct STALLR { - bits: bool, -} -impl STALLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTYPER { - bits: u8, -} -impl EPTYPER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct NAKSR { - bits: bool, -} -impl NAKSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EOFRM_DPIDR { - bits: bool, -} -impl EOFRM_DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPACTR { - bits: bool, -} -impl EPACTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MPLR { - bits: u16, -} -impl MPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _EPENW<'a> { +#[doc = "Reader of register DIEP1CTL"] +pub type R = crate::R; +#[doc = "Writer for register DIEP1CTL"] +pub type W = crate::W; +#[doc = "Register DIEP1CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::DIEP1CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `EPEN`"] +pub type EPEN_R = crate::R; +#[doc = "Write proxy for field `EPEN`"] +pub struct EPEN_W<'a> { w: &'a mut W, } -impl<'a> _EPENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } -#[doc = r" Proxy"] -pub struct _EPDW<'a> { +#[doc = "Reader of field `EPD`"] +pub type EPD_R = crate::R; +#[doc = "Write proxy for field `EPD`"] +pub struct EPD_W<'a> { w: &'a mut W, } -impl<'a> _EPDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _SD1PID_SODDFRMW<'a> { +#[doc = "Write proxy for field `SD1PID_SODDFRM`"] +pub struct SD1PID_SODDFRM_W<'a> { w: &'a mut W, } -impl<'a> _SD1PID_SODDFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SD1PID_SODDFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _SD0PID_SEVENFRMW<'a> { +#[doc = "Write proxy for field `SD0PID_SEVENFRM`"] +pub struct SD0PID_SEVENFRM_W<'a> { w: &'a mut W, } -impl<'a> _SD0PID_SEVENFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SD0PID_SEVENFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _SNAKW<'a> { +#[doc = "Write proxy for field `SNAK`"] +pub struct SNAK_W<'a> { w: &'a mut W, } -impl<'a> _SNAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SNAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _CNAKW<'a> { +#[doc = "Write proxy for field `CNAK`"] +pub struct CNAK_W<'a> { w: &'a mut W, } -impl<'a> _CNAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CNAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _TXFNUMW<'a> { +#[doc = "Reader of field `TXFNUM`"] +pub type TXFNUM_R = crate::R; +#[doc = "Write proxy for field `TXFNUM`"] +pub struct TXFNUM_W<'a> { w: &'a mut W, } -impl<'a> _TXFNUMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TXFNUM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 22)) | (((value as u32) & 0x0f) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _STALLW<'a> { +#[doc = "Reader of field `STALL`"] +pub type STALL_R = crate::R; +#[doc = "Write proxy for field `STALL`"] +pub struct STALL_W<'a> { w: &'a mut W, } -impl<'a> _STALLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _EPTYPEW<'a> { +#[doc = "Reader of field `EPTYPE`"] +pub type EPTYPE_R = crate::R; +#[doc = "Write proxy for field `EPTYPE`"] +pub struct EPTYPE_W<'a> { w: &'a mut W, } -impl<'a> _EPTYPEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPTYPE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _EPACTW<'a> { +#[doc = "Reader of field `NAKS`"] +pub type NAKS_R = crate::R; +#[doc = "Reader of field `EOFRM_DPID`"] +pub type EOFRM_DPID_R = crate::R; +#[doc = "Reader of field `EPACT`"] +pub type EPACT_R = crate::R; +#[doc = "Write proxy for field `EPACT`"] +pub struct EPACT_W<'a> { w: &'a mut W, } -impl<'a> _EPACTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPACT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _MPLW<'a> { +#[doc = "Reader of field `MPL`"] +pub type MPL_R = crate::R; +#[doc = "Write proxy for field `MPL`"] +pub struct MPL_W<'a> { w: &'a mut W, } -impl<'a> _MPLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MPL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07ff) | ((value as u32) & 0x07ff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 31 - Endpoint enable"] - #[inline] - pub fn epen(&self) -> EPENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPENR { bits } + #[inline(always)] + pub fn epen(&self) -> EPEN_R { + EPEN_R::new(((self.bits >> 31) & 0x01) != 0) } #[doc = "Bit 30 - Endpoint disable"] - #[inline] - pub fn epd(&self) -> EPDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDR { bits } + #[inline(always)] + pub fn epd(&self) -> EPD_R { + EPD_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bits 22:25 - Tx FIFO number"] - #[inline] - pub fn txfnum(&self) -> TXFNUMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - TXFNUMR { bits } + #[inline(always)] + pub fn txfnum(&self) -> TXFNUM_R { + TXFNUM_R::new(((self.bits >> 22) & 0x0f) as u8) } #[doc = "Bit 21 - STALL handshake"] - #[inline] - pub fn stall(&self) -> STALLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLR { bits } + #[inline(always)] + pub fn stall(&self) -> STALL_R { + STALL_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&self) -> EPTYPER { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPTYPER { bits } + #[inline(always)] + pub fn eptype(&self) -> EPTYPE_R { + EPTYPE_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bit 17 - NAK status"] - #[inline] - pub fn naks(&self) -> NAKSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKSR { bits } + #[inline(always)] + pub fn naks(&self) -> NAKS_R { + NAKS_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 16 - EOFRM/DPID"] - #[inline] - pub fn eofrm_dpid(&self) -> EOFRM_DPIDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOFRM_DPIDR { bits } + #[inline(always)] + pub fn eofrm_dpid(&self) -> EOFRM_DPID_R { + EOFRM_DPID_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 15 - Endpoint active"] - #[inline] - pub fn epact(&self) -> EPACTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPACTR { bits } + #[inline(always)] + pub fn epact(&self) -> EPACT_R { + EPACT_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bits 0:10 - maximum packet length"] - #[inline] - pub fn mpl(&self) -> MPLR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - MPLR { bits } + #[inline(always)] + pub fn mpl(&self) -> MPL_R { + MPL_R::new((self.bits & 0x07ff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 31 - Endpoint enable"] - #[inline] - pub fn epen(&mut self) -> _EPENW { - _EPENW { w: self } + #[inline(always)] + pub fn epen(&mut self) -> EPEN_W { + EPEN_W { w: self } } #[doc = "Bit 30 - Endpoint disable"] - #[inline] - pub fn epd(&mut self) -> _EPDW { - _EPDW { w: self } + #[inline(always)] + pub fn epd(&mut self) -> EPD_W { + EPD_W { w: self } } #[doc = "Bit 29 - Set DATA1 PID/Set odd frame"] - #[inline] - pub fn sd1pid_soddfrm(&mut self) -> _SD1PID_SODDFRMW { - _SD1PID_SODDFRMW { w: self } + #[inline(always)] + pub fn sd1pid_soddfrm(&mut self) -> SD1PID_SODDFRM_W { + SD1PID_SODDFRM_W { w: self } } #[doc = "Bit 28 - SD0PID/SEVNFRM"] - #[inline] - pub fn sd0pid_sevenfrm(&mut self) -> _SD0PID_SEVENFRMW { - _SD0PID_SEVENFRMW { w: self } + #[inline(always)] + pub fn sd0pid_sevenfrm(&mut self) -> SD0PID_SEVENFRM_W { + SD0PID_SEVENFRM_W { w: self } } #[doc = "Bit 27 - Set NAK"] - #[inline] - pub fn snak(&mut self) -> _SNAKW { - _SNAKW { w: self } + #[inline(always)] + pub fn snak(&mut self) -> SNAK_W { + SNAK_W { w: self } } #[doc = "Bit 26 - Clear NAK"] - #[inline] - pub fn cnak(&mut self) -> _CNAKW { - _CNAKW { w: self } + #[inline(always)] + pub fn cnak(&mut self) -> CNAK_W { + CNAK_W { w: self } } #[doc = "Bits 22:25 - Tx FIFO number"] - #[inline] - pub fn txfnum(&mut self) -> _TXFNUMW { - _TXFNUMW { w: self } + #[inline(always)] + pub fn txfnum(&mut self) -> TXFNUM_W { + TXFNUM_W { w: self } } #[doc = "Bit 21 - STALL handshake"] - #[inline] - pub fn stall(&mut self) -> _STALLW { - _STALLW { w: self } + #[inline(always)] + pub fn stall(&mut self) -> STALL_W { + STALL_W { w: self } } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&mut self) -> _EPTYPEW { - _EPTYPEW { w: self } + #[inline(always)] + pub fn eptype(&mut self) -> EPTYPE_W { + EPTYPE_W { w: self } } #[doc = "Bit 15 - Endpoint active"] - #[inline] - pub fn epact(&mut self) -> _EPACTW { - _EPACTW { w: self } + #[inline(always)] + pub fn epact(&mut self) -> EPACT_W { + EPACT_W { w: self } } #[doc = "Bits 0:10 - maximum packet length"] - #[inline] - pub fn mpl(&mut self) -> _MPLW { - _MPLW { w: self } + #[inline(always)] + pub fn mpl(&mut self) -> MPL_W { + MPL_W { w: self } } } diff --git a/src/usbfs_device/diep1intf.rs b/src/usbfs_device/diep1intf.rs index 6c6299f1c90533ef6ec23ea750048d678a1c2adf..daf564f8d7ff594b214809d590b8e299b6702f0f 100644 --- a/src/usbfs_device/diep1intf.rs +++ b/src/usbfs_device/diep1intf.rs @@ -1,390 +1,193 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEP1INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TXFER { - bits: bool, -} -impl TXFER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IEPNER { - bits: bool, -} -impl IEPNER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTXFUDR { - bits: bool, -} -impl EPTXFUDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CITOR { - bits: bool, -} -impl CITOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDISR { - bits: bool, -} -impl EPDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TFR { - bits: bool, -} -impl TFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _IEPNEW<'a> { +#[doc = "Reader of register DIEP1INTF"] +pub type R = crate::R; +#[doc = "Writer for register DIEP1INTF"] +pub type W = crate::W; +#[doc = "Register DIEP1INTF `reset()`'s with value 0x80"] +impl crate::ResetValue for super::DIEP1INTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x80 + } +} +#[doc = "Reader of field `TXFE`"] +pub type TXFE_R = crate::R; +#[doc = "Reader of field `IEPNE`"] +pub type IEPNE_R = crate::R; +#[doc = "Write proxy for field `IEPNE`"] +pub struct IEPNE_W<'a> { w: &'a mut W, } -impl<'a> _IEPNEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IEPNE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _EPTXFUDW<'a> { +#[doc = "Reader of field `EPTXFUD`"] +pub type EPTXFUD_R = crate::R; +#[doc = "Write proxy for field `EPTXFUD`"] +pub struct EPTXFUD_W<'a> { w: &'a mut W, } -impl<'a> _EPTXFUDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPTXFUD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CITOW<'a> { +#[doc = "Reader of field `CITO`"] +pub type CITO_R = crate::R; +#[doc = "Write proxy for field `CITO`"] +pub struct CITO_W<'a> { w: &'a mut W, } -impl<'a> _CITOW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CITO_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _EPDISW<'a> { +#[doc = "Reader of field `EPDIS`"] +pub type EPDIS_R = crate::R; +#[doc = "Write proxy for field `EPDIS`"] +pub struct EPDIS_W<'a> { w: &'a mut W, } -impl<'a> _EPDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _TFW<'a> { +#[doc = "Reader of field `TF`"] +pub type TF_R = crate::R; +#[doc = "Write proxy for field `TF`"] +pub struct TF_W<'a> { w: &'a mut W, } -impl<'a> _TFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 7 - Transmit FIFO empty"] - #[inline] - pub fn txfe(&self) -> TXFER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TXFER { bits } + #[inline(always)] + pub fn txfe(&self) -> TXFE_R { + TXFE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - IN endpoint NAK effective"] - #[inline] - pub fn iepne(&self) -> IEPNER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IEPNER { bits } + #[inline(always)] + pub fn iepne(&self) -> IEPNE_R { + IEPNE_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 4 - Endpoint Tx FIFO underrun"] - #[inline] - pub fn eptxfud(&self) -> EPTXFUDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPTXFUDR { bits } + #[inline(always)] + pub fn eptxfud(&self) -> EPTXFUD_R { + EPTXFUD_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Control in timeout interrupt"] - #[inline] - pub fn cito(&self) -> CITOR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CITOR { bits } + #[inline(always)] + pub fn cito(&self) -> CITO_R { + CITO_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 1 - Endpoint finished"] - #[inline] - pub fn epdis(&self) -> EPDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDISR { bits } + #[inline(always)] + pub fn epdis(&self) -> EPDIS_R { + EPDIS_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&self) -> TFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFR { bits } + #[inline(always)] + pub fn tf(&self) -> TF_R { + TF_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x80 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 6 - IN endpoint NAK effective"] - #[inline] - pub fn iepne(&mut self) -> _IEPNEW { - _IEPNEW { w: self } + #[inline(always)] + pub fn iepne(&mut self) -> IEPNE_W { + IEPNE_W { w: self } } #[doc = "Bit 4 - Endpoint Tx FIFO underrun"] - #[inline] - pub fn eptxfud(&mut self) -> _EPTXFUDW { - _EPTXFUDW { w: self } + #[inline(always)] + pub fn eptxfud(&mut self) -> EPTXFUD_W { + EPTXFUD_W { w: self } } #[doc = "Bit 3 - Control in timeout interrupt"] - #[inline] - pub fn cito(&mut self) -> _CITOW { - _CITOW { w: self } + #[inline(always)] + pub fn cito(&mut self) -> CITO_W { + CITO_W { w: self } } #[doc = "Bit 1 - Endpoint finished"] - #[inline] - pub fn epdis(&mut self) -> _EPDISW { - _EPDISW { w: self } + #[inline(always)] + pub fn epdis(&mut self) -> EPDIS_W { + EPDIS_W { w: self } } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&mut self) -> _TFW { - _TFW { w: self } + #[inline(always)] + pub fn tf(&mut self) -> TF_W { + TF_W { w: self } } } diff --git a/src/usbfs_device/diep1len.rs b/src/usbfs_device/diep1len.rs index dbe9166968a4577b4fadd67db6102dda508e5946..36e37a2a901c4ed8d19af3229ebfebf1a0394832 100644 --- a/src/usbfs_device/diep1len.rs +++ b/src/usbfs_device/diep1len.rs @@ -1,187 +1,88 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEP1LEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MCPFR { - bits: u8, -} -impl MCPFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PCNTR { - bits: u16, -} -impl PCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct TLENR { - bits: u32, -} -impl TLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MCPFW<'a> { +#[doc = "Reader of register DIEP1LEN"] +pub type R = crate::R; +#[doc = "Writer for register DIEP1LEN"] +pub type W = crate::W; +#[doc = "Register DIEP1LEN `reset()`'s with value 0"] +impl crate::ResetValue for super::DIEP1LEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MCPF`"] +pub type MCPF_R = crate::R; +#[doc = "Write proxy for field `MCPF`"] +pub struct MCPF_W<'a> { w: &'a mut W, } -impl<'a> _MCPFW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MCPF_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 29)) | (((value as u32) & 0x03) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _PCNTW<'a> { +#[doc = "Reader of field `PCNT`"] +pub type PCNT_R = crate::R; +#[doc = "Write proxy for field `PCNT`"] +pub struct PCNT_W<'a> { w: &'a mut W, } -impl<'a> _PCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03ff << 19)) | (((value as u32) & 0x03ff) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _TLENW<'a> { +#[doc = "Reader of field `TLEN`"] +pub type TLEN_R = crate::R; +#[doc = "Write proxy for field `TLEN`"] +pub struct TLEN_W<'a> { w: &'a mut W, } -impl<'a> _TLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0007_ffff) | ((value as u32) & 0x0007_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 29:30 - Multi packet count per frame"] - #[inline] - pub fn mcpf(&self) -> MCPFR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MCPFR { bits } + #[inline(always)] + pub fn mcpf(&self) -> MCPF_R { + MCPF_R::new(((self.bits >> 29) & 0x03) as u8) } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&self) -> PCNTR { - let bits = { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - PCNTR { bits } + #[inline(always)] + pub fn pcnt(&self) -> PCNT_R { + PCNT_R::new(((self.bits >> 19) & 0x03ff) as u16) } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&self) -> TLENR { - let bits = { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - TLENR { bits } + #[inline(always)] + pub fn tlen(&self) -> TLEN_R { + TLEN_R::new((self.bits & 0x0007_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 29:30 - Multi packet count per frame"] - #[inline] - pub fn mcpf(&mut self) -> _MCPFW { - _MCPFW { w: self } + #[inline(always)] + pub fn mcpf(&mut self) -> MCPF_W { + MCPF_W { w: self } } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&mut self) -> _PCNTW { - _PCNTW { w: self } + #[inline(always)] + pub fn pcnt(&mut self) -> PCNT_W { + PCNT_W { w: self } } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&mut self) -> _TLENW { - _TLENW { w: self } + #[inline(always)] + pub fn tlen(&mut self) -> TLEN_W { + TLEN_W { w: self } } } diff --git a/src/usbfs_device/diep1tfstat.rs b/src/usbfs_device/diep1tfstat.rs index a67aa6fd3848192be725ecc35ee8b9170cb58690..135bcd9201d71c063176bfccc940ee0529514b31 100644 --- a/src/usbfs_device/diep1tfstat.rs +++ b/src/usbfs_device/diep1tfstat.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::DIEP1TFSTAT { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct IEPTFSR { - bits: u16, -} -impl IEPTFSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register DIEP1TFSTAT"] +pub type R = crate::R; +#[doc = "Reader of field `IEPTFS`"] +pub type IEPTFS_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - IN endpoint TxFIFO space remaining"] - #[inline] - pub fn ieptfs(&self) -> IEPTFSR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IEPTFSR { bits } + #[inline(always)] + pub fn ieptfs(&self) -> IEPTFS_R { + IEPTFS_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/usbfs_device/diep2ctl.rs b/src/usbfs_device/diep2ctl.rs index d1871f2076f4f4bd087024f39eb06eed7fc75736..ad7deae70d29dd063d0254099c0a9367def41a7e 100644 --- a/src/usbfs_device/diep2ctl.rs +++ b/src/usbfs_device/diep2ctl.rs @@ -1,597 +1,346 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEP2CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct EPENR { - bits: bool, -} -impl EPENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDR { - bits: bool, -} -impl EPDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TXFNUMR { - bits: u8, -} -impl TXFNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct STALLR { - bits: bool, -} -impl STALLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTYPER { - bits: u8, -} -impl EPTYPER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct NAKSR { - bits: bool, -} -impl NAKSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EOFRM_DPIDR { - bits: bool, -} -impl EOFRM_DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPACTR { - bits: bool, -} -impl EPACTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MPLR { - bits: u16, -} -impl MPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _EPENW<'a> { +#[doc = "Reader of register DIEP2CTL"] +pub type R = crate::R; +#[doc = "Writer for register DIEP2CTL"] +pub type W = crate::W; +#[doc = "Register DIEP2CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::DIEP2CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `EPEN`"] +pub type EPEN_R = crate::R; +#[doc = "Write proxy for field `EPEN`"] +pub struct EPEN_W<'a> { w: &'a mut W, } -impl<'a> _EPENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } -#[doc = r" Proxy"] -pub struct _EPDW<'a> { +#[doc = "Reader of field `EPD`"] +pub type EPD_R = crate::R; +#[doc = "Write proxy for field `EPD`"] +pub struct EPD_W<'a> { w: &'a mut W, } -impl<'a> _EPDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _SD1PID_SODDFRMW<'a> { +#[doc = "Write proxy for field `SD1PID_SODDFRM`"] +pub struct SD1PID_SODDFRM_W<'a> { w: &'a mut W, } -impl<'a> _SD1PID_SODDFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SD1PID_SODDFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _SD0PID_SEVENFRMW<'a> { +#[doc = "Write proxy for field `SD0PID_SEVENFRM`"] +pub struct SD0PID_SEVENFRM_W<'a> { w: &'a mut W, } -impl<'a> _SD0PID_SEVENFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SD0PID_SEVENFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _SNAKW<'a> { +#[doc = "Write proxy for field `SNAK`"] +pub struct SNAK_W<'a> { w: &'a mut W, } -impl<'a> _SNAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SNAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _CNAKW<'a> { +#[doc = "Write proxy for field `CNAK`"] +pub struct CNAK_W<'a> { w: &'a mut W, } -impl<'a> _CNAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CNAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _TXFNUMW<'a> { +#[doc = "Reader of field `TXFNUM`"] +pub type TXFNUM_R = crate::R; +#[doc = "Write proxy for field `TXFNUM`"] +pub struct TXFNUM_W<'a> { w: &'a mut W, } -impl<'a> _TXFNUMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TXFNUM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 22)) | (((value as u32) & 0x0f) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _STALLW<'a> { +#[doc = "Reader of field `STALL`"] +pub type STALL_R = crate::R; +#[doc = "Write proxy for field `STALL`"] +pub struct STALL_W<'a> { w: &'a mut W, } -impl<'a> _STALLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _EPTYPEW<'a> { +#[doc = "Reader of field `EPTYPE`"] +pub type EPTYPE_R = crate::R; +#[doc = "Write proxy for field `EPTYPE`"] +pub struct EPTYPE_W<'a> { w: &'a mut W, } -impl<'a> _EPTYPEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPTYPE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _EPACTW<'a> { +#[doc = "Reader of field `NAKS`"] +pub type NAKS_R = crate::R; +#[doc = "Reader of field `EOFRM_DPID`"] +pub type EOFRM_DPID_R = crate::R; +#[doc = "Reader of field `EPACT`"] +pub type EPACT_R = crate::R; +#[doc = "Write proxy for field `EPACT`"] +pub struct EPACT_W<'a> { w: &'a mut W, } -impl<'a> _EPACTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPACT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _MPLW<'a> { +#[doc = "Reader of field `MPL`"] +pub type MPL_R = crate::R; +#[doc = "Write proxy for field `MPL`"] +pub struct MPL_W<'a> { w: &'a mut W, } -impl<'a> _MPLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MPL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07ff) | ((value as u32) & 0x07ff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 31 - Endpoint enable"] - #[inline] - pub fn epen(&self) -> EPENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPENR { bits } + #[inline(always)] + pub fn epen(&self) -> EPEN_R { + EPEN_R::new(((self.bits >> 31) & 0x01) != 0) } #[doc = "Bit 30 - Endpoint disable"] - #[inline] - pub fn epd(&self) -> EPDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDR { bits } + #[inline(always)] + pub fn epd(&self) -> EPD_R { + EPD_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bits 22:25 - Tx FIFO number"] - #[inline] - pub fn txfnum(&self) -> TXFNUMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - TXFNUMR { bits } + #[inline(always)] + pub fn txfnum(&self) -> TXFNUM_R { + TXFNUM_R::new(((self.bits >> 22) & 0x0f) as u8) } #[doc = "Bit 21 - STALL handshake"] - #[inline] - pub fn stall(&self) -> STALLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLR { bits } + #[inline(always)] + pub fn stall(&self) -> STALL_R { + STALL_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&self) -> EPTYPER { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPTYPER { bits } + #[inline(always)] + pub fn eptype(&self) -> EPTYPE_R { + EPTYPE_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bit 17 - NAK status"] - #[inline] - pub fn naks(&self) -> NAKSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKSR { bits } + #[inline(always)] + pub fn naks(&self) -> NAKS_R { + NAKS_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 16 - EOFRM/DPID"] - #[inline] - pub fn eofrm_dpid(&self) -> EOFRM_DPIDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOFRM_DPIDR { bits } + #[inline(always)] + pub fn eofrm_dpid(&self) -> EOFRM_DPID_R { + EOFRM_DPID_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 15 - Endpoint active"] - #[inline] - pub fn epact(&self) -> EPACTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPACTR { bits } + #[inline(always)] + pub fn epact(&self) -> EPACT_R { + EPACT_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bits 0:10 - maximum packet length"] - #[inline] - pub fn mpl(&self) -> MPLR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - MPLR { bits } + #[inline(always)] + pub fn mpl(&self) -> MPL_R { + MPL_R::new((self.bits & 0x07ff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 31 - Endpoint enable"] - #[inline] - pub fn epen(&mut self) -> _EPENW { - _EPENW { w: self } + #[inline(always)] + pub fn epen(&mut self) -> EPEN_W { + EPEN_W { w: self } } #[doc = "Bit 30 - Endpoint disable"] - #[inline] - pub fn epd(&mut self) -> _EPDW { - _EPDW { w: self } + #[inline(always)] + pub fn epd(&mut self) -> EPD_W { + EPD_W { w: self } } #[doc = "Bit 29 - Set DATA1 PID/Set odd frame"] - #[inline] - pub fn sd1pid_soddfrm(&mut self) -> _SD1PID_SODDFRMW { - _SD1PID_SODDFRMW { w: self } + #[inline(always)] + pub fn sd1pid_soddfrm(&mut self) -> SD1PID_SODDFRM_W { + SD1PID_SODDFRM_W { w: self } } #[doc = "Bit 28 - SD0PID/SEVNFRM"] - #[inline] - pub fn sd0pid_sevenfrm(&mut self) -> _SD0PID_SEVENFRMW { - _SD0PID_SEVENFRMW { w: self } + #[inline(always)] + pub fn sd0pid_sevenfrm(&mut self) -> SD0PID_SEVENFRM_W { + SD0PID_SEVENFRM_W { w: self } } #[doc = "Bit 27 - Set NAK"] - #[inline] - pub fn snak(&mut self) -> _SNAKW { - _SNAKW { w: self } + #[inline(always)] + pub fn snak(&mut self) -> SNAK_W { + SNAK_W { w: self } } #[doc = "Bit 26 - Clear NAK"] - #[inline] - pub fn cnak(&mut self) -> _CNAKW { - _CNAKW { w: self } + #[inline(always)] + pub fn cnak(&mut self) -> CNAK_W { + CNAK_W { w: self } } #[doc = "Bits 22:25 - Tx FIFO number"] - #[inline] - pub fn txfnum(&mut self) -> _TXFNUMW { - _TXFNUMW { w: self } + #[inline(always)] + pub fn txfnum(&mut self) -> TXFNUM_W { + TXFNUM_W { w: self } } #[doc = "Bit 21 - STALL handshake"] - #[inline] - pub fn stall(&mut self) -> _STALLW { - _STALLW { w: self } + #[inline(always)] + pub fn stall(&mut self) -> STALL_W { + STALL_W { w: self } } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&mut self) -> _EPTYPEW { - _EPTYPEW { w: self } + #[inline(always)] + pub fn eptype(&mut self) -> EPTYPE_W { + EPTYPE_W { w: self } } #[doc = "Bit 15 - Endpoint active"] - #[inline] - pub fn epact(&mut self) -> _EPACTW { - _EPACTW { w: self } + #[inline(always)] + pub fn epact(&mut self) -> EPACT_W { + EPACT_W { w: self } } #[doc = "Bits 0:10 - maximum packet length"] - #[inline] - pub fn mpl(&mut self) -> _MPLW { - _MPLW { w: self } + #[inline(always)] + pub fn mpl(&mut self) -> MPL_W { + MPL_W { w: self } } } diff --git a/src/usbfs_device/diep2intf.rs b/src/usbfs_device/diep2intf.rs index 3bbb9b0032ac380c90c74b4f32c8c1f4696f74d2..5d2a16abae6d96ca6442660a490c11651903b899 100644 --- a/src/usbfs_device/diep2intf.rs +++ b/src/usbfs_device/diep2intf.rs @@ -1,390 +1,193 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEP2INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TXFER { - bits: bool, -} -impl TXFER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IEPNER { - bits: bool, -} -impl IEPNER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTXFUDR { - bits: bool, -} -impl EPTXFUDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CITOR { - bits: bool, -} -impl CITOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDISR { - bits: bool, -} -impl EPDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TFR { - bits: bool, -} -impl TFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _IEPNEW<'a> { +#[doc = "Reader of register DIEP2INTF"] +pub type R = crate::R; +#[doc = "Writer for register DIEP2INTF"] +pub type W = crate::W; +#[doc = "Register DIEP2INTF `reset()`'s with value 0x80"] +impl crate::ResetValue for super::DIEP2INTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x80 + } +} +#[doc = "Reader of field `TXFE`"] +pub type TXFE_R = crate::R; +#[doc = "Reader of field `IEPNE`"] +pub type IEPNE_R = crate::R; +#[doc = "Write proxy for field `IEPNE`"] +pub struct IEPNE_W<'a> { w: &'a mut W, } -impl<'a> _IEPNEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IEPNE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _EPTXFUDW<'a> { +#[doc = "Reader of field `EPTXFUD`"] +pub type EPTXFUD_R = crate::R; +#[doc = "Write proxy for field `EPTXFUD`"] +pub struct EPTXFUD_W<'a> { w: &'a mut W, } -impl<'a> _EPTXFUDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPTXFUD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CITOW<'a> { +#[doc = "Reader of field `CITO`"] +pub type CITO_R = crate::R; +#[doc = "Write proxy for field `CITO`"] +pub struct CITO_W<'a> { w: &'a mut W, } -impl<'a> _CITOW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CITO_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _EPDISW<'a> { +#[doc = "Reader of field `EPDIS`"] +pub type EPDIS_R = crate::R; +#[doc = "Write proxy for field `EPDIS`"] +pub struct EPDIS_W<'a> { w: &'a mut W, } -impl<'a> _EPDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _TFW<'a> { +#[doc = "Reader of field `TF`"] +pub type TF_R = crate::R; +#[doc = "Write proxy for field `TF`"] +pub struct TF_W<'a> { w: &'a mut W, } -impl<'a> _TFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 7 - Transmit FIFO empty"] - #[inline] - pub fn txfe(&self) -> TXFER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TXFER { bits } + #[inline(always)] + pub fn txfe(&self) -> TXFE_R { + TXFE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - IN endpoint NAK effective"] - #[inline] - pub fn iepne(&self) -> IEPNER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IEPNER { bits } + #[inline(always)] + pub fn iepne(&self) -> IEPNE_R { + IEPNE_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 4 - Endpoint Tx FIFO underrun"] - #[inline] - pub fn eptxfud(&self) -> EPTXFUDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPTXFUDR { bits } + #[inline(always)] + pub fn eptxfud(&self) -> EPTXFUD_R { + EPTXFUD_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Control in timeout interrupt"] - #[inline] - pub fn cito(&self) -> CITOR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CITOR { bits } + #[inline(always)] + pub fn cito(&self) -> CITO_R { + CITO_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 1 - Endpoint finished"] - #[inline] - pub fn epdis(&self) -> EPDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDISR { bits } + #[inline(always)] + pub fn epdis(&self) -> EPDIS_R { + EPDIS_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&self) -> TFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFR { bits } + #[inline(always)] + pub fn tf(&self) -> TF_R { + TF_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x80 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 6 - IN endpoint NAK effective"] - #[inline] - pub fn iepne(&mut self) -> _IEPNEW { - _IEPNEW { w: self } + #[inline(always)] + pub fn iepne(&mut self) -> IEPNE_W { + IEPNE_W { w: self } } #[doc = "Bit 4 - Endpoint Tx FIFO underrun"] - #[inline] - pub fn eptxfud(&mut self) -> _EPTXFUDW { - _EPTXFUDW { w: self } + #[inline(always)] + pub fn eptxfud(&mut self) -> EPTXFUD_W { + EPTXFUD_W { w: self } } #[doc = "Bit 3 - Control in timeout interrupt"] - #[inline] - pub fn cito(&mut self) -> _CITOW { - _CITOW { w: self } + #[inline(always)] + pub fn cito(&mut self) -> CITO_W { + CITO_W { w: self } } #[doc = "Bit 1 - Endpoint finished"] - #[inline] - pub fn epdis(&mut self) -> _EPDISW { - _EPDISW { w: self } + #[inline(always)] + pub fn epdis(&mut self) -> EPDIS_W { + EPDIS_W { w: self } } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&mut self) -> _TFW { - _TFW { w: self } + #[inline(always)] + pub fn tf(&mut self) -> TF_W { + TF_W { w: self } } } diff --git a/src/usbfs_device/diep2len.rs b/src/usbfs_device/diep2len.rs index 1c09db8447d3e3032b447e65b408262482c49448..a09d1cfa6e30d2ba820a051b43e3a1ff55f3a04e 100644 --- a/src/usbfs_device/diep2len.rs +++ b/src/usbfs_device/diep2len.rs @@ -1,187 +1,88 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEP2LEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MCPFR { - bits: u8, -} -impl MCPFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PCNTR { - bits: u16, -} -impl PCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct TLENR { - bits: u32, -} -impl TLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MCPFW<'a> { +#[doc = "Reader of register DIEP2LEN"] +pub type R = crate::R; +#[doc = "Writer for register DIEP2LEN"] +pub type W = crate::W; +#[doc = "Register DIEP2LEN `reset()`'s with value 0"] +impl crate::ResetValue for super::DIEP2LEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MCPF`"] +pub type MCPF_R = crate::R; +#[doc = "Write proxy for field `MCPF`"] +pub struct MCPF_W<'a> { w: &'a mut W, } -impl<'a> _MCPFW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MCPF_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 29)) | (((value as u32) & 0x03) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _PCNTW<'a> { +#[doc = "Reader of field `PCNT`"] +pub type PCNT_R = crate::R; +#[doc = "Write proxy for field `PCNT`"] +pub struct PCNT_W<'a> { w: &'a mut W, } -impl<'a> _PCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03ff << 19)) | (((value as u32) & 0x03ff) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _TLENW<'a> { +#[doc = "Reader of field `TLEN`"] +pub type TLEN_R = crate::R; +#[doc = "Write proxy for field `TLEN`"] +pub struct TLEN_W<'a> { w: &'a mut W, } -impl<'a> _TLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0007_ffff) | ((value as u32) & 0x0007_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 29:30 - Multi packet count per frame"] - #[inline] - pub fn mcpf(&self) -> MCPFR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MCPFR { bits } + #[inline(always)] + pub fn mcpf(&self) -> MCPF_R { + MCPF_R::new(((self.bits >> 29) & 0x03) as u8) } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&self) -> PCNTR { - let bits = { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - PCNTR { bits } + #[inline(always)] + pub fn pcnt(&self) -> PCNT_R { + PCNT_R::new(((self.bits >> 19) & 0x03ff) as u16) } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&self) -> TLENR { - let bits = { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - TLENR { bits } + #[inline(always)] + pub fn tlen(&self) -> TLEN_R { + TLEN_R::new((self.bits & 0x0007_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 29:30 - Multi packet count per frame"] - #[inline] - pub fn mcpf(&mut self) -> _MCPFW { - _MCPFW { w: self } + #[inline(always)] + pub fn mcpf(&mut self) -> MCPF_W { + MCPF_W { w: self } } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&mut self) -> _PCNTW { - _PCNTW { w: self } + #[inline(always)] + pub fn pcnt(&mut self) -> PCNT_W { + PCNT_W { w: self } } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&mut self) -> _TLENW { - _TLENW { w: self } + #[inline(always)] + pub fn tlen(&mut self) -> TLEN_W { + TLEN_W { w: self } } } diff --git a/src/usbfs_device/diep2tfstat.rs b/src/usbfs_device/diep2tfstat.rs index 41ea80da7867a37a0bc5416a850e35c09f015fa6..43acc367d3506eccdea20a0cdcfadd1d9ef8eb72 100644 --- a/src/usbfs_device/diep2tfstat.rs +++ b/src/usbfs_device/diep2tfstat.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::DIEP2TFSTAT { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct IEPTFSR { - bits: u16, -} -impl IEPTFSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register DIEP2TFSTAT"] +pub type R = crate::R; +#[doc = "Reader of field `IEPTFS`"] +pub type IEPTFS_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - IN endpoint TxFIFO space remaining"] - #[inline] - pub fn ieptfs(&self) -> IEPTFSR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IEPTFSR { bits } + #[inline(always)] + pub fn ieptfs(&self) -> IEPTFS_R { + IEPTFS_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/usbfs_device/diep3ctl.rs b/src/usbfs_device/diep3ctl.rs index ab97b67625e31fa2b2c76b40353789c67a7633f5..bb2e11c5bac5d393080e0cc0cd295807b43ee2cd 100644 --- a/src/usbfs_device/diep3ctl.rs +++ b/src/usbfs_device/diep3ctl.rs @@ -1,597 +1,346 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEP3CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct EPENR { - bits: bool, -} -impl EPENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDR { - bits: bool, -} -impl EPDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TXFNUMR { - bits: u8, -} -impl TXFNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct STALLR { - bits: bool, -} -impl STALLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTYPER { - bits: u8, -} -impl EPTYPER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct NAKSR { - bits: bool, -} -impl NAKSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EOFRM_DPIDR { - bits: bool, -} -impl EOFRM_DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPACTR { - bits: bool, -} -impl EPACTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MPLR { - bits: u16, -} -impl MPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _EPENW<'a> { +#[doc = "Reader of register DIEP3CTL"] +pub type R = crate::R; +#[doc = "Writer for register DIEP3CTL"] +pub type W = crate::W; +#[doc = "Register DIEP3CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::DIEP3CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `EPEN`"] +pub type EPEN_R = crate::R; +#[doc = "Write proxy for field `EPEN`"] +pub struct EPEN_W<'a> { w: &'a mut W, } -impl<'a> _EPENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } -#[doc = r" Proxy"] -pub struct _EPDW<'a> { +#[doc = "Reader of field `EPD`"] +pub type EPD_R = crate::R; +#[doc = "Write proxy for field `EPD`"] +pub struct EPD_W<'a> { w: &'a mut W, } -impl<'a> _EPDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _SD1PID_SODDFRMW<'a> { +#[doc = "Write proxy for field `SD1PID_SODDFRM`"] +pub struct SD1PID_SODDFRM_W<'a> { w: &'a mut W, } -impl<'a> _SD1PID_SODDFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SD1PID_SODDFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _SD0PID_SEVENFRMW<'a> { +#[doc = "Write proxy for field `SD0PID_SEVENFRM`"] +pub struct SD0PID_SEVENFRM_W<'a> { w: &'a mut W, } -impl<'a> _SD0PID_SEVENFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SD0PID_SEVENFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _SNAKW<'a> { +#[doc = "Write proxy for field `SNAK`"] +pub struct SNAK_W<'a> { w: &'a mut W, } -impl<'a> _SNAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SNAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _CNAKW<'a> { +#[doc = "Write proxy for field `CNAK`"] +pub struct CNAK_W<'a> { w: &'a mut W, } -impl<'a> _CNAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CNAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _TXFNUMW<'a> { +#[doc = "Reader of field `TXFNUM`"] +pub type TXFNUM_R = crate::R; +#[doc = "Write proxy for field `TXFNUM`"] +pub struct TXFNUM_W<'a> { w: &'a mut W, } -impl<'a> _TXFNUMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TXFNUM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 22)) | (((value as u32) & 0x0f) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _STALLW<'a> { +#[doc = "Reader of field `STALL`"] +pub type STALL_R = crate::R; +#[doc = "Write proxy for field `STALL`"] +pub struct STALL_W<'a> { w: &'a mut W, } -impl<'a> _STALLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _EPTYPEW<'a> { +#[doc = "Reader of field `EPTYPE`"] +pub type EPTYPE_R = crate::R; +#[doc = "Write proxy for field `EPTYPE`"] +pub struct EPTYPE_W<'a> { w: &'a mut W, } -impl<'a> _EPTYPEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPTYPE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _EPACTW<'a> { +#[doc = "Reader of field `NAKS`"] +pub type NAKS_R = crate::R; +#[doc = "Reader of field `EOFRM_DPID`"] +pub type EOFRM_DPID_R = crate::R; +#[doc = "Reader of field `EPACT`"] +pub type EPACT_R = crate::R; +#[doc = "Write proxy for field `EPACT`"] +pub struct EPACT_W<'a> { w: &'a mut W, } -impl<'a> _EPACTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPACT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _MPLW<'a> { +#[doc = "Reader of field `MPL`"] +pub type MPL_R = crate::R; +#[doc = "Write proxy for field `MPL`"] +pub struct MPL_W<'a> { w: &'a mut W, } -impl<'a> _MPLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MPL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07ff) | ((value as u32) & 0x07ff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 31 - Endpoint enable"] - #[inline] - pub fn epen(&self) -> EPENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPENR { bits } + #[inline(always)] + pub fn epen(&self) -> EPEN_R { + EPEN_R::new(((self.bits >> 31) & 0x01) != 0) } #[doc = "Bit 30 - Endpoint disable"] - #[inline] - pub fn epd(&self) -> EPDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDR { bits } + #[inline(always)] + pub fn epd(&self) -> EPD_R { + EPD_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bits 22:25 - Tx FIFO number"] - #[inline] - pub fn txfnum(&self) -> TXFNUMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - TXFNUMR { bits } + #[inline(always)] + pub fn txfnum(&self) -> TXFNUM_R { + TXFNUM_R::new(((self.bits >> 22) & 0x0f) as u8) } #[doc = "Bit 21 - STALL handshake"] - #[inline] - pub fn stall(&self) -> STALLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLR { bits } + #[inline(always)] + pub fn stall(&self) -> STALL_R { + STALL_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&self) -> EPTYPER { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPTYPER { bits } + #[inline(always)] + pub fn eptype(&self) -> EPTYPE_R { + EPTYPE_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bit 17 - NAK status"] - #[inline] - pub fn naks(&self) -> NAKSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKSR { bits } + #[inline(always)] + pub fn naks(&self) -> NAKS_R { + NAKS_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 16 - EOFRM/DPID"] - #[inline] - pub fn eofrm_dpid(&self) -> EOFRM_DPIDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOFRM_DPIDR { bits } + #[inline(always)] + pub fn eofrm_dpid(&self) -> EOFRM_DPID_R { + EOFRM_DPID_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 15 - Endpoint active"] - #[inline] - pub fn epact(&self) -> EPACTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPACTR { bits } + #[inline(always)] + pub fn epact(&self) -> EPACT_R { + EPACT_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bits 0:10 - maximum packet length"] - #[inline] - pub fn mpl(&self) -> MPLR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - MPLR { bits } + #[inline(always)] + pub fn mpl(&self) -> MPL_R { + MPL_R::new((self.bits & 0x07ff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 31 - Endpoint enable"] - #[inline] - pub fn epen(&mut self) -> _EPENW { - _EPENW { w: self } + #[inline(always)] + pub fn epen(&mut self) -> EPEN_W { + EPEN_W { w: self } } #[doc = "Bit 30 - Endpoint disable"] - #[inline] - pub fn epd(&mut self) -> _EPDW { - _EPDW { w: self } + #[inline(always)] + pub fn epd(&mut self) -> EPD_W { + EPD_W { w: self } } #[doc = "Bit 29 - Set DATA1 PID/Set odd frame"] - #[inline] - pub fn sd1pid_soddfrm(&mut self) -> _SD1PID_SODDFRMW { - _SD1PID_SODDFRMW { w: self } + #[inline(always)] + pub fn sd1pid_soddfrm(&mut self) -> SD1PID_SODDFRM_W { + SD1PID_SODDFRM_W { w: self } } #[doc = "Bit 28 - SD0PID/SEVNFRM"] - #[inline] - pub fn sd0pid_sevenfrm(&mut self) -> _SD0PID_SEVENFRMW { - _SD0PID_SEVENFRMW { w: self } + #[inline(always)] + pub fn sd0pid_sevenfrm(&mut self) -> SD0PID_SEVENFRM_W { + SD0PID_SEVENFRM_W { w: self } } #[doc = "Bit 27 - Set NAK"] - #[inline] - pub fn snak(&mut self) -> _SNAKW { - _SNAKW { w: self } + #[inline(always)] + pub fn snak(&mut self) -> SNAK_W { + SNAK_W { w: self } } #[doc = "Bit 26 - Clear NAK"] - #[inline] - pub fn cnak(&mut self) -> _CNAKW { - _CNAKW { w: self } + #[inline(always)] + pub fn cnak(&mut self) -> CNAK_W { + CNAK_W { w: self } } #[doc = "Bits 22:25 - Tx FIFO number"] - #[inline] - pub fn txfnum(&mut self) -> _TXFNUMW { - _TXFNUMW { w: self } + #[inline(always)] + pub fn txfnum(&mut self) -> TXFNUM_W { + TXFNUM_W { w: self } } #[doc = "Bit 21 - STALL handshake"] - #[inline] - pub fn stall(&mut self) -> _STALLW { - _STALLW { w: self } + #[inline(always)] + pub fn stall(&mut self) -> STALL_W { + STALL_W { w: self } } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&mut self) -> _EPTYPEW { - _EPTYPEW { w: self } + #[inline(always)] + pub fn eptype(&mut self) -> EPTYPE_W { + EPTYPE_W { w: self } } #[doc = "Bit 15 - Endpoint active"] - #[inline] - pub fn epact(&mut self) -> _EPACTW { - _EPACTW { w: self } + #[inline(always)] + pub fn epact(&mut self) -> EPACT_W { + EPACT_W { w: self } } #[doc = "Bits 0:10 - maximum packet length"] - #[inline] - pub fn mpl(&mut self) -> _MPLW { - _MPLW { w: self } + #[inline(always)] + pub fn mpl(&mut self) -> MPL_W { + MPL_W { w: self } } } diff --git a/src/usbfs_device/diep3intf.rs b/src/usbfs_device/diep3intf.rs index 49c6639a9d5cda0cdd6380fae9329bf3aa1d038b..595e5808f8b88c375bec05f640eccbce432be7f4 100644 --- a/src/usbfs_device/diep3intf.rs +++ b/src/usbfs_device/diep3intf.rs @@ -1,390 +1,193 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEP3INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TXFER { - bits: bool, -} -impl TXFER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IEPNER { - bits: bool, -} -impl IEPNER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTXFUDR { - bits: bool, -} -impl EPTXFUDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CITOR { - bits: bool, -} -impl CITOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDISR { - bits: bool, -} -impl EPDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TFR { - bits: bool, -} -impl TFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _IEPNEW<'a> { +#[doc = "Reader of register DIEP3INTF"] +pub type R = crate::R; +#[doc = "Writer for register DIEP3INTF"] +pub type W = crate::W; +#[doc = "Register DIEP3INTF `reset()`'s with value 0x80"] +impl crate::ResetValue for super::DIEP3INTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x80 + } +} +#[doc = "Reader of field `TXFE`"] +pub type TXFE_R = crate::R; +#[doc = "Reader of field `IEPNE`"] +pub type IEPNE_R = crate::R; +#[doc = "Write proxy for field `IEPNE`"] +pub struct IEPNE_W<'a> { w: &'a mut W, } -impl<'a> _IEPNEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IEPNE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _EPTXFUDW<'a> { +#[doc = "Reader of field `EPTXFUD`"] +pub type EPTXFUD_R = crate::R; +#[doc = "Write proxy for field `EPTXFUD`"] +pub struct EPTXFUD_W<'a> { w: &'a mut W, } -impl<'a> _EPTXFUDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPTXFUD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _CITOW<'a> { +#[doc = "Reader of field `CITO`"] +pub type CITO_R = crate::R; +#[doc = "Write proxy for field `CITO`"] +pub struct CITO_W<'a> { w: &'a mut W, } -impl<'a> _CITOW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CITO_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _EPDISW<'a> { +#[doc = "Reader of field `EPDIS`"] +pub type EPDIS_R = crate::R; +#[doc = "Write proxy for field `EPDIS`"] +pub struct EPDIS_W<'a> { w: &'a mut W, } -impl<'a> _EPDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _TFW<'a> { +#[doc = "Reader of field `TF`"] +pub type TF_R = crate::R; +#[doc = "Write proxy for field `TF`"] +pub struct TF_W<'a> { w: &'a mut W, } -impl<'a> _TFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 7 - Transmit FIFO empty"] - #[inline] - pub fn txfe(&self) -> TXFER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TXFER { bits } + #[inline(always)] + pub fn txfe(&self) -> TXFE_R { + TXFE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 6 - IN endpoint NAK effective"] - #[inline] - pub fn iepne(&self) -> IEPNER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IEPNER { bits } + #[inline(always)] + pub fn iepne(&self) -> IEPNE_R { + IEPNE_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 4 - Endpoint Tx FIFO underrun"] - #[inline] - pub fn eptxfud(&self) -> EPTXFUDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPTXFUDR { bits } + #[inline(always)] + pub fn eptxfud(&self) -> EPTXFUD_R { + EPTXFUD_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Control in timeout interrupt"] - #[inline] - pub fn cito(&self) -> CITOR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CITOR { bits } + #[inline(always)] + pub fn cito(&self) -> CITO_R { + CITO_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 1 - Endpoint finished"] - #[inline] - pub fn epdis(&self) -> EPDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDISR { bits } + #[inline(always)] + pub fn epdis(&self) -> EPDIS_R { + EPDIS_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&self) -> TFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFR { bits } + #[inline(always)] + pub fn tf(&self) -> TF_R { + TF_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x80 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 6 - IN endpoint NAK effective"] - #[inline] - pub fn iepne(&mut self) -> _IEPNEW { - _IEPNEW { w: self } + #[inline(always)] + pub fn iepne(&mut self) -> IEPNE_W { + IEPNE_W { w: self } } #[doc = "Bit 4 - Endpoint Tx FIFO underrun"] - #[inline] - pub fn eptxfud(&mut self) -> _EPTXFUDW { - _EPTXFUDW { w: self } + #[inline(always)] + pub fn eptxfud(&mut self) -> EPTXFUD_W { + EPTXFUD_W { w: self } } #[doc = "Bit 3 - Control in timeout interrupt"] - #[inline] - pub fn cito(&mut self) -> _CITOW { - _CITOW { w: self } + #[inline(always)] + pub fn cito(&mut self) -> CITO_W { + CITO_W { w: self } } #[doc = "Bit 1 - Endpoint finished"] - #[inline] - pub fn epdis(&mut self) -> _EPDISW { - _EPDISW { w: self } + #[inline(always)] + pub fn epdis(&mut self) -> EPDIS_W { + EPDIS_W { w: self } } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&mut self) -> _TFW { - _TFW { w: self } + #[inline(always)] + pub fn tf(&mut self) -> TF_W { + TF_W { w: self } } } diff --git a/src/usbfs_device/diep3len.rs b/src/usbfs_device/diep3len.rs index 0b17c975465663eaf7a864e3c5185ae3dc56c7e0..aefd2a36482d50785462b4c289ecc65c0568a452 100644 --- a/src/usbfs_device/diep3len.rs +++ b/src/usbfs_device/diep3len.rs @@ -1,187 +1,88 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEP3LEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MCPFR { - bits: u8, -} -impl MCPFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PCNTR { - bits: u16, -} -impl PCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct TLENR { - bits: u32, -} -impl TLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _MCPFW<'a> { +#[doc = "Reader of register DIEP3LEN"] +pub type R = crate::R; +#[doc = "Writer for register DIEP3LEN"] +pub type W = crate::W; +#[doc = "Register DIEP3LEN `reset()`'s with value 0"] +impl crate::ResetValue for super::DIEP3LEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MCPF`"] +pub type MCPF_R = crate::R; +#[doc = "Write proxy for field `MCPF`"] +pub struct MCPF_W<'a> { w: &'a mut W, } -impl<'a> _MCPFW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MCPF_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 29)) | (((value as u32) & 0x03) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _PCNTW<'a> { +#[doc = "Reader of field `PCNT`"] +pub type PCNT_R = crate::R; +#[doc = "Write proxy for field `PCNT`"] +pub struct PCNT_W<'a> { w: &'a mut W, } -impl<'a> _PCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03ff << 19)) | (((value as u32) & 0x03ff) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _TLENW<'a> { +#[doc = "Reader of field `TLEN`"] +pub type TLEN_R = crate::R; +#[doc = "Write proxy for field `TLEN`"] +pub struct TLEN_W<'a> { w: &'a mut W, } -impl<'a> _TLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0007_ffff) | ((value as u32) & 0x0007_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 29:30 - Multi packet count per frame"] - #[inline] - pub fn mcpf(&self) -> MCPFR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MCPFR { bits } + #[inline(always)] + pub fn mcpf(&self) -> MCPF_R { + MCPF_R::new(((self.bits >> 29) & 0x03) as u8) } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&self) -> PCNTR { - let bits = { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - PCNTR { bits } + #[inline(always)] + pub fn pcnt(&self) -> PCNT_R { + PCNT_R::new(((self.bits >> 19) & 0x03ff) as u16) } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&self) -> TLENR { - let bits = { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - TLENR { bits } + #[inline(always)] + pub fn tlen(&self) -> TLEN_R { + TLEN_R::new((self.bits & 0x0007_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 29:30 - Multi packet count per frame"] - #[inline] - pub fn mcpf(&mut self) -> _MCPFW { - _MCPFW { w: self } + #[inline(always)] + pub fn mcpf(&mut self) -> MCPF_W { + MCPF_W { w: self } } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&mut self) -> _PCNTW { - _PCNTW { w: self } + #[inline(always)] + pub fn pcnt(&mut self) -> PCNT_W { + PCNT_W { w: self } } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&mut self) -> _TLENW { - _TLENW { w: self } + #[inline(always)] + pub fn tlen(&mut self) -> TLEN_W { + TLEN_W { w: self } } } diff --git a/src/usbfs_device/diep3tfstat.rs b/src/usbfs_device/diep3tfstat.rs index 0f699981101be84d2df8dc9006f0b36f4ea05857..0a45731f43abc0a417b666343ff33b7751469d6b 100644 --- a/src/usbfs_device/diep3tfstat.rs +++ b/src/usbfs_device/diep3tfstat.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::DIEP3TFSTAT { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct IEPTFSR { - bits: u16, -} -impl IEPTFSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register DIEP3TFSTAT"] +pub type R = crate::R; +#[doc = "Reader of field `IEPTFS`"] +pub type IEPTFS_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - IN endpoint TxFIFO space remaining"] - #[inline] - pub fn ieptfs(&self) -> IEPTFSR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IEPTFSR { bits } + #[inline(always)] + pub fn ieptfs(&self) -> IEPTFS_R { + IEPTFS_R::new((self.bits & 0xffff) as u16) } } diff --git a/src/usbfs_device/diepfeinten.rs b/src/usbfs_device/diepfeinten.rs index 1bf92a3cafda098398394e3587e3167611cfac93..4b0a0dae0ecee1e3099f952f7b6bc5b660a83749 100644 --- a/src/usbfs_device/diepfeinten.rs +++ b/src/usbfs_device/diepfeinten.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEPFEINTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IEPTXFEIER { - bits: u8, -} -impl IEPTXFEIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _IEPTXFEIEW<'a> { +#[doc = "Reader of register DIEPFEINTEN"] +pub type R = crate::R; +#[doc = "Writer for register DIEPFEINTEN"] +pub type W = crate::W; +#[doc = "Register DIEPFEINTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::DIEPFEINTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `IEPTXFEIE`"] +pub type IEPTXFEIE_R = crate::R; +#[doc = "Write proxy for field `IEPTXFEIE`"] +pub struct IEPTXFEIE_W<'a> { w: &'a mut W, } -impl<'a> _IEPTXFEIEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IEPTXFEIE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0f) | ((value as u32) & 0x0f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:3 - IN EP Tx FIFO empty interrupt enable bits"] - #[inline] - pub fn ieptxfeie(&self) -> IEPTXFEIER { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - IEPTXFEIER { bits } + #[inline(always)] + pub fn ieptxfeie(&self) -> IEPTXFEIE_R { + IEPTXFEIE_R::new((self.bits & 0x0f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:3 - IN EP Tx FIFO empty interrupt enable bits"] - #[inline] - pub fn ieptxfeie(&mut self) -> _IEPTXFEIEW { - _IEPTXFEIEW { w: self } + #[inline(always)] + pub fn ieptxfeie(&mut self) -> IEPTXFEIE_W { + IEPTXFEIE_W { w: self } } } diff --git a/src/usbfs_device/diepinten.rs b/src/usbfs_device/diepinten.rs index 8e91bbac99e0fd613c3fbc3afdf19f769a9506dd..8e208c51bc60828ba9f4a1a0473560ab2dfc5d83 100644 --- a/src/usbfs_device/diepinten.rs +++ b/src/usbfs_device/diepinten.rs @@ -1,359 +1,186 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEPINTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFENR { - bits: bool, -} -impl TFENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDISENR { - bits: bool, -} -impl EPDISENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CITOENR { - bits: bool, -} -impl CITOENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTXFUDENR { - bits: bool, -} -impl EPTXFUDENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IEPNEENR { - bits: bool, -} -impl IEPNEENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFENW<'a> { +#[doc = "Reader of register DIEPINTEN"] +pub type R = crate::R; +#[doc = "Writer for register DIEPINTEN"] +pub type W = crate::W; +#[doc = "Register DIEPINTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::DIEPINTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TFEN`"] +pub type TFEN_R = crate::R; +#[doc = "Write proxy for field `TFEN`"] +pub struct TFEN_W<'a> { w: &'a mut W, } -impl<'a> _TFENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TFEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _EPDISENW<'a> { +#[doc = "Reader of field `EPDISEN`"] +pub type EPDISEN_R = crate::R; +#[doc = "Write proxy for field `EPDISEN`"] +pub struct EPDISEN_W<'a> { w: &'a mut W, } -impl<'a> _EPDISENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDISEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _CITOENW<'a> { +#[doc = "Reader of field `CITOEN`"] +pub type CITOEN_R = crate::R; +#[doc = "Write proxy for field `CITOEN`"] +pub struct CITOEN_W<'a> { w: &'a mut W, } -impl<'a> _CITOENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CITOEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _EPTXFUDENW<'a> { +#[doc = "Reader of field `EPTXFUDEN`"] +pub type EPTXFUDEN_R = crate::R; +#[doc = "Write proxy for field `EPTXFUDEN`"] +pub struct EPTXFUDEN_W<'a> { w: &'a mut W, } -impl<'a> _EPTXFUDENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPTXFUDEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _IEPNEENW<'a> { +#[doc = "Reader of field `IEPNEEN`"] +pub type IEPNEEN_R = crate::R; +#[doc = "Write proxy for field `IEPNEEN`"] +pub struct IEPNEEN_W<'a> { w: &'a mut W, } -impl<'a> _IEPNEENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IEPNEEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer finished interrupt enable"] - #[inline] - pub fn tfen(&self) -> TFENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFENR { bits } + #[inline(always)] + pub fn tfen(&self) -> TFEN_R { + TFEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Endpoint disabled interrupt enable"] - #[inline] - pub fn epdisen(&self) -> EPDISENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDISENR { bits } + #[inline(always)] + pub fn epdisen(&self) -> EPDISEN_R { + EPDISEN_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - Control IN timeout condition interrupt enable (Non-isochronous endpoints)"] - #[inline] - pub fn citoen(&self) -> CITOENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CITOENR { bits } + #[inline(always)] + pub fn citoen(&self) -> CITOEN_R { + CITOEN_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Endpoint Tx FIFO underrun interrupt enable bit"] - #[inline] - pub fn eptxfuden(&self) -> EPTXFUDENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPTXFUDENR { bits } + #[inline(always)] + pub fn eptxfuden(&self) -> EPTXFUDEN_R { + EPTXFUDEN_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 6 - IN endpoint NAK effective interrupt enable"] - #[inline] - pub fn iepneen(&self) -> IEPNEENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IEPNEENR { bits } + #[inline(always)] + pub fn iepneen(&self) -> IEPNEEN_R { + IEPNEEN_R::new(((self.bits >> 6) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer finished interrupt enable"] - #[inline] - pub fn tfen(&mut self) -> _TFENW { - _TFENW { w: self } + #[inline(always)] + pub fn tfen(&mut self) -> TFEN_W { + TFEN_W { w: self } } #[doc = "Bit 1 - Endpoint disabled interrupt enable"] - #[inline] - pub fn epdisen(&mut self) -> _EPDISENW { - _EPDISENW { w: self } + #[inline(always)] + pub fn epdisen(&mut self) -> EPDISEN_W { + EPDISEN_W { w: self } } #[doc = "Bit 3 - Control IN timeout condition interrupt enable (Non-isochronous endpoints)"] - #[inline] - pub fn citoen(&mut self) -> _CITOENW { - _CITOENW { w: self } + #[inline(always)] + pub fn citoen(&mut self) -> CITOEN_W { + CITOEN_W { w: self } } #[doc = "Bit 4 - Endpoint Tx FIFO underrun interrupt enable bit"] - #[inline] - pub fn eptxfuden(&mut self) -> _EPTXFUDENW { - _EPTXFUDENW { w: self } + #[inline(always)] + pub fn eptxfuden(&mut self) -> EPTXFUDEN_W { + EPTXFUDEN_W { w: self } } #[doc = "Bit 6 - IN endpoint NAK effective interrupt enable"] - #[inline] - pub fn iepneen(&mut self) -> _IEPNEENW { - _IEPNEENW { w: self } + #[inline(always)] + pub fn iepneen(&mut self) -> IEPNEEN_W { + IEPNEEN_W { w: self } } } diff --git a/src/usbfs_device/doep0ctl.rs b/src/usbfs_device/doep0ctl.rs index 984ed2d1a170d63704e23655e89c008f0d43595d..46c3e1f65cc137a558a5ee444ed8142236e0204a 100644 --- a/src/usbfs_device/doep0ctl.rs +++ b/src/usbfs_device/doep0ctl.rs @@ -1,432 +1,207 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DOEP0CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct EPENR { - bits: bool, -} -impl EPENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDR { - bits: bool, -} -impl EPDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLR { - bits: bool, -} -impl STALLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SNOOPR { - bits: bool, -} -impl SNOOPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTYPER { - bits: u8, -} -impl EPTYPER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct NAKSR { - bits: bool, -} -impl NAKSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPACTR { - bits: bool, -} -impl EPACTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MPLR { - bits: u8, -} -impl MPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _EPENW<'a> { +#[doc = "Reader of register DOEP0CTL"] +pub type R = crate::R; +#[doc = "Writer for register DOEP0CTL"] +pub type W = crate::W; +#[doc = "Register DOEP0CTL `reset()`'s with value 0x8000"] +impl crate::ResetValue for super::DOEP0CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x8000 + } +} +#[doc = "Reader of field `EPEN`"] +pub type EPEN_R = crate::R; +#[doc = "Write proxy for field `EPEN`"] +pub struct EPEN_W<'a> { w: &'a mut W, } -impl<'a> _EPENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } -#[doc = r" Proxy"] -pub struct _SNAKW<'a> { +#[doc = "Reader of field `EPD`"] +pub type EPD_R = crate::R; +#[doc = "Write proxy for field `SNAK`"] +pub struct SNAK_W<'a> { w: &'a mut W, } -impl<'a> _SNAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SNAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _CNAKW<'a> { +#[doc = "Write proxy for field `CNAK`"] +pub struct CNAK_W<'a> { w: &'a mut W, } -impl<'a> _CNAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CNAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _STALLW<'a> { +#[doc = "Reader of field `STALL`"] +pub type STALL_R = crate::R; +#[doc = "Write proxy for field `STALL`"] +pub struct STALL_W<'a> { w: &'a mut W, } -impl<'a> _STALLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _SNOOPW<'a> { +#[doc = "Reader of field `SNOOP`"] +pub type SNOOP_R = crate::R; +#[doc = "Write proxy for field `SNOOP`"] +pub struct SNOOP_W<'a> { w: &'a mut W, } -impl<'a> _SNOOPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SNOOP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } +#[doc = "Reader of field `EPTYPE`"] +pub type EPTYPE_R = crate::R; +#[doc = "Reader of field `NAKS`"] +pub type NAKS_R = crate::R; +#[doc = "Reader of field `EPACT`"] +pub type EPACT_R = crate::R; +#[doc = "Reader of field `MPL`"] +pub type MPL_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 31 - Endpoint enable"] - #[inline] - pub fn epen(&self) -> EPENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPENR { bits } + #[inline(always)] + pub fn epen(&self) -> EPEN_R { + EPEN_R::new(((self.bits >> 31) & 0x01) != 0) } #[doc = "Bit 30 - Endpoint disable"] - #[inline] - pub fn epd(&self) -> EPDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDR { bits } + #[inline(always)] + pub fn epd(&self) -> EPD_R { + EPD_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 21 - STALL handshake"] - #[inline] - pub fn stall(&self) -> STALLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLR { bits } + #[inline(always)] + pub fn stall(&self) -> STALL_R { + STALL_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 20 - Snoop mode"] - #[inline] - pub fn snoop(&self) -> SNOOPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SNOOPR { bits } + #[inline(always)] + pub fn snoop(&self) -> SNOOP_R { + SNOOP_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&self) -> EPTYPER { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPTYPER { bits } + #[inline(always)] + pub fn eptype(&self) -> EPTYPE_R { + EPTYPE_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bit 17 - NAK status"] - #[inline] - pub fn naks(&self) -> NAKSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKSR { bits } + #[inline(always)] + pub fn naks(&self) -> NAKS_R { + NAKS_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 15 - Endpoint active"] - #[inline] - pub fn epact(&self) -> EPACTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPACTR { bits } + #[inline(always)] + pub fn epact(&self) -> EPACT_R { + EPACT_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bits 0:1 - Maximum packet length"] - #[inline] - pub fn mpl(&self) -> MPLR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - MPLR { bits } + #[inline(always)] + pub fn mpl(&self) -> MPL_R { + MPL_R::new((self.bits & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x8000 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 31 - Endpoint enable"] - #[inline] - pub fn epen(&mut self) -> _EPENW { - _EPENW { w: self } + #[inline(always)] + pub fn epen(&mut self) -> EPEN_W { + EPEN_W { w: self } } #[doc = "Bit 27 - Set NAK"] - #[inline] - pub fn snak(&mut self) -> _SNAKW { - _SNAKW { w: self } + #[inline(always)] + pub fn snak(&mut self) -> SNAK_W { + SNAK_W { w: self } } #[doc = "Bit 26 - Clear NAK"] - #[inline] - pub fn cnak(&mut self) -> _CNAKW { - _CNAKW { w: self } + #[inline(always)] + pub fn cnak(&mut self) -> CNAK_W { + CNAK_W { w: self } } #[doc = "Bit 21 - STALL handshake"] - #[inline] - pub fn stall(&mut self) -> _STALLW { - _STALLW { w: self } + #[inline(always)] + pub fn stall(&mut self) -> STALL_W { + STALL_W { w: self } } #[doc = "Bit 20 - Snoop mode"] - #[inline] - pub fn snoop(&mut self) -> _SNOOPW { - _SNOOPW { w: self } + #[inline(always)] + pub fn snoop(&mut self) -> SNOOP_W { + SNOOP_W { w: self } } } diff --git a/src/usbfs_device/doep0intf.rs b/src/usbfs_device/doep0intf.rs index a94334264b0e9929a6f6fbfaa412c74f2b00f9e5..e4a3c922fba3707e741484fd9dee61169312c5a3 100644 --- a/src/usbfs_device/doep0intf.rs +++ b/src/usbfs_device/doep0intf.rs @@ -1,359 +1,186 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DOEP0INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct BTBSTPR { - bits: bool, -} -impl BTBSTPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPRXFOVRR { - bits: bool, -} -impl EPRXFOVRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STPFR { - bits: bool, -} -impl STPFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDISR { - bits: bool, -} -impl EPDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TFR { - bits: bool, -} -impl TFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _BTBSTPW<'a> { +#[doc = "Reader of register DOEP0INTF"] +pub type R = crate::R; +#[doc = "Writer for register DOEP0INTF"] +pub type W = crate::W; +#[doc = "Register DOEP0INTF `reset()`'s with value 0"] +impl crate::ResetValue for super::DOEP0INTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `BTBSTP`"] +pub type BTBSTP_R = crate::R; +#[doc = "Write proxy for field `BTBSTP`"] +pub struct BTBSTP_W<'a> { w: &'a mut W, } -impl<'a> _BTBSTPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BTBSTP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _EPRXFOVRW<'a> { +#[doc = "Reader of field `EPRXFOVR`"] +pub type EPRXFOVR_R = crate::R; +#[doc = "Write proxy for field `EPRXFOVR`"] +pub struct EPRXFOVR_W<'a> { w: &'a mut W, } -impl<'a> _EPRXFOVRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPRXFOVR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _STPFW<'a> { +#[doc = "Reader of field `STPF`"] +pub type STPF_R = crate::R; +#[doc = "Write proxy for field `STPF`"] +pub struct STPF_W<'a> { w: &'a mut W, } -impl<'a> _STPFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STPF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _EPDISW<'a> { +#[doc = "Reader of field `EPDIS`"] +pub type EPDIS_R = crate::R; +#[doc = "Write proxy for field `EPDIS`"] +pub struct EPDIS_W<'a> { w: &'a mut W, } -impl<'a> _EPDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _TFW<'a> { +#[doc = "Reader of field `TF`"] +pub type TF_R = crate::R; +#[doc = "Write proxy for field `TF`"] +pub struct TF_W<'a> { w: &'a mut W, } -impl<'a> _TFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 6 - Back-to-back SETUP packets"] - #[inline] - pub fn btbstp(&self) -> BTBSTPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BTBSTPR { bits } + #[inline(always)] + pub fn btbstp(&self) -> BTBSTP_R { + BTBSTP_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 4 - Endpoint Rx FIFO overrun"] - #[inline] - pub fn eprxfovr(&self) -> EPRXFOVRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPRXFOVRR { bits } + #[inline(always)] + pub fn eprxfovr(&self) -> EPRXFOVR_R { + EPRXFOVR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Setup phase finished"] - #[inline] - pub fn stpf(&self) -> STPFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STPFR { bits } + #[inline(always)] + pub fn stpf(&self) -> STPF_R { + STPF_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 1 - Endpoint disabled"] - #[inline] - pub fn epdis(&self) -> EPDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDISR { bits } + #[inline(always)] + pub fn epdis(&self) -> EPDIS_R { + EPDIS_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&self) -> TFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFR { bits } + #[inline(always)] + pub fn tf(&self) -> TF_R { + TF_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 6 - Back-to-back SETUP packets"] - #[inline] - pub fn btbstp(&mut self) -> _BTBSTPW { - _BTBSTPW { w: self } + #[inline(always)] + pub fn btbstp(&mut self) -> BTBSTP_W { + BTBSTP_W { w: self } } #[doc = "Bit 4 - Endpoint Rx FIFO overrun"] - #[inline] - pub fn eprxfovr(&mut self) -> _EPRXFOVRW { - _EPRXFOVRW { w: self } + #[inline(always)] + pub fn eprxfovr(&mut self) -> EPRXFOVR_W { + EPRXFOVR_W { w: self } } #[doc = "Bit 3 - Setup phase finished"] - #[inline] - pub fn stpf(&mut self) -> _STPFW { - _STPFW { w: self } + #[inline(always)] + pub fn stpf(&mut self) -> STPF_W { + STPF_W { w: self } } #[doc = "Bit 1 - Endpoint disabled"] - #[inline] - pub fn epdis(&mut self) -> _EPDISW { - _EPDISW { w: self } + #[inline(always)] + pub fn epdis(&mut self) -> EPDIS_W { + EPDIS_W { w: self } } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&mut self) -> _TFW { - _TFW { w: self } + #[inline(always)] + pub fn tf(&mut self) -> TF_W { + TF_W { w: self } } } diff --git a/src/usbfs_device/doep0len.rs b/src/usbfs_device/doep0len.rs index b23f635f8958ebc0ff29c08ed37493e8cd1c28c4..11b5e0fbd8201fb8d053c33cd6b60fd77583d353 100644 --- a/src/usbfs_device/doep0len.rs +++ b/src/usbfs_device/doep0len.rs @@ -1,205 +1,98 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DOEP0LEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct STPCNTR { - bits: u8, -} -impl STPCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PCNTR { - bits: bool, -} -impl PCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TLENR { - bits: u8, -} -impl TLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _STPCNTW<'a> { +#[doc = "Reader of register DOEP0LEN"] +pub type R = crate::R; +#[doc = "Writer for register DOEP0LEN"] +pub type W = crate::W; +#[doc = "Register DOEP0LEN `reset()`'s with value 0"] +impl crate::ResetValue for super::DOEP0LEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `STPCNT`"] +pub type STPCNT_R = crate::R; +#[doc = "Write proxy for field `STPCNT`"] +pub struct STPCNT_W<'a> { w: &'a mut W, } -impl<'a> _STPCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> STPCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 29)) | (((value as u32) & 0x03) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _PCNTW<'a> { +#[doc = "Reader of field `PCNT`"] +pub type PCNT_R = crate::R; +#[doc = "Write proxy for field `PCNT`"] +pub struct PCNT_W<'a> { w: &'a mut W, } -impl<'a> _PCNTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PCNT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _TLENW<'a> { +#[doc = "Reader of field `TLEN`"] +pub type TLEN_R = crate::R; +#[doc = "Write proxy for field `TLEN`"] +pub struct TLEN_W<'a> { w: &'a mut W, } -impl<'a> _TLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x7f) | ((value as u32) & 0x7f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 29:30 - SETUP packet count"] - #[inline] - pub fn stpcnt(&self) -> STPCNTR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - STPCNTR { bits } + #[inline(always)] + pub fn stpcnt(&self) -> STPCNT_R { + STPCNT_R::new(((self.bits >> 29) & 0x03) as u8) } #[doc = "Bit 19 - Packet count"] - #[inline] - pub fn pcnt(&self) -> PCNTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PCNTR { bits } + #[inline(always)] + pub fn pcnt(&self) -> PCNT_R { + PCNT_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bits 0:6 - Transfer length"] - #[inline] - pub fn tlen(&self) -> TLENR { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - TLENR { bits } + #[inline(always)] + pub fn tlen(&self) -> TLEN_R { + TLEN_R::new((self.bits & 0x7f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 29:30 - SETUP packet count"] - #[inline] - pub fn stpcnt(&mut self) -> _STPCNTW { - _STPCNTW { w: self } + #[inline(always)] + pub fn stpcnt(&mut self) -> STPCNT_W { + STPCNT_W { w: self } } #[doc = "Bit 19 - Packet count"] - #[inline] - pub fn pcnt(&mut self) -> _PCNTW { - _PCNTW { w: self } + #[inline(always)] + pub fn pcnt(&mut self) -> PCNT_W { + PCNT_W { w: self } } #[doc = "Bits 0:6 - Transfer length"] - #[inline] - pub fn tlen(&mut self) -> _TLENW { - _TLENW { w: self } + #[inline(always)] + pub fn tlen(&mut self) -> TLEN_W { + TLEN_W { w: self } } } diff --git a/src/usbfs_device/doep1ctl.rs b/src/usbfs_device/doep1ctl.rs index 4dac3745363167030248cf0ca6f5a3f69fbbdadf..419ec68f17ed6718f38a49318ef8ba458ea750e7 100644 --- a/src/usbfs_device/doep1ctl.rs +++ b/src/usbfs_device/doep1ctl.rs @@ -1,615 +1,356 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DOEP1CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct EPENR { - bits: bool, -} -impl EPENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDR { - bits: bool, -} -impl EPDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLR { - bits: bool, -} -impl STALLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SNOOPR { - bits: bool, -} -impl SNOOPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTYPER { - bits: u8, -} -impl EPTYPER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct NAKSR { - bits: bool, -} -impl NAKSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EOFRM_DPIDR { - bits: bool, -} -impl EOFRM_DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPACTR { - bits: bool, -} -impl EPACTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MPLR { - bits: u16, -} -impl MPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _EPENW<'a> { +#[doc = "Reader of register DOEP1CTL"] +pub type R = crate::R; +#[doc = "Writer for register DOEP1CTL"] +pub type W = crate::W; +#[doc = "Register DOEP1CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::DOEP1CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `EPEN`"] +pub type EPEN_R = crate::R; +#[doc = "Write proxy for field `EPEN`"] +pub struct EPEN_W<'a> { w: &'a mut W, } -impl<'a> _EPENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } -#[doc = r" Proxy"] -pub struct _EPDW<'a> { +#[doc = "Reader of field `EPD`"] +pub type EPD_R = crate::R; +#[doc = "Write proxy for field `EPD`"] +pub struct EPD_W<'a> { w: &'a mut W, } -impl<'a> _EPDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _SD1PID_SODDFRMW<'a> { +#[doc = "Write proxy for field `SD1PID_SODDFRM`"] +pub struct SD1PID_SODDFRM_W<'a> { w: &'a mut W, } -impl<'a> _SD1PID_SODDFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SD1PID_SODDFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _SD0PID_SEVENFRMW<'a> { +#[doc = "Write proxy for field `SD0PID_SEVENFRM`"] +pub struct SD0PID_SEVENFRM_W<'a> { w: &'a mut W, } -impl<'a> _SD0PID_SEVENFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SD0PID_SEVENFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _SNAKW<'a> { +#[doc = "Write proxy for field `SNAK`"] +pub struct SNAK_W<'a> { w: &'a mut W, } -impl<'a> _SNAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SNAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _CNAKW<'a> { +#[doc = "Write proxy for field `CNAK`"] +pub struct CNAK_W<'a> { w: &'a mut W, } -impl<'a> _CNAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CNAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _STALLW<'a> { +#[doc = "Reader of field `STALL`"] +pub type STALL_R = crate::R; +#[doc = "Write proxy for field `STALL`"] +pub struct STALL_W<'a> { w: &'a mut W, } -impl<'a> _STALLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _SNOOPW<'a> { +#[doc = "Reader of field `SNOOP`"] +pub type SNOOP_R = crate::R; +#[doc = "Write proxy for field `SNOOP`"] +pub struct SNOOP_W<'a> { w: &'a mut W, } -impl<'a> _SNOOPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SNOOP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _EPTYPEW<'a> { +#[doc = "Reader of field `EPTYPE`"] +pub type EPTYPE_R = crate::R; +#[doc = "Write proxy for field `EPTYPE`"] +pub struct EPTYPE_W<'a> { w: &'a mut W, } -impl<'a> _EPTYPEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPTYPE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _EPACTW<'a> { +#[doc = "Reader of field `NAKS`"] +pub type NAKS_R = crate::R; +#[doc = "Reader of field `EOFRM_DPID`"] +pub type EOFRM_DPID_R = crate::R; +#[doc = "Reader of field `EPACT`"] +pub type EPACT_R = crate::R; +#[doc = "Write proxy for field `EPACT`"] +pub struct EPACT_W<'a> { w: &'a mut W, } -impl<'a> _EPACTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPACT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _MPLW<'a> { +#[doc = "Reader of field `MPL`"] +pub type MPL_R = crate::R; +#[doc = "Write proxy for field `MPL`"] +pub struct MPL_W<'a> { w: &'a mut W, } -impl<'a> _MPLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MPL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07ff) | ((value as u32) & 0x07ff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 31 - Endpoint enable"] - #[inline] - pub fn epen(&self) -> EPENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPENR { bits } + #[inline(always)] + pub fn epen(&self) -> EPEN_R { + EPEN_R::new(((self.bits >> 31) & 0x01) != 0) } #[doc = "Bit 30 - Endpoint disable"] - #[inline] - pub fn epd(&self) -> EPDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDR { bits } + #[inline(always)] + pub fn epd(&self) -> EPD_R { + EPD_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 21 - STALL handshake"] - #[inline] - pub fn stall(&self) -> STALLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLR { bits } + #[inline(always)] + pub fn stall(&self) -> STALL_R { + STALL_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 20 - Snoop mode"] - #[inline] - pub fn snoop(&self) -> SNOOPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SNOOPR { bits } + #[inline(always)] + pub fn snoop(&self) -> SNOOP_R { + SNOOP_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&self) -> EPTYPER { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPTYPER { bits } + #[inline(always)] + pub fn eptype(&self) -> EPTYPE_R { + EPTYPE_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bit 17 - NAK status"] - #[inline] - pub fn naks(&self) -> NAKSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKSR { bits } + #[inline(always)] + pub fn naks(&self) -> NAKS_R { + NAKS_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 16 - EOFRM/DPID"] - #[inline] - pub fn eofrm_dpid(&self) -> EOFRM_DPIDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOFRM_DPIDR { bits } + #[inline(always)] + pub fn eofrm_dpid(&self) -> EOFRM_DPID_R { + EOFRM_DPID_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 15 - Endpoint active"] - #[inline] - pub fn epact(&self) -> EPACTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPACTR { bits } + #[inline(always)] + pub fn epact(&self) -> EPACT_R { + EPACT_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bits 0:10 - maximum packet length"] - #[inline] - pub fn mpl(&self) -> MPLR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - MPLR { bits } + #[inline(always)] + pub fn mpl(&self) -> MPL_R { + MPL_R::new((self.bits & 0x07ff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 31 - Endpoint enable"] - #[inline] - pub fn epen(&mut self) -> _EPENW { - _EPENW { w: self } + #[inline(always)] + pub fn epen(&mut self) -> EPEN_W { + EPEN_W { w: self } } #[doc = "Bit 30 - Endpoint disable"] - #[inline] - pub fn epd(&mut self) -> _EPDW { - _EPDW { w: self } + #[inline(always)] + pub fn epd(&mut self) -> EPD_W { + EPD_W { w: self } } #[doc = "Bit 29 - SD1PID/SODDFRM"] - #[inline] - pub fn sd1pid_soddfrm(&mut self) -> _SD1PID_SODDFRMW { - _SD1PID_SODDFRMW { w: self } + #[inline(always)] + pub fn sd1pid_soddfrm(&mut self) -> SD1PID_SODDFRM_W { + SD1PID_SODDFRM_W { w: self } } #[doc = "Bit 28 - SD0PID/SEVENFRM"] - #[inline] - pub fn sd0pid_sevenfrm(&mut self) -> _SD0PID_SEVENFRMW { - _SD0PID_SEVENFRMW { w: self } + #[inline(always)] + pub fn sd0pid_sevenfrm(&mut self) -> SD0PID_SEVENFRM_W { + SD0PID_SEVENFRM_W { w: self } } #[doc = "Bit 27 - Set NAK"] - #[inline] - pub fn snak(&mut self) -> _SNAKW { - _SNAKW { w: self } + #[inline(always)] + pub fn snak(&mut self) -> SNAK_W { + SNAK_W { w: self } } #[doc = "Bit 26 - Clear NAK"] - #[inline] - pub fn cnak(&mut self) -> _CNAKW { - _CNAKW { w: self } + #[inline(always)] + pub fn cnak(&mut self) -> CNAK_W { + CNAK_W { w: self } } #[doc = "Bit 21 - STALL handshake"] - #[inline] - pub fn stall(&mut self) -> _STALLW { - _STALLW { w: self } + #[inline(always)] + pub fn stall(&mut self) -> STALL_W { + STALL_W { w: self } } #[doc = "Bit 20 - Snoop mode"] - #[inline] - pub fn snoop(&mut self) -> _SNOOPW { - _SNOOPW { w: self } + #[inline(always)] + pub fn snoop(&mut self) -> SNOOP_W { + SNOOP_W { w: self } } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&mut self) -> _EPTYPEW { - _EPTYPEW { w: self } + #[inline(always)] + pub fn eptype(&mut self) -> EPTYPE_W { + EPTYPE_W { w: self } } #[doc = "Bit 15 - Endpoint active"] - #[inline] - pub fn epact(&mut self) -> _EPACTW { - _EPACTW { w: self } + #[inline(always)] + pub fn epact(&mut self) -> EPACT_W { + EPACT_W { w: self } } #[doc = "Bits 0:10 - maximum packet length"] - #[inline] - pub fn mpl(&mut self) -> _MPLW { - _MPLW { w: self } + #[inline(always)] + pub fn mpl(&mut self) -> MPL_W { + MPL_W { w: self } } } diff --git a/src/usbfs_device/doep1intf.rs b/src/usbfs_device/doep1intf.rs index a023916ee7d7b859a94a9d4a3de168fd94d4cbb3..943e8ec20b64362962d404e88ba652f996f0625c 100644 --- a/src/usbfs_device/doep1intf.rs +++ b/src/usbfs_device/doep1intf.rs @@ -1,359 +1,186 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DOEP1INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct BTBSTPR { - bits: bool, -} -impl BTBSTPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPRXFOVRR { - bits: bool, -} -impl EPRXFOVRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STPFR { - bits: bool, -} -impl STPFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDISR { - bits: bool, -} -impl EPDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TFR { - bits: bool, -} -impl TFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _BTBSTPW<'a> { +#[doc = "Reader of register DOEP1INTF"] +pub type R = crate::R; +#[doc = "Writer for register DOEP1INTF"] +pub type W = crate::W; +#[doc = "Register DOEP1INTF `reset()`'s with value 0"] +impl crate::ResetValue for super::DOEP1INTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `BTBSTP`"] +pub type BTBSTP_R = crate::R; +#[doc = "Write proxy for field `BTBSTP`"] +pub struct BTBSTP_W<'a> { w: &'a mut W, } -impl<'a> _BTBSTPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BTBSTP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _EPRXFOVRW<'a> { +#[doc = "Reader of field `EPRXFOVR`"] +pub type EPRXFOVR_R = crate::R; +#[doc = "Write proxy for field `EPRXFOVR`"] +pub struct EPRXFOVR_W<'a> { w: &'a mut W, } -impl<'a> _EPRXFOVRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPRXFOVR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _STPFW<'a> { +#[doc = "Reader of field `STPF`"] +pub type STPF_R = crate::R; +#[doc = "Write proxy for field `STPF`"] +pub struct STPF_W<'a> { w: &'a mut W, } -impl<'a> _STPFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STPF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _EPDISW<'a> { +#[doc = "Reader of field `EPDIS`"] +pub type EPDIS_R = crate::R; +#[doc = "Write proxy for field `EPDIS`"] +pub struct EPDIS_W<'a> { w: &'a mut W, } -impl<'a> _EPDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _TFW<'a> { +#[doc = "Reader of field `TF`"] +pub type TF_R = crate::R; +#[doc = "Write proxy for field `TF`"] +pub struct TF_W<'a> { w: &'a mut W, } -impl<'a> _TFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 6 - Back-to-back SETUP packets"] - #[inline] - pub fn btbstp(&self) -> BTBSTPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BTBSTPR { bits } + #[inline(always)] + pub fn btbstp(&self) -> BTBSTP_R { + BTBSTP_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 4 - Endpoint Rx FIFO overrun"] - #[inline] - pub fn eprxfovr(&self) -> EPRXFOVRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPRXFOVRR { bits } + #[inline(always)] + pub fn eprxfovr(&self) -> EPRXFOVR_R { + EPRXFOVR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Setup phase finished"] - #[inline] - pub fn stpf(&self) -> STPFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STPFR { bits } + #[inline(always)] + pub fn stpf(&self) -> STPF_R { + STPF_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 1 - Endpoint disabled"] - #[inline] - pub fn epdis(&self) -> EPDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDISR { bits } + #[inline(always)] + pub fn epdis(&self) -> EPDIS_R { + EPDIS_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&self) -> TFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFR { bits } + #[inline(always)] + pub fn tf(&self) -> TF_R { + TF_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 6 - Back-to-back SETUP packets"] - #[inline] - pub fn btbstp(&mut self) -> _BTBSTPW { - _BTBSTPW { w: self } + #[inline(always)] + pub fn btbstp(&mut self) -> BTBSTP_W { + BTBSTP_W { w: self } } #[doc = "Bit 4 - Endpoint Rx FIFO overrun"] - #[inline] - pub fn eprxfovr(&mut self) -> _EPRXFOVRW { - _EPRXFOVRW { w: self } + #[inline(always)] + pub fn eprxfovr(&mut self) -> EPRXFOVR_W { + EPRXFOVR_W { w: self } } #[doc = "Bit 3 - Setup phase finished"] - #[inline] - pub fn stpf(&mut self) -> _STPFW { - _STPFW { w: self } + #[inline(always)] + pub fn stpf(&mut self) -> STPF_W { + STPF_W { w: self } } #[doc = "Bit 1 - Endpoint disabled"] - #[inline] - pub fn epdis(&mut self) -> _EPDISW { - _EPDISW { w: self } + #[inline(always)] + pub fn epdis(&mut self) -> EPDIS_W { + EPDIS_W { w: self } } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&mut self) -> _TFW { - _TFW { w: self } + #[inline(always)] + pub fn tf(&mut self) -> TF_W { + TF_W { w: self } } } diff --git a/src/usbfs_device/doep1len.rs b/src/usbfs_device/doep1len.rs index 577a5ae52b61badfb8e18739c3c917c745b0baf1..c14415f67b4dbf6972b6da5cd8fcc3654920a73c 100644 --- a/src/usbfs_device/doep1len.rs +++ b/src/usbfs_device/doep1len.rs @@ -1,187 +1,88 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DOEP1LEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct STPCNT_RXDPIDR { - bits: u8, -} -impl STPCNT_RXDPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PCNTR { - bits: u16, -} -impl PCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct TLENR { - bits: u32, -} -impl TLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _STPCNT_RXDPIDW<'a> { +#[doc = "Reader of register DOEP1LEN"] +pub type R = crate::R; +#[doc = "Writer for register DOEP1LEN"] +pub type W = crate::W; +#[doc = "Register DOEP1LEN `reset()`'s with value 0"] +impl crate::ResetValue for super::DOEP1LEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `STPCNT_RXDPID`"] +pub type STPCNT_RXDPID_R = crate::R; +#[doc = "Write proxy for field `STPCNT_RXDPID`"] +pub struct STPCNT_RXDPID_W<'a> { w: &'a mut W, } -impl<'a> _STPCNT_RXDPIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> STPCNT_RXDPID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 29)) | (((value as u32) & 0x03) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _PCNTW<'a> { +#[doc = "Reader of field `PCNT`"] +pub type PCNT_R = crate::R; +#[doc = "Write proxy for field `PCNT`"] +pub struct PCNT_W<'a> { w: &'a mut W, } -impl<'a> _PCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03ff << 19)) | (((value as u32) & 0x03ff) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _TLENW<'a> { +#[doc = "Reader of field `TLEN`"] +pub type TLEN_R = crate::R; +#[doc = "Write proxy for field `TLEN`"] +pub struct TLEN_W<'a> { w: &'a mut W, } -impl<'a> _TLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0007_ffff) | ((value as u32) & 0x0007_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 29:30 - SETUP packet count/Received data PID"] - #[inline] - pub fn stpcnt_rxdpid(&self) -> STPCNT_RXDPIDR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - STPCNT_RXDPIDR { bits } + #[inline(always)] + pub fn stpcnt_rxdpid(&self) -> STPCNT_RXDPID_R { + STPCNT_RXDPID_R::new(((self.bits >> 29) & 0x03) as u8) } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&self) -> PCNTR { - let bits = { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - PCNTR { bits } + #[inline(always)] + pub fn pcnt(&self) -> PCNT_R { + PCNT_R::new(((self.bits >> 19) & 0x03ff) as u16) } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&self) -> TLENR { - let bits = { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - TLENR { bits } + #[inline(always)] + pub fn tlen(&self) -> TLEN_R { + TLEN_R::new((self.bits & 0x0007_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 29:30 - SETUP packet count/Received data PID"] - #[inline] - pub fn stpcnt_rxdpid(&mut self) -> _STPCNT_RXDPIDW { - _STPCNT_RXDPIDW { w: self } + #[inline(always)] + pub fn stpcnt_rxdpid(&mut self) -> STPCNT_RXDPID_W { + STPCNT_RXDPID_W { w: self } } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&mut self) -> _PCNTW { - _PCNTW { w: self } + #[inline(always)] + pub fn pcnt(&mut self) -> PCNT_W { + PCNT_W { w: self } } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&mut self) -> _TLENW { - _TLENW { w: self } + #[inline(always)] + pub fn tlen(&mut self) -> TLEN_W { + TLEN_W { w: self } } } diff --git a/src/usbfs_device/doep2ctl.rs b/src/usbfs_device/doep2ctl.rs index 5f79264343dadc4f878289fb85728fd2ef05928f..dd8127e0f098547503c160d3a9d18e6a72be8284 100644 --- a/src/usbfs_device/doep2ctl.rs +++ b/src/usbfs_device/doep2ctl.rs @@ -1,615 +1,356 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DOEP2CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct EPENR { - bits: bool, -} -impl EPENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDR { - bits: bool, -} -impl EPDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLR { - bits: bool, -} -impl STALLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SNOOPR { - bits: bool, -} -impl SNOOPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTYPER { - bits: u8, -} -impl EPTYPER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct NAKSR { - bits: bool, -} -impl NAKSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EOFRM_DPIDR { - bits: bool, -} -impl EOFRM_DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPACTR { - bits: bool, -} -impl EPACTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MPLR { - bits: u16, -} -impl MPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _EPENW<'a> { +#[doc = "Reader of register DOEP2CTL"] +pub type R = crate::R; +#[doc = "Writer for register DOEP2CTL"] +pub type W = crate::W; +#[doc = "Register DOEP2CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::DOEP2CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `EPEN`"] +pub type EPEN_R = crate::R; +#[doc = "Write proxy for field `EPEN`"] +pub struct EPEN_W<'a> { w: &'a mut W, } -impl<'a> _EPENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } -#[doc = r" Proxy"] -pub struct _EPDW<'a> { +#[doc = "Reader of field `EPD`"] +pub type EPD_R = crate::R; +#[doc = "Write proxy for field `EPD`"] +pub struct EPD_W<'a> { w: &'a mut W, } -impl<'a> _EPDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _SD1PID_SODDFRMW<'a> { +#[doc = "Write proxy for field `SD1PID_SODDFRM`"] +pub struct SD1PID_SODDFRM_W<'a> { w: &'a mut W, } -impl<'a> _SD1PID_SODDFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SD1PID_SODDFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _SD0PID_SEVENFRMW<'a> { +#[doc = "Write proxy for field `SD0PID_SEVENFRM`"] +pub struct SD0PID_SEVENFRM_W<'a> { w: &'a mut W, } -impl<'a> _SD0PID_SEVENFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SD0PID_SEVENFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _SNAKW<'a> { +#[doc = "Write proxy for field `SNAK`"] +pub struct SNAK_W<'a> { w: &'a mut W, } -impl<'a> _SNAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SNAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _CNAKW<'a> { +#[doc = "Write proxy for field `CNAK`"] +pub struct CNAK_W<'a> { w: &'a mut W, } -impl<'a> _CNAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CNAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _STALLW<'a> { +#[doc = "Reader of field `STALL`"] +pub type STALL_R = crate::R; +#[doc = "Write proxy for field `STALL`"] +pub struct STALL_W<'a> { w: &'a mut W, } -impl<'a> _STALLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _SNOOPW<'a> { +#[doc = "Reader of field `SNOOP`"] +pub type SNOOP_R = crate::R; +#[doc = "Write proxy for field `SNOOP`"] +pub struct SNOOP_W<'a> { w: &'a mut W, } -impl<'a> _SNOOPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SNOOP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _EPTYPEW<'a> { +#[doc = "Reader of field `EPTYPE`"] +pub type EPTYPE_R = crate::R; +#[doc = "Write proxy for field `EPTYPE`"] +pub struct EPTYPE_W<'a> { w: &'a mut W, } -impl<'a> _EPTYPEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPTYPE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _EPACTW<'a> { +#[doc = "Reader of field `NAKS`"] +pub type NAKS_R = crate::R; +#[doc = "Reader of field `EOFRM_DPID`"] +pub type EOFRM_DPID_R = crate::R; +#[doc = "Reader of field `EPACT`"] +pub type EPACT_R = crate::R; +#[doc = "Write proxy for field `EPACT`"] +pub struct EPACT_W<'a> { w: &'a mut W, } -impl<'a> _EPACTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPACT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _MPLW<'a> { +#[doc = "Reader of field `MPL`"] +pub type MPL_R = crate::R; +#[doc = "Write proxy for field `MPL`"] +pub struct MPL_W<'a> { w: &'a mut W, } -impl<'a> _MPLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MPL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07ff) | ((value as u32) & 0x07ff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 31 - Endpoint enable"] - #[inline] - pub fn epen(&self) -> EPENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPENR { bits } + #[inline(always)] + pub fn epen(&self) -> EPEN_R { + EPEN_R::new(((self.bits >> 31) & 0x01) != 0) } #[doc = "Bit 30 - Endpoint disable"] - #[inline] - pub fn epd(&self) -> EPDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDR { bits } + #[inline(always)] + pub fn epd(&self) -> EPD_R { + EPD_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 21 - STALL handshake"] - #[inline] - pub fn stall(&self) -> STALLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLR { bits } + #[inline(always)] + pub fn stall(&self) -> STALL_R { + STALL_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 20 - Snoop mode"] - #[inline] - pub fn snoop(&self) -> SNOOPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SNOOPR { bits } + #[inline(always)] + pub fn snoop(&self) -> SNOOP_R { + SNOOP_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&self) -> EPTYPER { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPTYPER { bits } + #[inline(always)] + pub fn eptype(&self) -> EPTYPE_R { + EPTYPE_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bit 17 - NAK status"] - #[inline] - pub fn naks(&self) -> NAKSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKSR { bits } + #[inline(always)] + pub fn naks(&self) -> NAKS_R { + NAKS_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 16 - EOFRM/DPID"] - #[inline] - pub fn eofrm_dpid(&self) -> EOFRM_DPIDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOFRM_DPIDR { bits } + #[inline(always)] + pub fn eofrm_dpid(&self) -> EOFRM_DPID_R { + EOFRM_DPID_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 15 - Endpoint active"] - #[inline] - pub fn epact(&self) -> EPACTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPACTR { bits } + #[inline(always)] + pub fn epact(&self) -> EPACT_R { + EPACT_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bits 0:10 - maximum packet length"] - #[inline] - pub fn mpl(&self) -> MPLR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - MPLR { bits } + #[inline(always)] + pub fn mpl(&self) -> MPL_R { + MPL_R::new((self.bits & 0x07ff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 31 - Endpoint enable"] - #[inline] - pub fn epen(&mut self) -> _EPENW { - _EPENW { w: self } + #[inline(always)] + pub fn epen(&mut self) -> EPEN_W { + EPEN_W { w: self } } #[doc = "Bit 30 - Endpoint disable"] - #[inline] - pub fn epd(&mut self) -> _EPDW { - _EPDW { w: self } + #[inline(always)] + pub fn epd(&mut self) -> EPD_W { + EPD_W { w: self } } #[doc = "Bit 29 - SD1PID/SODDFRM"] - #[inline] - pub fn sd1pid_soddfrm(&mut self) -> _SD1PID_SODDFRMW { - _SD1PID_SODDFRMW { w: self } + #[inline(always)] + pub fn sd1pid_soddfrm(&mut self) -> SD1PID_SODDFRM_W { + SD1PID_SODDFRM_W { w: self } } #[doc = "Bit 28 - SD0PID/SEVENFRM"] - #[inline] - pub fn sd0pid_sevenfrm(&mut self) -> _SD0PID_SEVENFRMW { - _SD0PID_SEVENFRMW { w: self } + #[inline(always)] + pub fn sd0pid_sevenfrm(&mut self) -> SD0PID_SEVENFRM_W { + SD0PID_SEVENFRM_W { w: self } } #[doc = "Bit 27 - Set NAK"] - #[inline] - pub fn snak(&mut self) -> _SNAKW { - _SNAKW { w: self } + #[inline(always)] + pub fn snak(&mut self) -> SNAK_W { + SNAK_W { w: self } } #[doc = "Bit 26 - Clear NAK"] - #[inline] - pub fn cnak(&mut self) -> _CNAKW { - _CNAKW { w: self } + #[inline(always)] + pub fn cnak(&mut self) -> CNAK_W { + CNAK_W { w: self } } #[doc = "Bit 21 - STALL handshake"] - #[inline] - pub fn stall(&mut self) -> _STALLW { - _STALLW { w: self } + #[inline(always)] + pub fn stall(&mut self) -> STALL_W { + STALL_W { w: self } } #[doc = "Bit 20 - Snoop mode"] - #[inline] - pub fn snoop(&mut self) -> _SNOOPW { - _SNOOPW { w: self } + #[inline(always)] + pub fn snoop(&mut self) -> SNOOP_W { + SNOOP_W { w: self } } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&mut self) -> _EPTYPEW { - _EPTYPEW { w: self } + #[inline(always)] + pub fn eptype(&mut self) -> EPTYPE_W { + EPTYPE_W { w: self } } #[doc = "Bit 15 - Endpoint active"] - #[inline] - pub fn epact(&mut self) -> _EPACTW { - _EPACTW { w: self } + #[inline(always)] + pub fn epact(&mut self) -> EPACT_W { + EPACT_W { w: self } } #[doc = "Bits 0:10 - maximum packet length"] - #[inline] - pub fn mpl(&mut self) -> _MPLW { - _MPLW { w: self } + #[inline(always)] + pub fn mpl(&mut self) -> MPL_W { + MPL_W { w: self } } } diff --git a/src/usbfs_device/doep2intf.rs b/src/usbfs_device/doep2intf.rs index ca73fec4ded38b046f142e2dc9d42df248ab39eb..0140f65c5a24b2bcb089fc83bf11937b09ec203d 100644 --- a/src/usbfs_device/doep2intf.rs +++ b/src/usbfs_device/doep2intf.rs @@ -1,359 +1,186 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DOEP2INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct BTBSTPR { - bits: bool, -} -impl BTBSTPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPRXFOVRR { - bits: bool, -} -impl EPRXFOVRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STPFR { - bits: bool, -} -impl STPFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDISR { - bits: bool, -} -impl EPDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TFR { - bits: bool, -} -impl TFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _BTBSTPW<'a> { +#[doc = "Reader of register DOEP2INTF"] +pub type R = crate::R; +#[doc = "Writer for register DOEP2INTF"] +pub type W = crate::W; +#[doc = "Register DOEP2INTF `reset()`'s with value 0"] +impl crate::ResetValue for super::DOEP2INTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `BTBSTP`"] +pub type BTBSTP_R = crate::R; +#[doc = "Write proxy for field `BTBSTP`"] +pub struct BTBSTP_W<'a> { w: &'a mut W, } -impl<'a> _BTBSTPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BTBSTP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _EPRXFOVRW<'a> { +#[doc = "Reader of field `EPRXFOVR`"] +pub type EPRXFOVR_R = crate::R; +#[doc = "Write proxy for field `EPRXFOVR`"] +pub struct EPRXFOVR_W<'a> { w: &'a mut W, } -impl<'a> _EPRXFOVRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPRXFOVR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _STPFW<'a> { +#[doc = "Reader of field `STPF`"] +pub type STPF_R = crate::R; +#[doc = "Write proxy for field `STPF`"] +pub struct STPF_W<'a> { w: &'a mut W, } -impl<'a> _STPFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STPF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _EPDISW<'a> { +#[doc = "Reader of field `EPDIS`"] +pub type EPDIS_R = crate::R; +#[doc = "Write proxy for field `EPDIS`"] +pub struct EPDIS_W<'a> { w: &'a mut W, } -impl<'a> _EPDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _TFW<'a> { +#[doc = "Reader of field `TF`"] +pub type TF_R = crate::R; +#[doc = "Write proxy for field `TF`"] +pub struct TF_W<'a> { w: &'a mut W, } -impl<'a> _TFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 6 - Back-to-back SETUP packets"] - #[inline] - pub fn btbstp(&self) -> BTBSTPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BTBSTPR { bits } + #[inline(always)] + pub fn btbstp(&self) -> BTBSTP_R { + BTBSTP_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 4 - Endpoint Rx FIFO overrun"] - #[inline] - pub fn eprxfovr(&self) -> EPRXFOVRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPRXFOVRR { bits } + #[inline(always)] + pub fn eprxfovr(&self) -> EPRXFOVR_R { + EPRXFOVR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Setup phase finished"] - #[inline] - pub fn stpf(&self) -> STPFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STPFR { bits } + #[inline(always)] + pub fn stpf(&self) -> STPF_R { + STPF_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 1 - Endpoint disabled"] - #[inline] - pub fn epdis(&self) -> EPDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDISR { bits } + #[inline(always)] + pub fn epdis(&self) -> EPDIS_R { + EPDIS_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&self) -> TFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFR { bits } + #[inline(always)] + pub fn tf(&self) -> TF_R { + TF_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 6 - Back-to-back SETUP packets"] - #[inline] - pub fn btbstp(&mut self) -> _BTBSTPW { - _BTBSTPW { w: self } + #[inline(always)] + pub fn btbstp(&mut self) -> BTBSTP_W { + BTBSTP_W { w: self } } #[doc = "Bit 4 - Endpoint Rx FIFO overrun"] - #[inline] - pub fn eprxfovr(&mut self) -> _EPRXFOVRW { - _EPRXFOVRW { w: self } + #[inline(always)] + pub fn eprxfovr(&mut self) -> EPRXFOVR_W { + EPRXFOVR_W { w: self } } #[doc = "Bit 3 - Setup phase finished"] - #[inline] - pub fn stpf(&mut self) -> _STPFW { - _STPFW { w: self } + #[inline(always)] + pub fn stpf(&mut self) -> STPF_W { + STPF_W { w: self } } #[doc = "Bit 1 - Endpoint disabled"] - #[inline] - pub fn epdis(&mut self) -> _EPDISW { - _EPDISW { w: self } + #[inline(always)] + pub fn epdis(&mut self) -> EPDIS_W { + EPDIS_W { w: self } } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&mut self) -> _TFW { - _TFW { w: self } + #[inline(always)] + pub fn tf(&mut self) -> TF_W { + TF_W { w: self } } } diff --git a/src/usbfs_device/doep2len.rs b/src/usbfs_device/doep2len.rs index 7c84e962fa50ad267c0fb8a81d854fc80d18a755..880ed866dd881b37e65601937117d225751a882b 100644 --- a/src/usbfs_device/doep2len.rs +++ b/src/usbfs_device/doep2len.rs @@ -1,187 +1,88 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DOEP2LEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct STPCNT_RXDPIDR { - bits: u8, -} -impl STPCNT_RXDPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PCNTR { - bits: u16, -} -impl PCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct TLENR { - bits: u32, -} -impl TLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _STPCNT_RXDPIDW<'a> { +#[doc = "Reader of register DOEP2LEN"] +pub type R = crate::R; +#[doc = "Writer for register DOEP2LEN"] +pub type W = crate::W; +#[doc = "Register DOEP2LEN `reset()`'s with value 0"] +impl crate::ResetValue for super::DOEP2LEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `STPCNT_RXDPID`"] +pub type STPCNT_RXDPID_R = crate::R; +#[doc = "Write proxy for field `STPCNT_RXDPID`"] +pub struct STPCNT_RXDPID_W<'a> { w: &'a mut W, } -impl<'a> _STPCNT_RXDPIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> STPCNT_RXDPID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 29)) | (((value as u32) & 0x03) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _PCNTW<'a> { +#[doc = "Reader of field `PCNT`"] +pub type PCNT_R = crate::R; +#[doc = "Write proxy for field `PCNT`"] +pub struct PCNT_W<'a> { w: &'a mut W, } -impl<'a> _PCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03ff << 19)) | (((value as u32) & 0x03ff) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _TLENW<'a> { +#[doc = "Reader of field `TLEN`"] +pub type TLEN_R = crate::R; +#[doc = "Write proxy for field `TLEN`"] +pub struct TLEN_W<'a> { w: &'a mut W, } -impl<'a> _TLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0007_ffff) | ((value as u32) & 0x0007_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 29:30 - SETUP packet count/Received data PID"] - #[inline] - pub fn stpcnt_rxdpid(&self) -> STPCNT_RXDPIDR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - STPCNT_RXDPIDR { bits } + #[inline(always)] + pub fn stpcnt_rxdpid(&self) -> STPCNT_RXDPID_R { + STPCNT_RXDPID_R::new(((self.bits >> 29) & 0x03) as u8) } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&self) -> PCNTR { - let bits = { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - PCNTR { bits } + #[inline(always)] + pub fn pcnt(&self) -> PCNT_R { + PCNT_R::new(((self.bits >> 19) & 0x03ff) as u16) } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&self) -> TLENR { - let bits = { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - TLENR { bits } + #[inline(always)] + pub fn tlen(&self) -> TLEN_R { + TLEN_R::new((self.bits & 0x0007_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 29:30 - SETUP packet count/Received data PID"] - #[inline] - pub fn stpcnt_rxdpid(&mut self) -> _STPCNT_RXDPIDW { - _STPCNT_RXDPIDW { w: self } + #[inline(always)] + pub fn stpcnt_rxdpid(&mut self) -> STPCNT_RXDPID_W { + STPCNT_RXDPID_W { w: self } } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&mut self) -> _PCNTW { - _PCNTW { w: self } + #[inline(always)] + pub fn pcnt(&mut self) -> PCNT_W { + PCNT_W { w: self } } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&mut self) -> _TLENW { - _TLENW { w: self } + #[inline(always)] + pub fn tlen(&mut self) -> TLEN_W { + TLEN_W { w: self } } } diff --git a/src/usbfs_device/doep3ctl.rs b/src/usbfs_device/doep3ctl.rs index af798c265232fc44dc2ed2458a0a3e418a6d4a54..a25552a7b7a27f3bb4fed72ec92dc8ea88fcb9c5 100644 --- a/src/usbfs_device/doep3ctl.rs +++ b/src/usbfs_device/doep3ctl.rs @@ -1,615 +1,356 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DOEP3CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct EPENR { - bits: bool, -} -impl EPENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDR { - bits: bool, -} -impl EPDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLR { - bits: bool, -} -impl STALLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SNOOPR { - bits: bool, -} -impl SNOOPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTYPER { - bits: u8, -} -impl EPTYPER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct NAKSR { - bits: bool, -} -impl NAKSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EOFRM_DPIDR { - bits: bool, -} -impl EOFRM_DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPACTR { - bits: bool, -} -impl EPACTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MPLR { - bits: u16, -} -impl MPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _EPENW<'a> { +#[doc = "Reader of register DOEP3CTL"] +pub type R = crate::R; +#[doc = "Writer for register DOEP3CTL"] +pub type W = crate::W; +#[doc = "Register DOEP3CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::DOEP3CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `EPEN`"] +pub type EPEN_R = crate::R; +#[doc = "Write proxy for field `EPEN`"] +pub struct EPEN_W<'a> { w: &'a mut W, } -impl<'a> _EPENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } -#[doc = r" Proxy"] -pub struct _EPDW<'a> { +#[doc = "Reader of field `EPD`"] +pub type EPD_R = crate::R; +#[doc = "Write proxy for field `EPD`"] +pub struct EPD_W<'a> { w: &'a mut W, } -impl<'a> _EPDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _SD1PID_SODDFRMW<'a> { +#[doc = "Write proxy for field `SD1PID_SODDFRM`"] +pub struct SD1PID_SODDFRM_W<'a> { w: &'a mut W, } -impl<'a> _SD1PID_SODDFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SD1PID_SODDFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _SD0PID_SEVENFRMW<'a> { +#[doc = "Write proxy for field `SD0PID_SEVENFRM`"] +pub struct SD0PID_SEVENFRM_W<'a> { w: &'a mut W, } -impl<'a> _SD0PID_SEVENFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SD0PID_SEVENFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _SNAKW<'a> { +#[doc = "Write proxy for field `SNAK`"] +pub struct SNAK_W<'a> { w: &'a mut W, } -impl<'a> _SNAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SNAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 27; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 27)) | (((value as u32) & 0x01) << 27); self.w } } -#[doc = r" Proxy"] -pub struct _CNAKW<'a> { +#[doc = "Write proxy for field `CNAK`"] +pub struct CNAK_W<'a> { w: &'a mut W, } -impl<'a> _CNAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CNAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _STALLW<'a> { +#[doc = "Reader of field `STALL`"] +pub type STALL_R = crate::R; +#[doc = "Write proxy for field `STALL`"] +pub struct STALL_W<'a> { w: &'a mut W, } -impl<'a> _STALLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _SNOOPW<'a> { +#[doc = "Reader of field `SNOOP`"] +pub type SNOOP_R = crate::R; +#[doc = "Write proxy for field `SNOOP`"] +pub struct SNOOP_W<'a> { w: &'a mut W, } -impl<'a> _SNOOPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SNOOP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _EPTYPEW<'a> { +#[doc = "Reader of field `EPTYPE`"] +pub type EPTYPE_R = crate::R; +#[doc = "Write proxy for field `EPTYPE`"] +pub struct EPTYPE_W<'a> { w: &'a mut W, } -impl<'a> _EPTYPEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPTYPE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _EPACTW<'a> { +#[doc = "Reader of field `NAKS`"] +pub type NAKS_R = crate::R; +#[doc = "Reader of field `EOFRM_DPID`"] +pub type EOFRM_DPID_R = crate::R; +#[doc = "Reader of field `EPACT`"] +pub type EPACT_R = crate::R; +#[doc = "Write proxy for field `EPACT`"] +pub struct EPACT_W<'a> { w: &'a mut W, } -impl<'a> _EPACTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPACT_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _MPLW<'a> { +#[doc = "Reader of field `MPL`"] +pub type MPL_R = crate::R; +#[doc = "Write proxy for field `MPL`"] +pub struct MPL_W<'a> { w: &'a mut W, } -impl<'a> _MPLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MPL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07ff) | ((value as u32) & 0x07ff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 31 - Endpoint enable"] - #[inline] - pub fn epen(&self) -> EPENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPENR { bits } + #[inline(always)] + pub fn epen(&self) -> EPEN_R { + EPEN_R::new(((self.bits >> 31) & 0x01) != 0) } #[doc = "Bit 30 - Endpoint disable"] - #[inline] - pub fn epd(&self) -> EPDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDR { bits } + #[inline(always)] + pub fn epd(&self) -> EPD_R { + EPD_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 21 - STALL handshake"] - #[inline] - pub fn stall(&self) -> STALLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLR { bits } + #[inline(always)] + pub fn stall(&self) -> STALL_R { + STALL_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 20 - Snoop mode"] - #[inline] - pub fn snoop(&self) -> SNOOPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SNOOPR { bits } + #[inline(always)] + pub fn snoop(&self) -> SNOOP_R { + SNOOP_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&self) -> EPTYPER { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPTYPER { bits } + #[inline(always)] + pub fn eptype(&self) -> EPTYPE_R { + EPTYPE_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bit 17 - NAK status"] - #[inline] - pub fn naks(&self) -> NAKSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKSR { bits } + #[inline(always)] + pub fn naks(&self) -> NAKS_R { + NAKS_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 16 - EOFRM/DPID"] - #[inline] - pub fn eofrm_dpid(&self) -> EOFRM_DPIDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOFRM_DPIDR { bits } + #[inline(always)] + pub fn eofrm_dpid(&self) -> EOFRM_DPID_R { + EOFRM_DPID_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 15 - Endpoint active"] - #[inline] - pub fn epact(&self) -> EPACTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPACTR { bits } + #[inline(always)] + pub fn epact(&self) -> EPACT_R { + EPACT_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bits 0:10 - maximum packet length"] - #[inline] - pub fn mpl(&self) -> MPLR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - MPLR { bits } + #[inline(always)] + pub fn mpl(&self) -> MPL_R { + MPL_R::new((self.bits & 0x07ff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 31 - Endpoint enable"] - #[inline] - pub fn epen(&mut self) -> _EPENW { - _EPENW { w: self } + #[inline(always)] + pub fn epen(&mut self) -> EPEN_W { + EPEN_W { w: self } } #[doc = "Bit 30 - Endpoint disable"] - #[inline] - pub fn epd(&mut self) -> _EPDW { - _EPDW { w: self } + #[inline(always)] + pub fn epd(&mut self) -> EPD_W { + EPD_W { w: self } } #[doc = "Bit 29 - SD1PID/SODDFRM"] - #[inline] - pub fn sd1pid_soddfrm(&mut self) -> _SD1PID_SODDFRMW { - _SD1PID_SODDFRMW { w: self } + #[inline(always)] + pub fn sd1pid_soddfrm(&mut self) -> SD1PID_SODDFRM_W { + SD1PID_SODDFRM_W { w: self } } #[doc = "Bit 28 - SD0PID/SEVENFRM"] - #[inline] - pub fn sd0pid_sevenfrm(&mut self) -> _SD0PID_SEVENFRMW { - _SD0PID_SEVENFRMW { w: self } + #[inline(always)] + pub fn sd0pid_sevenfrm(&mut self) -> SD0PID_SEVENFRM_W { + SD0PID_SEVENFRM_W { w: self } } #[doc = "Bit 27 - Set NAK"] - #[inline] - pub fn snak(&mut self) -> _SNAKW { - _SNAKW { w: self } + #[inline(always)] + pub fn snak(&mut self) -> SNAK_W { + SNAK_W { w: self } } #[doc = "Bit 26 - Clear NAK"] - #[inline] - pub fn cnak(&mut self) -> _CNAKW { - _CNAKW { w: self } + #[inline(always)] + pub fn cnak(&mut self) -> CNAK_W { + CNAK_W { w: self } } #[doc = "Bit 21 - STALL handshake"] - #[inline] - pub fn stall(&mut self) -> _STALLW { - _STALLW { w: self } + #[inline(always)] + pub fn stall(&mut self) -> STALL_W { + STALL_W { w: self } } #[doc = "Bit 20 - Snoop mode"] - #[inline] - pub fn snoop(&mut self) -> _SNOOPW { - _SNOOPW { w: self } + #[inline(always)] + pub fn snoop(&mut self) -> SNOOP_W { + SNOOP_W { w: self } } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&mut self) -> _EPTYPEW { - _EPTYPEW { w: self } + #[inline(always)] + pub fn eptype(&mut self) -> EPTYPE_W { + EPTYPE_W { w: self } } #[doc = "Bit 15 - Endpoint active"] - #[inline] - pub fn epact(&mut self) -> _EPACTW { - _EPACTW { w: self } + #[inline(always)] + pub fn epact(&mut self) -> EPACT_W { + EPACT_W { w: self } } #[doc = "Bits 0:10 - maximum packet length"] - #[inline] - pub fn mpl(&mut self) -> _MPLW { - _MPLW { w: self } + #[inline(always)] + pub fn mpl(&mut self) -> MPL_W { + MPL_W { w: self } } } diff --git a/src/usbfs_device/doep3intf.rs b/src/usbfs_device/doep3intf.rs index 5fedf2a17588e5d99657ba6c4c4588b738c977c0..7f3de05a038f6110bdf733004db6274050ed94f9 100644 --- a/src/usbfs_device/doep3intf.rs +++ b/src/usbfs_device/doep3intf.rs @@ -1,359 +1,186 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DOEP3INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct BTBSTPR { - bits: bool, -} -impl BTBSTPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPRXFOVRR { - bits: bool, -} -impl EPRXFOVRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STPFR { - bits: bool, -} -impl STPFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDISR { - bits: bool, -} -impl EPDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TFR { - bits: bool, -} -impl TFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _BTBSTPW<'a> { +#[doc = "Reader of register DOEP3INTF"] +pub type R = crate::R; +#[doc = "Writer for register DOEP3INTF"] +pub type W = crate::W; +#[doc = "Register DOEP3INTF `reset()`'s with value 0"] +impl crate::ResetValue for super::DOEP3INTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `BTBSTP`"] +pub type BTBSTP_R = crate::R; +#[doc = "Write proxy for field `BTBSTP`"] +pub struct BTBSTP_W<'a> { w: &'a mut W, } -impl<'a> _BTBSTPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BTBSTP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _EPRXFOVRW<'a> { +#[doc = "Reader of field `EPRXFOVR`"] +pub type EPRXFOVR_R = crate::R; +#[doc = "Write proxy for field `EPRXFOVR`"] +pub struct EPRXFOVR_W<'a> { w: &'a mut W, } -impl<'a> _EPRXFOVRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPRXFOVR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _STPFW<'a> { +#[doc = "Reader of field `STPF`"] +pub type STPF_R = crate::R; +#[doc = "Write proxy for field `STPF`"] +pub struct STPF_W<'a> { w: &'a mut W, } -impl<'a> _STPFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STPF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _EPDISW<'a> { +#[doc = "Reader of field `EPDIS`"] +pub type EPDIS_R = crate::R; +#[doc = "Write proxy for field `EPDIS`"] +pub struct EPDIS_W<'a> { w: &'a mut W, } -impl<'a> _EPDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _TFW<'a> { +#[doc = "Reader of field `TF`"] +pub type TF_R = crate::R; +#[doc = "Write proxy for field `TF`"] +pub struct TF_W<'a> { w: &'a mut W, } -impl<'a> _TFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 6 - Back-to-back SETUP packets"] - #[inline] - pub fn btbstp(&self) -> BTBSTPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BTBSTPR { bits } + #[inline(always)] + pub fn btbstp(&self) -> BTBSTP_R { + BTBSTP_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 4 - Endpoint Rx FIFO overrun"] - #[inline] - pub fn eprxfovr(&self) -> EPRXFOVRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPRXFOVRR { bits } + #[inline(always)] + pub fn eprxfovr(&self) -> EPRXFOVR_R { + EPRXFOVR_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 3 - Setup phase finished"] - #[inline] - pub fn stpf(&self) -> STPFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STPFR { bits } + #[inline(always)] + pub fn stpf(&self) -> STPF_R { + STPF_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 1 - Endpoint disabled"] - #[inline] - pub fn epdis(&self) -> EPDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDISR { bits } + #[inline(always)] + pub fn epdis(&self) -> EPDIS_R { + EPDIS_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&self) -> TFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFR { bits } + #[inline(always)] + pub fn tf(&self) -> TF_R { + TF_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 6 - Back-to-back SETUP packets"] - #[inline] - pub fn btbstp(&mut self) -> _BTBSTPW { - _BTBSTPW { w: self } + #[inline(always)] + pub fn btbstp(&mut self) -> BTBSTP_W { + BTBSTP_W { w: self } } #[doc = "Bit 4 - Endpoint Rx FIFO overrun"] - #[inline] - pub fn eprxfovr(&mut self) -> _EPRXFOVRW { - _EPRXFOVRW { w: self } + #[inline(always)] + pub fn eprxfovr(&mut self) -> EPRXFOVR_W { + EPRXFOVR_W { w: self } } #[doc = "Bit 3 - Setup phase finished"] - #[inline] - pub fn stpf(&mut self) -> _STPFW { - _STPFW { w: self } + #[inline(always)] + pub fn stpf(&mut self) -> STPF_W { + STPF_W { w: self } } #[doc = "Bit 1 - Endpoint disabled"] - #[inline] - pub fn epdis(&mut self) -> _EPDISW { - _EPDISW { w: self } + #[inline(always)] + pub fn epdis(&mut self) -> EPDIS_W { + EPDIS_W { w: self } } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&mut self) -> _TFW { - _TFW { w: self } + #[inline(always)] + pub fn tf(&mut self) -> TF_W { + TF_W { w: self } } } diff --git a/src/usbfs_device/doep3len.rs b/src/usbfs_device/doep3len.rs index e3891e3d90a0c40001ad90d69c0624e6f1194b8a..ccc71950479d06230b543aa81b4e2d3671d1413a 100644 --- a/src/usbfs_device/doep3len.rs +++ b/src/usbfs_device/doep3len.rs @@ -1,187 +1,88 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DOEP3LEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct STPCNT_RXDPIDR { - bits: u8, -} -impl STPCNT_RXDPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PCNTR { - bits: u16, -} -impl PCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct TLENR { - bits: u32, -} -impl TLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _STPCNT_RXDPIDW<'a> { +#[doc = "Reader of register DOEP3LEN"] +pub type R = crate::R; +#[doc = "Writer for register DOEP3LEN"] +pub type W = crate::W; +#[doc = "Register DOEP3LEN `reset()`'s with value 0"] +impl crate::ResetValue for super::DOEP3LEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `STPCNT_RXDPID`"] +pub type STPCNT_RXDPID_R = crate::R; +#[doc = "Write proxy for field `STPCNT_RXDPID`"] +pub struct STPCNT_RXDPID_W<'a> { w: &'a mut W, } -impl<'a> _STPCNT_RXDPIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> STPCNT_RXDPID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 29)) | (((value as u32) & 0x03) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _PCNTW<'a> { +#[doc = "Reader of field `PCNT`"] +pub type PCNT_R = crate::R; +#[doc = "Write proxy for field `PCNT`"] +pub struct PCNT_W<'a> { w: &'a mut W, } -impl<'a> _PCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03ff << 19)) | (((value as u32) & 0x03ff) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _TLENW<'a> { +#[doc = "Reader of field `TLEN`"] +pub type TLEN_R = crate::R; +#[doc = "Write proxy for field `TLEN`"] +pub struct TLEN_W<'a> { w: &'a mut W, } -impl<'a> _TLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0007_ffff) | ((value as u32) & 0x0007_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 29:30 - SETUP packet count/Received data PID"] - #[inline] - pub fn stpcnt_rxdpid(&self) -> STPCNT_RXDPIDR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - STPCNT_RXDPIDR { bits } + #[inline(always)] + pub fn stpcnt_rxdpid(&self) -> STPCNT_RXDPID_R { + STPCNT_RXDPID_R::new(((self.bits >> 29) & 0x03) as u8) } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&self) -> PCNTR { - let bits = { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - PCNTR { bits } + #[inline(always)] + pub fn pcnt(&self) -> PCNT_R { + PCNT_R::new(((self.bits >> 19) & 0x03ff) as u16) } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&self) -> TLENR { - let bits = { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - TLENR { bits } + #[inline(always)] + pub fn tlen(&self) -> TLEN_R { + TLEN_R::new((self.bits & 0x0007_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 29:30 - SETUP packet count/Received data PID"] - #[inline] - pub fn stpcnt_rxdpid(&mut self) -> _STPCNT_RXDPIDW { - _STPCNT_RXDPIDW { w: self } + #[inline(always)] + pub fn stpcnt_rxdpid(&mut self) -> STPCNT_RXDPID_W { + STPCNT_RXDPID_W { w: self } } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&mut self) -> _PCNTW { - _PCNTW { w: self } + #[inline(always)] + pub fn pcnt(&mut self) -> PCNT_W { + PCNT_W { w: self } } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&mut self) -> _TLENW { - _TLENW { w: self } + #[inline(always)] + pub fn tlen(&mut self) -> TLEN_W { + TLEN_W { w: self } } } diff --git a/src/usbfs_device/doepinten.rs b/src/usbfs_device/doepinten.rs index 38d940111d6fd6fa12b9ad4a89ee9e221503685b..07b0bda7655d50b1f9bf1e1e76e7628f4f72961e 100644 --- a/src/usbfs_device/doepinten.rs +++ b/src/usbfs_device/doepinten.rs @@ -1,359 +1,186 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DOEPINTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFENR { - bits: bool, -} -impl TFENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPDISENR { - bits: bool, -} -impl EPDISENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STPFENR { - bits: bool, -} -impl STPFENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPRXFOVRENR { - bits: bool, -} -impl EPRXFOVRENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BTBSTPENR { - bits: bool, -} -impl BTBSTPENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFENW<'a> { +#[doc = "Reader of register DOEPINTEN"] +pub type R = crate::R; +#[doc = "Writer for register DOEPINTEN"] +pub type W = crate::W; +#[doc = "Register DOEPINTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::DOEPINTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TFEN`"] +pub type TFEN_R = crate::R; +#[doc = "Write proxy for field `TFEN`"] +pub struct TFEN_W<'a> { w: &'a mut W, } -impl<'a> _TFENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TFEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _EPDISENW<'a> { +#[doc = "Reader of field `EPDISEN`"] +pub type EPDISEN_R = crate::R; +#[doc = "Write proxy for field `EPDISEN`"] +pub struct EPDISEN_W<'a> { w: &'a mut W, } -impl<'a> _EPDISENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDISEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STPFENW<'a> { +#[doc = "Reader of field `STPFEN`"] +pub type STPFEN_R = crate::R; +#[doc = "Write proxy for field `STPFEN`"] +pub struct STPFEN_W<'a> { w: &'a mut W, } -impl<'a> _STPFENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STPFEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _EPRXFOVRENW<'a> { +#[doc = "Reader of field `EPRXFOVREN`"] +pub type EPRXFOVREN_R = crate::R; +#[doc = "Write proxy for field `EPRXFOVREN`"] +pub struct EPRXFOVREN_W<'a> { w: &'a mut W, } -impl<'a> _EPRXFOVRENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPRXFOVREN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _BTBSTPENW<'a> { +#[doc = "Reader of field `BTBSTPEN`"] +pub type BTBSTPEN_R = crate::R; +#[doc = "Write proxy for field `BTBSTPEN`"] +pub struct BTBSTPEN_W<'a> { w: &'a mut W, } -impl<'a> _BTBSTPENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BTBSTPEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer finished interrupt enable"] - #[inline] - pub fn tfen(&self) -> TFENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFENR { bits } + #[inline(always)] + pub fn tfen(&self) -> TFEN_R { + TFEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Endpoint disabled interrupt enable"] - #[inline] - pub fn epdisen(&self) -> EPDISENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDISENR { bits } + #[inline(always)] + pub fn epdisen(&self) -> EPDISEN_R { + EPDISEN_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - SETUP phase finished interrupt enable"] - #[inline] - pub fn stpfen(&self) -> STPFENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STPFENR { bits } + #[inline(always)] + pub fn stpfen(&self) -> STPFEN_R { + STPFEN_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Endpoint Rx FIFO overrun interrupt enable"] - #[inline] - pub fn eprxfovren(&self) -> EPRXFOVRENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPRXFOVRENR { bits } + #[inline(always)] + pub fn eprxfovren(&self) -> EPRXFOVREN_R { + EPRXFOVREN_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 6 - Back-to-back SETUP packets interrupt enable"] - #[inline] - pub fn btbstpen(&self) -> BTBSTPENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BTBSTPENR { bits } + #[inline(always)] + pub fn btbstpen(&self) -> BTBSTPEN_R { + BTBSTPEN_R::new(((self.bits >> 6) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer finished interrupt enable"] - #[inline] - pub fn tfen(&mut self) -> _TFENW { - _TFENW { w: self } + #[inline(always)] + pub fn tfen(&mut self) -> TFEN_W { + TFEN_W { w: self } } #[doc = "Bit 1 - Endpoint disabled interrupt enable"] - #[inline] - pub fn epdisen(&mut self) -> _EPDISENW { - _EPDISENW { w: self } + #[inline(always)] + pub fn epdisen(&mut self) -> EPDISEN_W { + EPDISEN_W { w: self } } #[doc = "Bit 3 - SETUP phase finished interrupt enable"] - #[inline] - pub fn stpfen(&mut self) -> _STPFENW { - _STPFENW { w: self } + #[inline(always)] + pub fn stpfen(&mut self) -> STPFEN_W { + STPFEN_W { w: self } } #[doc = "Bit 4 - Endpoint Rx FIFO overrun interrupt enable"] - #[inline] - pub fn eprxfovren(&mut self) -> _EPRXFOVRENW { - _EPRXFOVRENW { w: self } + #[inline(always)] + pub fn eprxfovren(&mut self) -> EPRXFOVREN_W { + EPRXFOVREN_W { w: self } } #[doc = "Bit 6 - Back-to-back SETUP packets interrupt enable"] - #[inline] - pub fn btbstpen(&mut self) -> _BTBSTPENW { - _BTBSTPENW { w: self } + #[inline(always)] + pub fn btbstpen(&mut self) -> BTBSTPEN_W { + BTBSTPEN_W { w: self } } } diff --git a/src/usbfs_device/dstat.rs b/src/usbfs_device/dstat.rs index b4d6ecc1e20f4300544a6d088f01c41db093f5d9..ef68a4a81f984a51fc61f9e19de414ad1347d3b0 100644 --- a/src/usbfs_device/dstat.rs +++ b/src/usbfs_device/dstat.rs @@ -1,93 +1,25 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::DSTAT { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct SPSTR { - bits: bool, -} -impl SPSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ESR { - bits: u8, -} -impl ESR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct FNRSOFR { - bits: u16, -} -impl FNRSOFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register DSTAT"] +pub type R = crate::R; +#[doc = "Reader of field `SPST`"] +pub type SPST_R = crate::R; +#[doc = "Reader of field `ES`"] +pub type ES_R = crate::R; +#[doc = "Reader of field `FNRSOF`"] +pub type FNRSOF_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Suspend status"] - #[inline] - pub fn spst(&self) -> SPSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SPSTR { bits } + #[inline(always)] + pub fn spst(&self) -> SPST_R { + SPST_R::new((self.bits & 0x01) != 0) } #[doc = "Bits 1:2 - Enumerated speed"] - #[inline] - pub fn es(&self) -> ESR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - ESR { bits } + #[inline(always)] + pub fn es(&self) -> ES_R { + ES_R::new(((self.bits >> 1) & 0x03) as u8) } #[doc = "Bits 8:21 - Frame number of the received SOF"] - #[inline] - pub fn fnrsof(&self) -> FNRSOFR { - let bits = { - const MASK: u16 = 0x3fff; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - FNRSOFR { bits } + #[inline(always)] + pub fn fnrsof(&self) -> FNRSOF_R { + FNRSOF_R::new(((self.bits >> 8) & 0x3fff) as u16) } } diff --git a/src/usbfs_device/dvbusdt.rs b/src/usbfs_device/dvbusdt.rs index a5dadcff6752d557a2746574f709e3e0e49a884d..c98ea72e9a8e05e026fa4e16cc24f2fa397dc821 100644 --- a/src/usbfs_device/dvbusdt.rs +++ b/src/usbfs_device/dvbusdt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DVBUSDT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DVBUSDTR { - bits: u16, -} -impl DVBUSDTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DVBUSDTW<'a> { +#[doc = "Reader of register DVBUSDT"] +pub type R = crate::R; +#[doc = "Writer for register DVBUSDT"] +pub type W = crate::W; +#[doc = "Register DVBUSDT `reset()`'s with value 0x17d7"] +impl crate::ResetValue for super::DVBUSDT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x17d7 + } +} +#[doc = "Reader of field `DVBUSDT`"] +pub type DVBUSDT_R = crate::R; +#[doc = "Write proxy for field `DVBUSDT`"] +pub struct DVBUSDT_W<'a> { w: &'a mut W, } -impl<'a> _DVBUSDTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DVBUSDT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Device VBUS discharge time"] - #[inline] - pub fn dvbusdt(&self) -> DVBUSDTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DVBUSDTR { bits } + #[inline(always)] + pub fn dvbusdt(&self) -> DVBUSDT_R { + DVBUSDT_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x17d7 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Device VBUS discharge time"] - #[inline] - pub fn dvbusdt(&mut self) -> _DVBUSDTW { - _DVBUSDTW { w: self } + #[inline(always)] + pub fn dvbusdt(&mut self) -> DVBUSDT_W { + DVBUSDT_W { w: self } } } diff --git a/src/usbfs_device/dvbuspt.rs b/src/usbfs_device/dvbuspt.rs index 436a3095131e351e53244655b4bbd75703a3d501..d828b9141cce7444daf7edb3a7fbb729141656c7 100644 --- a/src/usbfs_device/dvbuspt.rs +++ b/src/usbfs_device/dvbuspt.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DVBUSPT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct DVBUSPTR { - bits: u16, -} -impl DVBUSPTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _DVBUSPTW<'a> { +#[doc = "Reader of register DVBUSPT"] +pub type R = crate::R; +#[doc = "Writer for register DVBUSPT"] +pub type W = crate::W; +#[doc = "Register DVBUSPT `reset()`'s with value 0x05b8"] +impl crate::ResetValue for super::DVBUSPT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x05b8 + } +} +#[doc = "Reader of field `DVBUSPT`"] +pub type DVBUSPT_R = crate::R; +#[doc = "Write proxy for field `DVBUSPT`"] +pub struct DVBUSPT_W<'a> { w: &'a mut W, } -impl<'a> _DVBUSPTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DVBUSPT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0fff) | ((value as u32) & 0x0fff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:11 - Device VBUS pulsing time"] - #[inline] - pub fn dvbuspt(&self) -> DVBUSPTR { - let bits = { - const MASK: u16 = 0x0fff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - DVBUSPTR { bits } + #[inline(always)] + pub fn dvbuspt(&self) -> DVBUSPT_R { + DVBUSPT_R::new((self.bits & 0x0fff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x05b8 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:11 - Device VBUS pulsing time"] - #[inline] - pub fn dvbuspt(&mut self) -> _DVBUSPTW { - _DVBUSPTW { w: self } + #[inline(always)] + pub fn dvbuspt(&mut self) -> DVBUSPT_W { + DVBUSPT_W { w: self } } } diff --git a/src/usbfs_global.rs b/src/usbfs_global.rs index 2d39c708071cb1a606365f7758a964de7c270806..fdcf51e689c776aa746d37dc90967c4cb7dcbd93 100644 --- a/src/usbfs_global.rs +++ b/src/usbfs_global.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Global OTG control and status register (USBFS_GOTGCS)"] @@ -15,22 +15,19 @@ pub struct RegisterBlock { pub gintf: GINTF, #[doc = "0x18 - Global interrupt enable register (USBFS_GINTEN)"] pub ginten: GINTEN, - #[doc = "0x1c - Global Receive status read(Device mode)"] - pub grstatr_device: GRSTATR_DEVICE, - #[doc = "0x20 - Global Receive status pop(Device mode)"] - pub grstatp_device: GRSTATP_DEVICE, + _reserved_7_grstatr: [u8; 4usize], + _reserved_8_grstatp: [u8; 4usize], #[doc = "0x24 - Global Receive FIFO size register (USBFS_GRFLEN)"] pub grflen: GRFLEN, - #[doc = "0x28 - Host non-periodic transmit FIFO length register (Host mode)"] - pub hnptflen: HNPTFLEN, + _reserved_10_hnptflen: [u8; 4usize], #[doc = "0x2c - Host non-periodic transmit FIFO/queue status register (HNPTFQSTAT)"] pub hnptfqstat: HNPTFQSTAT, - _reserved0: [u8; 8usize], + _reserved12: [u8; 8usize], #[doc = "0x38 - Global core configuration register (USBFS_GCCFG)"] pub gccfg: GCCFG, #[doc = "0x3c - core ID register"] pub cid: CID, - _reserved1: [u8; 192usize], + _reserved14: [u8; 192usize], #[doc = "0x100 - Host periodic transmit FIFO length register (HPTFLEN)"] pub hptflen: HPTFLEN, #[doc = "0x104 - device IN endpoint transmit FIFO size register (DIEP1TFLEN)"] @@ -40,129 +37,286 @@ pub struct RegisterBlock { #[doc = "0x10c - device IN endpoint transmit FIFO size register (FS_DIEP3TXFLEN)"] pub diep3tflen: DIEP3TFLEN, } -#[doc = "Global OTG control and status register (USBFS_GOTGCS)"] -pub struct GOTGCS { - register: ::vcell::VolatileCell, +impl RegisterBlock { + #[doc = "0x1c - Global Receive status read(Host mode)"] + #[inline(always)] + pub fn grstatr_host(&self) -> &GRSTATR_HOST { + unsafe { &*(((self as *const Self) as *const u8).add(28usize) as *const GRSTATR_HOST) } + } + #[doc = "0x1c - Global Receive status read(Host mode)"] + #[inline(always)] + pub fn grstatr_host_mut(&self) -> &mut GRSTATR_HOST { + unsafe { &mut *(((self as *const Self) as *mut u8).add(28usize) as *mut GRSTATR_HOST) } + } + #[doc = "0x1c - Global Receive status read(Device mode)"] + #[inline(always)] + pub fn grstatr_device(&self) -> &GRSTATR_DEVICE { + unsafe { &*(((self as *const Self) as *const u8).add(28usize) as *const GRSTATR_DEVICE) } + } + #[doc = "0x1c - Global Receive status read(Device mode)"] + #[inline(always)] + pub fn grstatr_device_mut(&self) -> &mut GRSTATR_DEVICE { + unsafe { &mut *(((self as *const Self) as *mut u8).add(28usize) as *mut GRSTATR_DEVICE) } + } + #[doc = "0x20 - Global Receive status pop(Host mode)"] + #[inline(always)] + pub fn grstatp_host(&self) -> &GRSTATP_HOST { + unsafe { &*(((self as *const Self) as *const u8).add(32usize) as *const GRSTATP_HOST) } + } + #[doc = "0x20 - Global Receive status pop(Host mode)"] + #[inline(always)] + pub fn grstatp_host_mut(&self) -> &mut GRSTATP_HOST { + unsafe { &mut *(((self as *const Self) as *mut u8).add(32usize) as *mut GRSTATP_HOST) } + } + #[doc = "0x20 - Global Receive status pop(Device mode)"] + #[inline(always)] + pub fn grstatp_device(&self) -> &GRSTATP_DEVICE { + unsafe { &*(((self as *const Self) as *const u8).add(32usize) as *const GRSTATP_DEVICE) } + } + #[doc = "0x20 - Global Receive status pop(Device mode)"] + #[inline(always)] + pub fn grstatp_device_mut(&self) -> &mut GRSTATP_DEVICE { + unsafe { &mut *(((self as *const Self) as *mut u8).add(32usize) as *mut GRSTATP_DEVICE) } + } + #[doc = "0x28 - Device IN endpoint 0 transmit FIFO length (Device mode)"] + #[inline(always)] + pub fn diep0tflen(&self) -> &DIEP0TFLEN { + unsafe { &*(((self as *const Self) as *const u8).add(40usize) as *const DIEP0TFLEN) } + } + #[doc = "0x28 - Device IN endpoint 0 transmit FIFO length (Device mode)"] + #[inline(always)] + pub fn diep0tflen_mut(&self) -> &mut DIEP0TFLEN { + unsafe { &mut *(((self as *const Self) as *mut u8).add(40usize) as *mut DIEP0TFLEN) } + } + #[doc = "0x28 - Host non-periodic transmit FIFO length register (Host mode)"] + #[inline(always)] + pub fn hnptflen(&self) -> &HNPTFLEN { + unsafe { &*(((self as *const Self) as *const u8).add(40usize) as *const HNPTFLEN) } + } + #[doc = "0x28 - Host non-periodic transmit FIFO length register (Host mode)"] + #[inline(always)] + pub fn hnptflen_mut(&self) -> &mut HNPTFLEN { + unsafe { &mut *(((self as *const Self) as *mut u8).add(40usize) as *mut HNPTFLEN) } + } } +#[doc = "Global OTG control and status register (USBFS_GOTGCS)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gotgcs](gotgcs) module"] +pub type GOTGCS = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _GOTGCS; +#[doc = "`read()` method returns [gotgcs::R](gotgcs::R) reader structure"] +impl crate::Readable for GOTGCS {} +#[doc = "`write(|w| ..)` method takes [gotgcs::W](gotgcs::W) writer structure"] +impl crate::Writable for GOTGCS {} #[doc = "Global OTG control and status register (USBFS_GOTGCS)"] pub mod gotgcs; -#[doc = "Global OTG interrupt flag register (USBFS_GOTGINTF)"] -pub struct GOTGINTF { - register: ::vcell::VolatileCell, -} +#[doc = "Global OTG interrupt flag register (USBFS_GOTGINTF)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gotgintf](gotgintf) module"] +pub type GOTGINTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _GOTGINTF; +#[doc = "`read()` method returns [gotgintf::R](gotgintf::R) reader structure"] +impl crate::Readable for GOTGINTF {} +#[doc = "`write(|w| ..)` method takes [gotgintf::W](gotgintf::W) writer structure"] +impl crate::Writable for GOTGINTF {} #[doc = "Global OTG interrupt flag register (USBFS_GOTGINTF)"] pub mod gotgintf; -#[doc = "Global AHB control and status register (USBFS_GAHBCS)"] -pub struct GAHBCS { - register: ::vcell::VolatileCell, -} +#[doc = "Global AHB control and status register (USBFS_GAHBCS)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gahbcs](gahbcs) module"] +pub type GAHBCS = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _GAHBCS; +#[doc = "`read()` method returns [gahbcs::R](gahbcs::R) reader structure"] +impl crate::Readable for GAHBCS {} +#[doc = "`write(|w| ..)` method takes [gahbcs::W](gahbcs::W) writer structure"] +impl crate::Writable for GAHBCS {} #[doc = "Global AHB control and status register (USBFS_GAHBCS)"] pub mod gahbcs; -#[doc = "Global USB control and status register (USBFS_GUSBCSR)"] -pub struct GUSBCS { - register: ::vcell::VolatileCell, -} +#[doc = "Global USB control and status register (USBFS_GUSBCSR)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gusbcs](gusbcs) module"] +pub type GUSBCS = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _GUSBCS; +#[doc = "`read()` method returns [gusbcs::R](gusbcs::R) reader structure"] +impl crate::Readable for GUSBCS {} +#[doc = "`write(|w| ..)` method takes [gusbcs::W](gusbcs::W) writer structure"] +impl crate::Writable for GUSBCS {} #[doc = "Global USB control and status register (USBFS_GUSBCSR)"] pub mod gusbcs; -#[doc = "Global reset control register (USBFS_GRSTCTL)"] -pub struct GRSTCTL { - register: ::vcell::VolatileCell, -} +#[doc = "Global reset control register (USBFS_GRSTCTL)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [grstctl](grstctl) module"] +pub type GRSTCTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _GRSTCTL; +#[doc = "`read()` method returns [grstctl::R](grstctl::R) reader structure"] +impl crate::Readable for GRSTCTL {} +#[doc = "`write(|w| ..)` method takes [grstctl::W](grstctl::W) writer structure"] +impl crate::Writable for GRSTCTL {} #[doc = "Global reset control register (USBFS_GRSTCTL)"] pub mod grstctl; -#[doc = "Global interrupt flag register (USBFS_GINTF)"] -pub struct GINTF { - register: ::vcell::VolatileCell, -} +#[doc = "Global interrupt flag register (USBFS_GINTF)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gintf](gintf) module"] +pub type GINTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _GINTF; +#[doc = "`read()` method returns [gintf::R](gintf::R) reader structure"] +impl crate::Readable for GINTF {} +#[doc = "`write(|w| ..)` method takes [gintf::W](gintf::W) writer structure"] +impl crate::Writable for GINTF {} #[doc = "Global interrupt flag register (USBFS_GINTF)"] pub mod gintf; -#[doc = "Global interrupt enable register (USBFS_GINTEN)"] -pub struct GINTEN { - register: ::vcell::VolatileCell, -} +#[doc = "Global interrupt enable register (USBFS_GINTEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ginten](ginten) module"] +pub type GINTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _GINTEN; +#[doc = "`read()` method returns [ginten::R](ginten::R) reader structure"] +impl crate::Readable for GINTEN {} +#[doc = "`write(|w| ..)` method takes [ginten::W](ginten::W) writer structure"] +impl crate::Writable for GINTEN {} #[doc = "Global interrupt enable register (USBFS_GINTEN)"] pub mod ginten; -#[doc = "Global Receive status read(Device mode)"] -pub struct GRSTATR_DEVICE { - register: ::vcell::VolatileCell, -} +#[doc = "Global Receive status read(Device mode)\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [grstatr_device](grstatr_device) module"] +pub type GRSTATR_DEVICE = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _GRSTATR_DEVICE; +#[doc = "`read()` method returns [grstatr_device::R](grstatr_device::R) reader structure"] +impl crate::Readable for GRSTATR_DEVICE {} #[doc = "Global Receive status read(Device mode)"] pub mod grstatr_device; -#[doc = "Global Receive status read(Host mode)"] -pub struct GRSTATR_HOST { - register: ::vcell::VolatileCell, -} +#[doc = "Global Receive status read(Host mode)\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [grstatr_host](grstatr_host) module"] +pub type GRSTATR_HOST = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _GRSTATR_HOST; +#[doc = "`read()` method returns [grstatr_host::R](grstatr_host::R) reader structure"] +impl crate::Readable for GRSTATR_HOST {} #[doc = "Global Receive status read(Host mode)"] pub mod grstatr_host; -#[doc = "Global Receive status pop(Device mode)"] -pub struct GRSTATP_DEVICE { - register: ::vcell::VolatileCell, -} +#[doc = "Global Receive status pop(Device mode)\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [grstatp_device](grstatp_device) module"] +pub type GRSTATP_DEVICE = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _GRSTATP_DEVICE; +#[doc = "`read()` method returns [grstatp_device::R](grstatp_device::R) reader structure"] +impl crate::Readable for GRSTATP_DEVICE {} #[doc = "Global Receive status pop(Device mode)"] pub mod grstatp_device; -#[doc = "Global Receive status pop(Host mode)"] -pub struct GRSTATP_HOST { - register: ::vcell::VolatileCell, -} +#[doc = "Global Receive status pop(Host mode)\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [grstatp_host](grstatp_host) module"] +pub type GRSTATP_HOST = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _GRSTATP_HOST; +#[doc = "`read()` method returns [grstatp_host::R](grstatp_host::R) reader structure"] +impl crate::Readable for GRSTATP_HOST {} #[doc = "Global Receive status pop(Host mode)"] pub mod grstatp_host; -#[doc = "Global Receive FIFO size register (USBFS_GRFLEN)"] -pub struct GRFLEN { - register: ::vcell::VolatileCell, -} +#[doc = "Global Receive FIFO size register (USBFS_GRFLEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [grflen](grflen) module"] +pub type GRFLEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _GRFLEN; +#[doc = "`read()` method returns [grflen::R](grflen::R) reader structure"] +impl crate::Readable for GRFLEN {} +#[doc = "`write(|w| ..)` method takes [grflen::W](grflen::W) writer structure"] +impl crate::Writable for GRFLEN {} #[doc = "Global Receive FIFO size register (USBFS_GRFLEN)"] pub mod grflen; -#[doc = "Host non-periodic transmit FIFO length register (Host mode)"] -pub struct HNPTFLEN { - register: ::vcell::VolatileCell, -} +#[doc = "Host non-periodic transmit FIFO length register (Host mode)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hnptflen](hnptflen) module"] +pub type HNPTFLEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HNPTFLEN; +#[doc = "`read()` method returns [hnptflen::R](hnptflen::R) reader structure"] +impl crate::Readable for HNPTFLEN {} +#[doc = "`write(|w| ..)` method takes [hnptflen::W](hnptflen::W) writer structure"] +impl crate::Writable for HNPTFLEN {} #[doc = "Host non-periodic transmit FIFO length register (Host mode)"] pub mod hnptflen; -#[doc = "Device IN endpoint 0 transmit FIFO length (Device mode)"] -pub struct DIEP0TFLEN { - register: ::vcell::VolatileCell, -} +#[doc = "Device IN endpoint 0 transmit FIFO length (Device mode)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep0tflen](diep0tflen) module"] +pub type DIEP0TFLEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP0TFLEN; +#[doc = "`read()` method returns [diep0tflen::R](diep0tflen::R) reader structure"] +impl crate::Readable for DIEP0TFLEN {} +#[doc = "`write(|w| ..)` method takes [diep0tflen::W](diep0tflen::W) writer structure"] +impl crate::Writable for DIEP0TFLEN {} #[doc = "Device IN endpoint 0 transmit FIFO length (Device mode)"] pub mod diep0tflen; -#[doc = "Host non-periodic transmit FIFO/queue status register (HNPTFQSTAT)"] -pub struct HNPTFQSTAT { - register: ::vcell::VolatileCell, -} +#[doc = "Host non-periodic transmit FIFO/queue status register (HNPTFQSTAT)\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hnptfqstat](hnptfqstat) module"] +pub type HNPTFQSTAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HNPTFQSTAT; +#[doc = "`read()` method returns [hnptfqstat::R](hnptfqstat::R) reader structure"] +impl crate::Readable for HNPTFQSTAT {} #[doc = "Host non-periodic transmit FIFO/queue status register (HNPTFQSTAT)"] pub mod hnptfqstat; -#[doc = "Global core configuration register (USBFS_GCCFG)"] -pub struct GCCFG { - register: ::vcell::VolatileCell, -} +#[doc = "Global core configuration register (USBFS_GCCFG)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [gccfg](gccfg) module"] +pub type GCCFG = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _GCCFG; +#[doc = "`read()` method returns [gccfg::R](gccfg::R) reader structure"] +impl crate::Readable for GCCFG {} +#[doc = "`write(|w| ..)` method takes [gccfg::W](gccfg::W) writer structure"] +impl crate::Writable for GCCFG {} #[doc = "Global core configuration register (USBFS_GCCFG)"] pub mod gccfg; -#[doc = "core ID register"] -pub struct CID { - register: ::vcell::VolatileCell, -} +#[doc = "core ID register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [cid](cid) module"] +pub type CID = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CID; +#[doc = "`read()` method returns [cid::R](cid::R) reader structure"] +impl crate::Readable for CID {} +#[doc = "`write(|w| ..)` method takes [cid::W](cid::W) writer structure"] +impl crate::Writable for CID {} #[doc = "core ID register"] pub mod cid; -#[doc = "Host periodic transmit FIFO length register (HPTFLEN)"] -pub struct HPTFLEN { - register: ::vcell::VolatileCell, -} +#[doc = "Host periodic transmit FIFO length register (HPTFLEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hptflen](hptflen) module"] +pub type HPTFLEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HPTFLEN; +#[doc = "`read()` method returns [hptflen::R](hptflen::R) reader structure"] +impl crate::Readable for HPTFLEN {} +#[doc = "`write(|w| ..)` method takes [hptflen::W](hptflen::W) writer structure"] +impl crate::Writable for HPTFLEN {} #[doc = "Host periodic transmit FIFO length register (HPTFLEN)"] pub mod hptflen; -#[doc = "device IN endpoint transmit FIFO size register (DIEP1TFLEN)"] -pub struct DIEP1TFLEN { - register: ::vcell::VolatileCell, -} +#[doc = "device IN endpoint transmit FIFO size register (DIEP1TFLEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep1tflen](diep1tflen) module"] +pub type DIEP1TFLEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP1TFLEN; +#[doc = "`read()` method returns [diep1tflen::R](diep1tflen::R) reader structure"] +impl crate::Readable for DIEP1TFLEN {} +#[doc = "`write(|w| ..)` method takes [diep1tflen::W](diep1tflen::W) writer structure"] +impl crate::Writable for DIEP1TFLEN {} #[doc = "device IN endpoint transmit FIFO size register (DIEP1TFLEN)"] pub mod diep1tflen; -#[doc = "device IN endpoint transmit FIFO size register (DIEP2TFLEN)"] -pub struct DIEP2TFLEN { - register: ::vcell::VolatileCell, -} +#[doc = "device IN endpoint transmit FIFO size register (DIEP2TFLEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep2tflen](diep2tflen) module"] +pub type DIEP2TFLEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP2TFLEN; +#[doc = "`read()` method returns [diep2tflen::R](diep2tflen::R) reader structure"] +impl crate::Readable for DIEP2TFLEN {} +#[doc = "`write(|w| ..)` method takes [diep2tflen::W](diep2tflen::W) writer structure"] +impl crate::Writable for DIEP2TFLEN {} #[doc = "device IN endpoint transmit FIFO size register (DIEP2TFLEN)"] pub mod diep2tflen; -#[doc = "device IN endpoint transmit FIFO size register (FS_DIEP3TXFLEN)"] -pub struct DIEP3TFLEN { - register: ::vcell::VolatileCell, -} +#[doc = "device IN endpoint transmit FIFO size register (FS_DIEP3TXFLEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [diep3tflen](diep3tflen) module"] +pub type DIEP3TFLEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _DIEP3TFLEN; +#[doc = "`read()` method returns [diep3tflen::R](diep3tflen::R) reader structure"] +impl crate::Readable for DIEP3TFLEN {} +#[doc = "`write(|w| ..)` method takes [diep3tflen::W](diep3tflen::W) writer structure"] +impl crate::Writable for DIEP3TFLEN {} #[doc = "device IN endpoint transmit FIFO size register (FS_DIEP3TXFLEN)"] pub mod diep3tflen; diff --git a/src/usbfs_global/cid.rs b/src/usbfs_global/cid.rs index c0de1d7b8aa30c63b149110bb529b5c998ec6e13..cd5440598d2df20fd68c15789320b494981bec5c 100644 --- a/src/usbfs_global/cid.rs +++ b/src/usbfs_global/cid.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CID { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CIDR { - bits: u32, -} -impl CIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CIDW<'a> { +#[doc = "Reader of register CID"] +pub type R = crate::R; +#[doc = "Writer for register CID"] +pub type W = crate::W; +#[doc = "Register CID `reset()`'s with value 0x1000"] +impl crate::ResetValue for super::CID { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x1000 + } +} +#[doc = "Reader of field `CID`"] +pub type CID_R = crate::R; +#[doc = "Write proxy for field `CID`"] +pub struct CID_W<'a> { w: &'a mut W, } -impl<'a> _CIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff_ffff) | ((value as u32) & 0xffff_ffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:31 - Core ID"] - #[inline] - pub fn cid(&self) -> CIDR { - let bits = { - const MASK: u32 = 0xffff_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - CIDR { bits } + #[inline(always)] + pub fn cid(&self) -> CID_R { + CID_R::new((self.bits & 0xffff_ffff) as u32) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x1000 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:31 - Core ID"] - #[inline] - pub fn cid(&mut self) -> _CIDW { - _CIDW { w: self } + #[inline(always)] + pub fn cid(&mut self) -> CID_W { + CID_W { w: self } } } diff --git a/src/usbfs_global/diep0tflen.rs b/src/usbfs_global/diep0tflen.rs index 9207419c9546fd88929108a13e06be944fb9635a..e6148e7c8814fd8b2a5d85af1efbf4dea07d7040 100644 --- a/src/usbfs_global/diep0tflen.rs +++ b/src/usbfs_global/diep0tflen.rs @@ -1,146 +1,64 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEP0TFLEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IEP0TXFDR { - bits: u16, -} -impl IEP0TXFDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct IEP0TXRSARR { - bits: u16, -} -impl IEP0TXRSARR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits +#[doc = "Reader of register DIEP0TFLEN"] +pub type R = crate::R; +#[doc = "Writer for register DIEP0TFLEN"] +pub type W = crate::W; +#[doc = "Register DIEP0TFLEN `reset()`'s with value 0x0200_0200"] +impl crate::ResetValue for super::DIEP0TFLEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0200_0200 } } -#[doc = r" Proxy"] -pub struct _IEP0TXFDW<'a> { +#[doc = "Reader of field `IEP0TXFD`"] +pub type IEP0TXFD_R = crate::R; +#[doc = "Write proxy for field `IEP0TXFD`"] +pub struct IEP0TXFD_W<'a> { w: &'a mut W, } -impl<'a> _IEP0TXFDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IEP0TXFD_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xffff << 16)) | (((value as u32) & 0xffff) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _IEP0TXRSARW<'a> { +#[doc = "Reader of field `IEP0TXRSAR`"] +pub type IEP0TXRSAR_R = crate::R; +#[doc = "Write proxy for field `IEP0TXRSAR`"] +pub struct IEP0TXRSAR_W<'a> { w: &'a mut W, } -impl<'a> _IEP0TXRSARW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IEP0TXRSAR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 16:31 - in endpoint 0 Tx FIFO depth"] - #[inline] - pub fn iep0txfd(&self) -> IEP0TXFDR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IEP0TXFDR { bits } + #[inline(always)] + pub fn iep0txfd(&self) -> IEP0TXFD_R { + IEP0TXFD_R::new(((self.bits >> 16) & 0xffff) as u16) } #[doc = "Bits 0:15 - in endpoint 0 Tx RAM start address"] - #[inline] - pub fn iep0txrsar(&self) -> IEP0TXRSARR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IEP0TXRSARR { bits } + #[inline(always)] + pub fn iep0txrsar(&self) -> IEP0TXRSAR_R { + IEP0TXRSAR_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0200_0200 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 16:31 - in endpoint 0 Tx FIFO depth"] - #[inline] - pub fn iep0txfd(&mut self) -> _IEP0TXFDW { - _IEP0TXFDW { w: self } + #[inline(always)] + pub fn iep0txfd(&mut self) -> IEP0TXFD_W { + IEP0TXFD_W { w: self } } #[doc = "Bits 0:15 - in endpoint 0 Tx RAM start address"] - #[inline] - pub fn iep0txrsar(&mut self) -> _IEP0TXRSARW { - _IEP0TXRSARW { w: self } + #[inline(always)] + pub fn iep0txrsar(&mut self) -> IEP0TXRSAR_W { + IEP0TXRSAR_W { w: self } } } diff --git a/src/usbfs_global/diep1tflen.rs b/src/usbfs_global/diep1tflen.rs index db2293abe69740ea63736974d3632dbc9c841627..d9c4b03b69e170f7aa5b9fef47dd71a9e4d09631 100644 --- a/src/usbfs_global/diep1tflen.rs +++ b/src/usbfs_global/diep1tflen.rs @@ -1,146 +1,64 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEP1TFLEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IEPTXRSARR { - bits: u16, -} -impl IEPTXRSARR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct IEPTXFDR { - bits: u16, -} -impl IEPTXFDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits +#[doc = "Reader of register DIEP1TFLEN"] +pub type R = crate::R; +#[doc = "Writer for register DIEP1TFLEN"] +pub type W = crate::W; +#[doc = "Register DIEP1TFLEN `reset()`'s with value 0x0200_0400"] +impl crate::ResetValue for super::DIEP1TFLEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0200_0400 } } -#[doc = r" Proxy"] -pub struct _IEPTXRSARW<'a> { +#[doc = "Reader of field `IEPTXRSAR`"] +pub type IEPTXRSAR_R = crate::R; +#[doc = "Write proxy for field `IEPTXRSAR`"] +pub struct IEPTXRSAR_W<'a> { w: &'a mut W, } -impl<'a> _IEPTXRSARW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IEPTXRSAR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } -#[doc = r" Proxy"] -pub struct _IEPTXFDW<'a> { +#[doc = "Reader of field `IEPTXFD`"] +pub type IEPTXFD_R = crate::R; +#[doc = "Write proxy for field `IEPTXFD`"] +pub struct IEPTXFD_W<'a> { w: &'a mut W, } -impl<'a> _IEPTXFDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IEPTXFD_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xffff << 16)) | (((value as u32) & 0xffff) << 16); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - IN endpoint FIFO transmit RAM start address"] - #[inline] - pub fn ieptxrsar(&self) -> IEPTXRSARR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IEPTXRSARR { bits } + #[inline(always)] + pub fn ieptxrsar(&self) -> IEPTXRSAR_R { + IEPTXRSAR_R::new((self.bits & 0xffff) as u16) } #[doc = "Bits 16:31 - IN endpoint TxFIFO depth"] - #[inline] - pub fn ieptxfd(&self) -> IEPTXFDR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IEPTXFDR { bits } + #[inline(always)] + pub fn ieptxfd(&self) -> IEPTXFD_R { + IEPTXFD_R::new(((self.bits >> 16) & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0200_0400 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - IN endpoint FIFO transmit RAM start address"] - #[inline] - pub fn ieptxrsar(&mut self) -> _IEPTXRSARW { - _IEPTXRSARW { w: self } + #[inline(always)] + pub fn ieptxrsar(&mut self) -> IEPTXRSAR_W { + IEPTXRSAR_W { w: self } } #[doc = "Bits 16:31 - IN endpoint TxFIFO depth"] - #[inline] - pub fn ieptxfd(&mut self) -> _IEPTXFDW { - _IEPTXFDW { w: self } + #[inline(always)] + pub fn ieptxfd(&mut self) -> IEPTXFD_W { + IEPTXFD_W { w: self } } } diff --git a/src/usbfs_global/diep2tflen.rs b/src/usbfs_global/diep2tflen.rs index 2da538256f524dbe580c3ce049eb8edd0dbdd45f..888ee928f48b126d5dc2e12b76a59a11cceb6d45 100644 --- a/src/usbfs_global/diep2tflen.rs +++ b/src/usbfs_global/diep2tflen.rs @@ -1,146 +1,64 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEP2TFLEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IEPTXRSARR { - bits: u16, -} -impl IEPTXRSARR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct IEPTXFDR { - bits: u16, -} -impl IEPTXFDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits +#[doc = "Reader of register DIEP2TFLEN"] +pub type R = crate::R; +#[doc = "Writer for register DIEP2TFLEN"] +pub type W = crate::W; +#[doc = "Register DIEP2TFLEN `reset()`'s with value 0x0200_0400"] +impl crate::ResetValue for super::DIEP2TFLEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0200_0400 } } -#[doc = r" Proxy"] -pub struct _IEPTXRSARW<'a> { +#[doc = "Reader of field `IEPTXRSAR`"] +pub type IEPTXRSAR_R = crate::R; +#[doc = "Write proxy for field `IEPTXRSAR`"] +pub struct IEPTXRSAR_W<'a> { w: &'a mut W, } -impl<'a> _IEPTXRSARW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IEPTXRSAR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } -#[doc = r" Proxy"] -pub struct _IEPTXFDW<'a> { +#[doc = "Reader of field `IEPTXFD`"] +pub type IEPTXFD_R = crate::R; +#[doc = "Write proxy for field `IEPTXFD`"] +pub struct IEPTXFD_W<'a> { w: &'a mut W, } -impl<'a> _IEPTXFDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IEPTXFD_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xffff << 16)) | (((value as u32) & 0xffff) << 16); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - IN endpoint FIFO transmit RAM start address"] - #[inline] - pub fn ieptxrsar(&self) -> IEPTXRSARR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IEPTXRSARR { bits } + #[inline(always)] + pub fn ieptxrsar(&self) -> IEPTXRSAR_R { + IEPTXRSAR_R::new((self.bits & 0xffff) as u16) } #[doc = "Bits 16:31 - IN endpoint TxFIFO depth"] - #[inline] - pub fn ieptxfd(&self) -> IEPTXFDR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IEPTXFDR { bits } + #[inline(always)] + pub fn ieptxfd(&self) -> IEPTXFD_R { + IEPTXFD_R::new(((self.bits >> 16) & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0200_0400 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - IN endpoint FIFO transmit RAM start address"] - #[inline] - pub fn ieptxrsar(&mut self) -> _IEPTXRSARW { - _IEPTXRSARW { w: self } + #[inline(always)] + pub fn ieptxrsar(&mut self) -> IEPTXRSAR_W { + IEPTXRSAR_W { w: self } } #[doc = "Bits 16:31 - IN endpoint TxFIFO depth"] - #[inline] - pub fn ieptxfd(&mut self) -> _IEPTXFDW { - _IEPTXFDW { w: self } + #[inline(always)] + pub fn ieptxfd(&mut self) -> IEPTXFD_W { + IEPTXFD_W { w: self } } } diff --git a/src/usbfs_global/diep3tflen.rs b/src/usbfs_global/diep3tflen.rs index fdbba67a3ed6a29d409bae2d2eec21078a8fafd8..e667e9e2ecb24ab769b2771a1701ed95df37fb1b 100644 --- a/src/usbfs_global/diep3tflen.rs +++ b/src/usbfs_global/diep3tflen.rs @@ -1,146 +1,64 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::DIEP3TFLEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct IEPTXRSARR { - bits: u16, -} -impl IEPTXRSARR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct IEPTXFDR { - bits: u16, -} -impl IEPTXFDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits +#[doc = "Reader of register DIEP3TFLEN"] +pub type R = crate::R; +#[doc = "Writer for register DIEP3TFLEN"] +pub type W = crate::W; +#[doc = "Register DIEP3TFLEN `reset()`'s with value 0x0200_0400"] +impl crate::ResetValue for super::DIEP3TFLEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0200_0400 } } -#[doc = r" Proxy"] -pub struct _IEPTXRSARW<'a> { +#[doc = "Reader of field `IEPTXRSAR`"] +pub type IEPTXRSAR_R = crate::R; +#[doc = "Write proxy for field `IEPTXRSAR`"] +pub struct IEPTXRSAR_W<'a> { w: &'a mut W, } -impl<'a> _IEPTXRSARW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IEPTXRSAR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } -#[doc = r" Proxy"] -pub struct _IEPTXFDW<'a> { +#[doc = "Reader of field `IEPTXFD`"] +pub type IEPTXFD_R = crate::R; +#[doc = "Write proxy for field `IEPTXFD`"] +pub struct IEPTXFD_W<'a> { w: &'a mut W, } -impl<'a> _IEPTXFDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> IEPTXFD_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xffff << 16)) | (((value as u32) & 0xffff) << 16); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - IN endpoint FIFO4 transmit RAM start address"] - #[inline] - pub fn ieptxrsar(&self) -> IEPTXRSARR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IEPTXRSARR { bits } + #[inline(always)] + pub fn ieptxrsar(&self) -> IEPTXRSAR_R { + IEPTXRSAR_R::new((self.bits & 0xffff) as u16) } #[doc = "Bits 16:31 - IN endpoint TxFIFO depth"] - #[inline] - pub fn ieptxfd(&self) -> IEPTXFDR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - IEPTXFDR { bits } + #[inline(always)] + pub fn ieptxfd(&self) -> IEPTXFD_R { + IEPTXFD_R::new(((self.bits >> 16) & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0200_0400 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - IN endpoint FIFO4 transmit RAM start address"] - #[inline] - pub fn ieptxrsar(&mut self) -> _IEPTXRSARW { - _IEPTXRSARW { w: self } + #[inline(always)] + pub fn ieptxrsar(&mut self) -> IEPTXRSAR_W { + IEPTXRSAR_W { w: self } } #[doc = "Bits 16:31 - IN endpoint TxFIFO depth"] - #[inline] - pub fn ieptxfd(&mut self) -> _IEPTXFDW { - _IEPTXFDW { w: self } + #[inline(always)] + pub fn ieptxfd(&mut self) -> IEPTXFD_W { + IEPTXFD_W { w: self } } } diff --git a/src/usbfs_global/gahbcs.rs b/src/usbfs_global/gahbcs.rs index 26c3d540dbf6342ee534b7393adcc499c7a341ea..8641fc8bf954c1b93cc143189b2235d5c8e7c070 100644 --- a/src/usbfs_global/gahbcs.rs +++ b/src/usbfs_global/gahbcs.rs @@ -1,241 +1,118 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::GAHBCS { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct GINTENR { - bits: bool, -} -impl GINTENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TXFTHR { - bits: bool, -} -impl TXFTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PTXFTHR { - bits: bool, -} -impl PTXFTHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _GINTENW<'a> { +#[doc = "Reader of register GAHBCS"] +pub type R = crate::R; +#[doc = "Writer for register GAHBCS"] +pub type W = crate::W; +#[doc = "Register GAHBCS `reset()`'s with value 0"] +impl crate::ResetValue for super::GAHBCS { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `GINTEN`"] +pub type GINTEN_R = crate::R; +#[doc = "Write proxy for field `GINTEN`"] +pub struct GINTEN_W<'a> { w: &'a mut W, } -impl<'a> _GINTENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> GINTEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _TXFTHW<'a> { +#[doc = "Reader of field `TXFTH`"] +pub type TXFTH_R = crate::R; +#[doc = "Write proxy for field `TXFTH`"] +pub struct TXFTH_W<'a> { w: &'a mut W, } -impl<'a> _TXFTHW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TXFTH_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _PTXFTHW<'a> { +#[doc = "Reader of field `PTXFTH`"] +pub type PTXFTH_R = crate::R; +#[doc = "Write proxy for field `PTXFTH`"] +pub struct PTXFTH_W<'a> { w: &'a mut W, } -impl<'a> _PTXFTHW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PTXFTH_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Global interrupt enable"] - #[inline] - pub fn ginten(&self) -> GINTENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GINTENR { bits } + #[inline(always)] + pub fn ginten(&self) -> GINTEN_R { + GINTEN_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 7 - Tx FIFO threshold"] - #[inline] - pub fn txfth(&self) -> TXFTHR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TXFTHR { bits } + #[inline(always)] + pub fn txfth(&self) -> TXFTH_R { + TXFTH_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Periodic Tx FIFO threshold"] - #[inline] - pub fn ptxfth(&self) -> PTXFTHR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PTXFTHR { bits } + #[inline(always)] + pub fn ptxfth(&self) -> PTXFTH_R { + PTXFTH_R::new(((self.bits >> 8) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Global interrupt enable"] - #[inline] - pub fn ginten(&mut self) -> _GINTENW { - _GINTENW { w: self } + #[inline(always)] + pub fn ginten(&mut self) -> GINTEN_W { + GINTEN_W { w: self } } #[doc = "Bit 7 - Tx FIFO threshold"] - #[inline] - pub fn txfth(&mut self) -> _TXFTHW { - _TXFTHW { w: self } + #[inline(always)] + pub fn txfth(&mut self) -> TXFTH_W { + TXFTH_W { w: self } } #[doc = "Bit 8 - Periodic Tx FIFO threshold"] - #[inline] - pub fn ptxfth(&mut self) -> _PTXFTHW { - _PTXFTHW { w: self } + #[inline(always)] + pub fn ptxfth(&mut self) -> PTXFTH_W { + PTXFTH_W { w: self } } } diff --git a/src/usbfs_global/gccfg.rs b/src/usbfs_global/gccfg.rs index 32b7169188dae05d6f1158b3d38eb576d386fd4e..b8c5ff95be6629655563550dced0620a5809d151 100644 --- a/src/usbfs_global/gccfg.rs +++ b/src/usbfs_global/gccfg.rs @@ -1,359 +1,186 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::GCCFG { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PWRONR { - bits: bool, -} -impl PWRONR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct VBUSACENR { - bits: bool, -} -impl VBUSACENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct VBUSBCENR { - bits: bool, -} -impl VBUSBCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SOFOENR { - bits: bool, -} -impl SOFOENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct VBUSIGR { - bits: bool, -} -impl VBUSIGR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _PWRONW<'a> { +#[doc = "Reader of register GCCFG"] +pub type R = crate::R; +#[doc = "Writer for register GCCFG"] +pub type W = crate::W; +#[doc = "Register GCCFG `reset()`'s with value 0"] +impl crate::ResetValue for super::GCCFG { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PWRON`"] +pub type PWRON_R = crate::R; +#[doc = "Write proxy for field `PWRON`"] +pub struct PWRON_W<'a> { w: &'a mut W, } -impl<'a> _PWRONW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PWRON_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 16)) | (((value as u32) & 0x01) << 16); self.w } } -#[doc = r" Proxy"] -pub struct _VBUSACENW<'a> { +#[doc = "Reader of field `VBUSACEN`"] +pub type VBUSACEN_R = crate::R; +#[doc = "Write proxy for field `VBUSACEN`"] +pub struct VBUSACEN_W<'a> { w: &'a mut W, } -impl<'a> _VBUSACENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> VBUSACEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _VBUSBCENW<'a> { +#[doc = "Reader of field `VBUSBCEN`"] +pub type VBUSBCEN_R = crate::R; +#[doc = "Write proxy for field `VBUSBCEN`"] +pub struct VBUSBCEN_W<'a> { w: &'a mut W, } -impl<'a> _VBUSBCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> VBUSBCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _SOFOENW<'a> { +#[doc = "Reader of field `SOFOEN`"] +pub type SOFOEN_R = crate::R; +#[doc = "Write proxy for field `SOFOEN`"] +pub struct SOFOEN_W<'a> { w: &'a mut W, } -impl<'a> _SOFOENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SOFOEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _VBUSIGW<'a> { +#[doc = "Reader of field `VBUSIG`"] +pub type VBUSIG_R = crate::R; +#[doc = "Write proxy for field `VBUSIG`"] +pub struct VBUSIG_W<'a> { w: &'a mut W, } -impl<'a> _VBUSIGW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> VBUSIG_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 16 - Power on"] - #[inline] - pub fn pwron(&self) -> PWRONR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PWRONR { bits } + #[inline(always)] + pub fn pwron(&self) -> PWRON_R { + PWRON_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 18 - The VBUS A-device Comparer enable"] - #[inline] - pub fn vbusacen(&self) -> VBUSACENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - VBUSACENR { bits } + #[inline(always)] + pub fn vbusacen(&self) -> VBUSACEN_R { + VBUSACEN_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - The VBUS B-device Comparer enable"] - #[inline] - pub fn vbusbcen(&self) -> VBUSBCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - VBUSBCENR { bits } + #[inline(always)] + pub fn vbusbcen(&self) -> VBUSBCEN_R { + VBUSBCEN_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - SOF output enable"] - #[inline] - pub fn sofoen(&self) -> SOFOENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SOFOENR { bits } + #[inline(always)] + pub fn sofoen(&self) -> SOFOEN_R { + SOFOEN_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - VBUS ignored"] - #[inline] - pub fn vbusig(&self) -> VBUSIGR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - VBUSIGR { bits } + #[inline(always)] + pub fn vbusig(&self) -> VBUSIG_R { + VBUSIG_R::new(((self.bits >> 21) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 16 - Power on"] - #[inline] - pub fn pwron(&mut self) -> _PWRONW { - _PWRONW { w: self } + #[inline(always)] + pub fn pwron(&mut self) -> PWRON_W { + PWRON_W { w: self } } #[doc = "Bit 18 - The VBUS A-device Comparer enable"] - #[inline] - pub fn vbusacen(&mut self) -> _VBUSACENW { - _VBUSACENW { w: self } + #[inline(always)] + pub fn vbusacen(&mut self) -> VBUSACEN_W { + VBUSACEN_W { w: self } } #[doc = "Bit 19 - The VBUS B-device Comparer enable"] - #[inline] - pub fn vbusbcen(&mut self) -> _VBUSBCENW { - _VBUSBCENW { w: self } + #[inline(always)] + pub fn vbusbcen(&mut self) -> VBUSBCEN_W { + VBUSBCEN_W { w: self } } #[doc = "Bit 20 - SOF output enable"] - #[inline] - pub fn sofoen(&mut self) -> _SOFOENW { - _SOFOENW { w: self } + #[inline(always)] + pub fn sofoen(&mut self) -> SOFOEN_W { + SOFOEN_W { w: self } } #[doc = "Bit 21 - VBUS ignored"] - #[inline] - pub fn vbusig(&mut self) -> _VBUSIGW { - _VBUSIGW { w: self } + #[inline(always)] + pub fn vbusig(&mut self) -> VBUSIG_W { + VBUSIG_W { w: self } } } diff --git a/src/usbfs_global/ginten.rs b/src/usbfs_global/ginten.rs index d62bbd01ee0d64151a32279fc12b6eedfc1d174e..b2e5cc0b1f059811317c4427d7fe44c92d2c2b94 100644 --- a/src/usbfs_global/ginten.rs +++ b/src/usbfs_global/ginten.rs @@ -1,1452 +1,805 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::GINTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MFIER { - bits: bool, -} -impl MFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OTGIER { - bits: bool, -} -impl OTGIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SOFIER { - bits: bool, -} -impl SOFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RXFNEIER { - bits: bool, -} -impl RXFNEIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NPTXFEIER { - bits: bool, -} -impl NPTXFEIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GNPINAKIER { - bits: bool, -} -impl GNPINAKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GONAKIER { - bits: bool, -} -impl GONAKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ESPIER { - bits: bool, -} -impl ESPIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SPIER { - bits: bool, -} -impl SPIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RSTIER { - bits: bool, -} -impl RSTIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ENUMFIER { - bits: bool, -} -impl ENUMFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISOOPDIER { - bits: bool, -} -impl ISOOPDIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EOPFIER { - bits: bool, -} -impl EOPFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IEPIER { - bits: bool, -} -impl IEPIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OEPIER { - bits: bool, -} -impl OEPIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISOINCIER { - bits: bool, -} -impl ISOINCIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PXNCIE_ISOONCIER { - bits: bool, -} -impl PXNCIE_ISOONCIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HPIER { - bits: bool, -} -impl HPIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HCIER { - bits: bool, -} -impl HCIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PTXFEIER { - bits: bool, -} -impl PTXFEIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IDPSCIER { - bits: bool, -} -impl IDPSCIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DISCIER { - bits: bool, -} -impl DISCIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SESIER { - bits: bool, -} -impl SESIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WKUPIER { - bits: bool, -} -impl WKUPIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _MFIEW<'a> { +#[doc = "Reader of register GINTEN"] +pub type R = crate::R; +#[doc = "Writer for register GINTEN"] +pub type W = crate::W; +#[doc = "Register GINTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::GINTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MFIE`"] +pub type MFIE_R = crate::R; +#[doc = "Write proxy for field `MFIE`"] +pub struct MFIE_W<'a> { w: &'a mut W, } -impl<'a> _MFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _OTGIEW<'a> { +#[doc = "Reader of field `OTGIE`"] +pub type OTGIE_R = crate::R; +#[doc = "Write proxy for field `OTGIE`"] +pub struct OTGIE_W<'a> { w: &'a mut W, } -impl<'a> _OTGIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OTGIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _SOFIEW<'a> { +#[doc = "Reader of field `SOFIE`"] +pub type SOFIE_R = crate::R; +#[doc = "Write proxy for field `SOFIE`"] +pub struct SOFIE_W<'a> { w: &'a mut W, } -impl<'a> _SOFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SOFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _RXFNEIEW<'a> { +#[doc = "Reader of field `RXFNEIE`"] +pub type RXFNEIE_R = crate::R; +#[doc = "Write proxy for field `RXFNEIE`"] +pub struct RXFNEIE_W<'a> { w: &'a mut W, } -impl<'a> _RXFNEIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RXFNEIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _NPTXFEIEW<'a> { +#[doc = "Reader of field `NPTXFEIE`"] +pub type NPTXFEIE_R = crate::R; +#[doc = "Write proxy for field `NPTXFEIE`"] +pub struct NPTXFEIE_W<'a> { w: &'a mut W, } -impl<'a> _NPTXFEIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NPTXFEIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _GNPINAKIEW<'a> { +#[doc = "Reader of field `GNPINAKIE`"] +pub type GNPINAKIE_R = crate::R; +#[doc = "Write proxy for field `GNPINAKIE`"] +pub struct GNPINAKIE_W<'a> { w: &'a mut W, } -impl<'a> _GNPINAKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> GNPINAKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _GONAKIEW<'a> { +#[doc = "Reader of field `GONAKIE`"] +pub type GONAKIE_R = crate::R; +#[doc = "Write proxy for field `GONAKIE`"] +pub struct GONAKIE_W<'a> { w: &'a mut W, } -impl<'a> _GONAKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> GONAKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _ESPIEW<'a> { +#[doc = "Reader of field `ESPIE`"] +pub type ESPIE_R = crate::R; +#[doc = "Write proxy for field `ESPIE`"] +pub struct ESPIE_W<'a> { w: &'a mut W, } -impl<'a> _ESPIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ESPIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _SPIEW<'a> { +#[doc = "Reader of field `SPIE`"] +pub type SPIE_R = crate::R; +#[doc = "Write proxy for field `SPIE`"] +pub struct SPIE_W<'a> { w: &'a mut W, } -impl<'a> _SPIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SPIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _RSTIEW<'a> { +#[doc = "Reader of field `RSTIE`"] +pub type RSTIE_R = crate::R; +#[doc = "Write proxy for field `RSTIE`"] +pub struct RSTIE_W<'a> { w: &'a mut W, } -impl<'a> _RSTIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RSTIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _ENUMFIEW<'a> { +#[doc = "Reader of field `ENUMFIE`"] +pub type ENUMFIE_R = crate::R; +#[doc = "Write proxy for field `ENUMFIE`"] +pub struct ENUMFIE_W<'a> { w: &'a mut W, } -impl<'a> _ENUMFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ENUMFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _ISOOPDIEW<'a> { +#[doc = "Reader of field `ISOOPDIE`"] +pub type ISOOPDIE_R = crate::R; +#[doc = "Write proxy for field `ISOOPDIE`"] +pub struct ISOOPDIE_W<'a> { w: &'a mut W, } -impl<'a> _ISOOPDIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ISOOPDIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _EOPFIEW<'a> { +#[doc = "Reader of field `EOPFIE`"] +pub type EOPFIE_R = crate::R; +#[doc = "Write proxy for field `EOPFIE`"] +pub struct EOPFIE_W<'a> { w: &'a mut W, } -impl<'a> _EOPFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EOPFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _IEPIEW<'a> { +#[doc = "Reader of field `IEPIE`"] +pub type IEPIE_R = crate::R; +#[doc = "Write proxy for field `IEPIE`"] +pub struct IEPIE_W<'a> { w: &'a mut W, } -impl<'a> _IEPIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IEPIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _OEPIEW<'a> { +#[doc = "Reader of field `OEPIE`"] +pub type OEPIE_R = crate::R; +#[doc = "Write proxy for field `OEPIE`"] +pub struct OEPIE_W<'a> { w: &'a mut W, } -impl<'a> _OEPIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> OEPIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _ISOINCIEW<'a> { +#[doc = "Reader of field `ISOINCIE`"] +pub type ISOINCIE_R = crate::R; +#[doc = "Write proxy for field `ISOINCIE`"] +pub struct ISOINCIE_W<'a> { w: &'a mut W, } -impl<'a> _ISOINCIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ISOINCIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _PXNCIE_ISOONCIEW<'a> { +#[doc = "Reader of field `PXNCIE_ISOONCIE`"] +pub type PXNCIE_ISOONCIE_R = crate::R; +#[doc = "Write proxy for field `PXNCIE_ISOONCIE`"] +pub struct PXNCIE_ISOONCIE_W<'a> { w: &'a mut W, } -impl<'a> _PXNCIE_ISOONCIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PXNCIE_ISOONCIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _HCIEW<'a> { +#[doc = "Reader of field `HPIE`"] +pub type HPIE_R = crate::R; +#[doc = "Reader of field `HCIE`"] +pub type HCIE_R = crate::R; +#[doc = "Write proxy for field `HCIE`"] +pub struct HCIE_W<'a> { w: &'a mut W, } -impl<'a> _HCIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HCIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 25; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 25)) | (((value as u32) & 0x01) << 25); self.w } } -#[doc = r" Proxy"] -pub struct _PTXFEIEW<'a> { +#[doc = "Reader of field `PTXFEIE`"] +pub type PTXFEIE_R = crate::R; +#[doc = "Write proxy for field `PTXFEIE`"] +pub struct PTXFEIE_W<'a> { w: &'a mut W, } -impl<'a> _PTXFEIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PTXFEIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 26; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 26)) | (((value as u32) & 0x01) << 26); self.w } } -#[doc = r" Proxy"] -pub struct _IDPSCIEW<'a> { +#[doc = "Reader of field `IDPSCIE`"] +pub type IDPSCIE_R = crate::R; +#[doc = "Write proxy for field `IDPSCIE`"] +pub struct IDPSCIE_W<'a> { w: &'a mut W, } -impl<'a> _IDPSCIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IDPSCIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _DISCIEW<'a> { +#[doc = "Reader of field `DISCIE`"] +pub type DISCIE_R = crate::R; +#[doc = "Write proxy for field `DISCIE`"] +pub struct DISCIE_W<'a> { w: &'a mut W, } -impl<'a> _DISCIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DISCIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _SESIEW<'a> { +#[doc = "Reader of field `SESIE`"] +pub type SESIE_R = crate::R; +#[doc = "Write proxy for field `SESIE`"] +pub struct SESIE_W<'a> { w: &'a mut W, } -impl<'a> _SESIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SESIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _WKUPIEW<'a> { +#[doc = "Reader of field `WKUPIE`"] +pub type WKUPIE_R = crate::R; +#[doc = "Write proxy for field `WKUPIE`"] +pub struct WKUPIE_W<'a> { w: &'a mut W, } -impl<'a> _WKUPIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WKUPIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 1 - Mode fault interrupt enable"] - #[inline] - pub fn mfie(&self) -> MFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MFIER { bits } + #[inline(always)] + pub fn mfie(&self) -> MFIE_R { + MFIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - OTG interrupt enable"] - #[inline] - pub fn otgie(&self) -> OTGIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OTGIER { bits } + #[inline(always)] + pub fn otgie(&self) -> OTGIE_R { + OTGIE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Start of frame interrupt enable"] - #[inline] - pub fn sofie(&self) -> SOFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SOFIER { bits } + #[inline(always)] + pub fn sofie(&self) -> SOFIE_R { + SOFIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - Receive FIFO non-empty interrupt enable"] - #[inline] - pub fn rxfneie(&self) -> RXFNEIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RXFNEIER { bits } + #[inline(always)] + pub fn rxfneie(&self) -> RXFNEIE_R { + RXFNEIE_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Non-periodic TxFIFO empty interrupt enable"] - #[inline] - pub fn nptxfeie(&self) -> NPTXFEIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NPTXFEIER { bits } + #[inline(always)] + pub fn nptxfeie(&self) -> NPTXFEIE_R { + NPTXFEIE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Global non-periodic IN NAK effective interrupt enable"] - #[inline] - pub fn gnpinakie(&self) -> GNPINAKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GNPINAKIER { bits } + #[inline(always)] + pub fn gnpinakie(&self) -> GNPINAKIE_R { + GNPINAKIE_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Global OUT NAK effective interrupt enable"] - #[inline] - pub fn gonakie(&self) -> GONAKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GONAKIER { bits } + #[inline(always)] + pub fn gonakie(&self) -> GONAKIE_R { + GONAKIE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 10 - Early suspend interrupt enable"] - #[inline] - pub fn espie(&self) -> ESPIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ESPIER { bits } + #[inline(always)] + pub fn espie(&self) -> ESPIE_R { + ESPIE_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - USB suspend interrupt enable"] - #[inline] - pub fn spie(&self) -> SPIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SPIER { bits } + #[inline(always)] + pub fn spie(&self) -> SPIE_R { + SPIE_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - USB reset interrupt enable"] - #[inline] - pub fn rstie(&self) -> RSTIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RSTIER { bits } + #[inline(always)] + pub fn rstie(&self) -> RSTIE_R { + RSTIE_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Enumeration finish interrupt enable"] - #[inline] - pub fn enumfie(&self) -> ENUMFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ENUMFIER { bits } + #[inline(always)] + pub fn enumfie(&self) -> ENUMFIE_R { + ENUMFIE_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Isochronous OUT packet dropped interrupt enable"] - #[inline] - pub fn isoopdie(&self) -> ISOOPDIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISOOPDIER { bits } + #[inline(always)] + pub fn isoopdie(&self) -> ISOOPDIE_R { + ISOOPDIE_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - End of periodic frame interrupt enable"] - #[inline] - pub fn eopfie(&self) -> EOPFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOPFIER { bits } + #[inline(always)] + pub fn eopfie(&self) -> EOPFIE_R { + EOPFIE_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 18 - IN endpoints interrupt enable"] - #[inline] - pub fn iepie(&self) -> IEPIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IEPIER { bits } + #[inline(always)] + pub fn iepie(&self) -> IEPIE_R { + IEPIE_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - OUT endpoints interrupt enable"] - #[inline] - pub fn oepie(&self) -> OEPIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OEPIER { bits } + #[inline(always)] + pub fn oepie(&self) -> OEPIE_R { + OEPIE_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - isochronous IN transfer not complete interrupt enable"] - #[inline] - pub fn isoincie(&self) -> ISOINCIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISOINCIER { bits } + #[inline(always)] + pub fn isoincie(&self) -> ISOINCIE_R { + ISOINCIE_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - periodic transfer not compelete Interrupt enable(Host mode)/isochronous OUT transfer not complete interrupt enable(Device mode)"] - #[inline] - pub fn pxncie_isooncie(&self) -> PXNCIE_ISOONCIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PXNCIE_ISOONCIER { bits } + #[inline(always)] + pub fn pxncie_isooncie(&self) -> PXNCIE_ISOONCIE_R { + PXNCIE_ISOONCIE_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 24 - Host port interrupt enable"] - #[inline] - pub fn hpie(&self) -> HPIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HPIER { bits } + #[inline(always)] + pub fn hpie(&self) -> HPIE_R { + HPIE_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Host channels interrupt enable"] - #[inline] - pub fn hcie(&self) -> HCIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HCIER { bits } + #[inline(always)] + pub fn hcie(&self) -> HCIE_R { + HCIE_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Periodic TxFIFO empty interrupt enable"] - #[inline] - pub fn ptxfeie(&self) -> PTXFEIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PTXFEIER { bits } + #[inline(always)] + pub fn ptxfeie(&self) -> PTXFEIE_R { + PTXFEIE_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 28 - ID pin status change interrupt enable"] - #[inline] - pub fn idpscie(&self) -> IDPSCIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IDPSCIER { bits } + #[inline(always)] + pub fn idpscie(&self) -> IDPSCIE_R { + IDPSCIE_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Disconnect interrupt enable"] - #[inline] - pub fn discie(&self) -> DISCIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DISCIER { bits } + #[inline(always)] + pub fn discie(&self) -> DISCIE_R { + DISCIE_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Session interrupt enable"] - #[inline] - pub fn sesie(&self) -> SESIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SESIER { bits } + #[inline(always)] + pub fn sesie(&self) -> SESIE_R { + SESIE_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Wakeup interrupt enable"] - #[inline] - pub fn wkupie(&self) -> WKUPIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WKUPIER { bits } + #[inline(always)] + pub fn wkupie(&self) -> WKUPIE_R { + WKUPIE_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 1 - Mode fault interrupt enable"] - #[inline] - pub fn mfie(&mut self) -> _MFIEW { - _MFIEW { w: self } + #[inline(always)] + pub fn mfie(&mut self) -> MFIE_W { + MFIE_W { w: self } } #[doc = "Bit 2 - OTG interrupt enable"] - #[inline] - pub fn otgie(&mut self) -> _OTGIEW { - _OTGIEW { w: self } + #[inline(always)] + pub fn otgie(&mut self) -> OTGIE_W { + OTGIE_W { w: self } } #[doc = "Bit 3 - Start of frame interrupt enable"] - #[inline] - pub fn sofie(&mut self) -> _SOFIEW { - _SOFIEW { w: self } + #[inline(always)] + pub fn sofie(&mut self) -> SOFIE_W { + SOFIE_W { w: self } } #[doc = "Bit 4 - Receive FIFO non-empty interrupt enable"] - #[inline] - pub fn rxfneie(&mut self) -> _RXFNEIEW { - _RXFNEIEW { w: self } + #[inline(always)] + pub fn rxfneie(&mut self) -> RXFNEIE_W { + RXFNEIE_W { w: self } } #[doc = "Bit 5 - Non-periodic TxFIFO empty interrupt enable"] - #[inline] - pub fn nptxfeie(&mut self) -> _NPTXFEIEW { - _NPTXFEIEW { w: self } + #[inline(always)] + pub fn nptxfeie(&mut self) -> NPTXFEIE_W { + NPTXFEIE_W { w: self } } #[doc = "Bit 6 - Global non-periodic IN NAK effective interrupt enable"] - #[inline] - pub fn gnpinakie(&mut self) -> _GNPINAKIEW { - _GNPINAKIEW { w: self } + #[inline(always)] + pub fn gnpinakie(&mut self) -> GNPINAKIE_W { + GNPINAKIE_W { w: self } } #[doc = "Bit 7 - Global OUT NAK effective interrupt enable"] - #[inline] - pub fn gonakie(&mut self) -> _GONAKIEW { - _GONAKIEW { w: self } + #[inline(always)] + pub fn gonakie(&mut self) -> GONAKIE_W { + GONAKIE_W { w: self } } #[doc = "Bit 10 - Early suspend interrupt enable"] - #[inline] - pub fn espie(&mut self) -> _ESPIEW { - _ESPIEW { w: self } + #[inline(always)] + pub fn espie(&mut self) -> ESPIE_W { + ESPIE_W { w: self } } #[doc = "Bit 11 - USB suspend interrupt enable"] - #[inline] - pub fn spie(&mut self) -> _SPIEW { - _SPIEW { w: self } + #[inline(always)] + pub fn spie(&mut self) -> SPIE_W { + SPIE_W { w: self } } #[doc = "Bit 12 - USB reset interrupt enable"] - #[inline] - pub fn rstie(&mut self) -> _RSTIEW { - _RSTIEW { w: self } + #[inline(always)] + pub fn rstie(&mut self) -> RSTIE_W { + RSTIE_W { w: self } } #[doc = "Bit 13 - Enumeration finish interrupt enable"] - #[inline] - pub fn enumfie(&mut self) -> _ENUMFIEW { - _ENUMFIEW { w: self } + #[inline(always)] + pub fn enumfie(&mut self) -> ENUMFIE_W { + ENUMFIE_W { w: self } } #[doc = "Bit 14 - Isochronous OUT packet dropped interrupt enable"] - #[inline] - pub fn isoopdie(&mut self) -> _ISOOPDIEW { - _ISOOPDIEW { w: self } + #[inline(always)] + pub fn isoopdie(&mut self) -> ISOOPDIE_W { + ISOOPDIE_W { w: self } } #[doc = "Bit 15 - End of periodic frame interrupt enable"] - #[inline] - pub fn eopfie(&mut self) -> _EOPFIEW { - _EOPFIEW { w: self } + #[inline(always)] + pub fn eopfie(&mut self) -> EOPFIE_W { + EOPFIE_W { w: self } } #[doc = "Bit 18 - IN endpoints interrupt enable"] - #[inline] - pub fn iepie(&mut self) -> _IEPIEW { - _IEPIEW { w: self } + #[inline(always)] + pub fn iepie(&mut self) -> IEPIE_W { + IEPIE_W { w: self } } #[doc = "Bit 19 - OUT endpoints interrupt enable"] - #[inline] - pub fn oepie(&mut self) -> _OEPIEW { - _OEPIEW { w: self } + #[inline(always)] + pub fn oepie(&mut self) -> OEPIE_W { + OEPIE_W { w: self } } #[doc = "Bit 20 - isochronous IN transfer not complete interrupt enable"] - #[inline] - pub fn isoincie(&mut self) -> _ISOINCIEW { - _ISOINCIEW { w: self } + #[inline(always)] + pub fn isoincie(&mut self) -> ISOINCIE_W { + ISOINCIE_W { w: self } } #[doc = "Bit 21 - periodic transfer not compelete Interrupt enable(Host mode)/isochronous OUT transfer not complete interrupt enable(Device mode)"] - #[inline] - pub fn pxncie_isooncie(&mut self) -> _PXNCIE_ISOONCIEW { - _PXNCIE_ISOONCIEW { w: self } + #[inline(always)] + pub fn pxncie_isooncie(&mut self) -> PXNCIE_ISOONCIE_W { + PXNCIE_ISOONCIE_W { w: self } } #[doc = "Bit 25 - Host channels interrupt enable"] - #[inline] - pub fn hcie(&mut self) -> _HCIEW { - _HCIEW { w: self } + #[inline(always)] + pub fn hcie(&mut self) -> HCIE_W { + HCIE_W { w: self } } #[doc = "Bit 26 - Periodic TxFIFO empty interrupt enable"] - #[inline] - pub fn ptxfeie(&mut self) -> _PTXFEIEW { - _PTXFEIEW { w: self } + #[inline(always)] + pub fn ptxfeie(&mut self) -> PTXFEIE_W { + PTXFEIE_W { w: self } } #[doc = "Bit 28 - ID pin status change interrupt enable"] - #[inline] - pub fn idpscie(&mut self) -> _IDPSCIEW { - _IDPSCIEW { w: self } + #[inline(always)] + pub fn idpscie(&mut self) -> IDPSCIE_W { + IDPSCIE_W { w: self } } #[doc = "Bit 29 - Disconnect interrupt enable"] - #[inline] - pub fn discie(&mut self) -> _DISCIEW { - _DISCIEW { w: self } + #[inline(always)] + pub fn discie(&mut self) -> DISCIE_W { + DISCIE_W { w: self } } #[doc = "Bit 30 - Session interrupt enable"] - #[inline] - pub fn sesie(&mut self) -> _SESIEW { - _SESIEW { w: self } + #[inline(always)] + pub fn sesie(&mut self) -> SESIE_W { + SESIE_W { w: self } } #[doc = "Bit 31 - Wakeup interrupt enable"] - #[inline] - pub fn wkupie(&mut self) -> _WKUPIEW { - _WKUPIEW { w: self } + #[inline(always)] + pub fn wkupie(&mut self) -> WKUPIE_W { + WKUPIE_W { w: self } } } diff --git a/src/usbfs_global/gintf.rs b/src/usbfs_global/gintf.rs index 56c1688c067f1e6c75773ca9d8d9736e08b2db5f..34c00a9eecd89c202441a9cdb40660d7fd97d69b 100644 --- a/src/usbfs_global/gintf.rs +++ b/src/usbfs_global/gintf.rs @@ -1,1231 +1,569 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::GINTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct COPMR { - bits: bool, -} -impl COPMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct MFIFR { - bits: bool, -} -impl MFIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OTGIFR { - bits: bool, -} -impl OTGIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SOFR { - bits: bool, -} -impl SOFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RXFNEIFR { - bits: bool, -} -impl RXFNEIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NPTXFEIFR { - bits: bool, -} -impl NPTXFEIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GNPINAKR { - bits: bool, -} -impl GNPINAKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct GONAKR { - bits: bool, -} -impl GONAKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ESPR { - bits: bool, -} -impl ESPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SPR { - bits: bool, -} -impl SPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RSTR { - bits: bool, -} -impl RSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ENUMFR { - bits: bool, -} -impl ENUMFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISOOPDIFR { - bits: bool, -} -impl ISOOPDIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EOPFIFR { - bits: bool, -} -impl EOPFIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IEPIFR { - bits: bool, -} -impl IEPIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct OEPIFR { - bits: bool, -} -impl OEPIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ISOINCIFR { - bits: bool, -} -impl ISOINCIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PXNCIF_ISOONCIFR { - bits: bool, -} -impl PXNCIF_ISOONCIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HPIFR { - bits: bool, -} -impl HPIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HCIFR { - bits: bool, -} -impl HCIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PTXFEIFR { - bits: bool, -} -impl PTXFEIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IDPSCR { - bits: bool, -} -impl IDPSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DISCIFR { - bits: bool, -} -impl DISCIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SESIFR { - bits: bool, -} -impl SESIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct WKUPIFR { - bits: bool, -} -impl WKUPIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _MFIFW<'a> { +#[doc = "Reader of register GINTF"] +pub type R = crate::R; +#[doc = "Writer for register GINTF"] +pub type W = crate::W; +#[doc = "Register GINTF `reset()`'s with value 0x0400_0021"] +impl crate::ResetValue for super::GINTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0400_0021 + } +} +#[doc = "Reader of field `COPM`"] +pub type COPM_R = crate::R; +#[doc = "Reader of field `MFIF`"] +pub type MFIF_R = crate::R; +#[doc = "Write proxy for field `MFIF`"] +pub struct MFIF_W<'a> { w: &'a mut W, } -impl<'a> _MFIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> MFIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _SOFW<'a> { +#[doc = "Reader of field `OTGIF`"] +pub type OTGIF_R = crate::R; +#[doc = "Reader of field `SOF`"] +pub type SOF_R = crate::R; +#[doc = "Write proxy for field `SOF`"] +pub struct SOF_W<'a> { w: &'a mut W, } -impl<'a> _SOFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SOF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _ESPW<'a> { +#[doc = "Reader of field `RXFNEIF`"] +pub type RXFNEIF_R = crate::R; +#[doc = "Reader of field `NPTXFEIF`"] +pub type NPTXFEIF_R = crate::R; +#[doc = "Reader of field `GNPINAK`"] +pub type GNPINAK_R = crate::R; +#[doc = "Reader of field `GONAK`"] +pub type GONAK_R = crate::R; +#[doc = "Reader of field `ESP`"] +pub type ESP_R = crate::R; +#[doc = "Write proxy for field `ESP`"] +pub struct ESP_W<'a> { w: &'a mut W, } -impl<'a> _ESPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ESP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _SPW<'a> { +#[doc = "Reader of field `SP`"] +pub type SP_R = crate::R; +#[doc = "Write proxy for field `SP`"] +pub struct SP_W<'a> { w: &'a mut W, } -impl<'a> _SPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _RSTW<'a> { +#[doc = "Reader of field `RST`"] +pub type RST_R = crate::R; +#[doc = "Write proxy for field `RST`"] +pub struct RST_W<'a> { w: &'a mut W, } -impl<'a> _RSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } -#[doc = r" Proxy"] -pub struct _ENUMFW<'a> { +#[doc = "Reader of field `ENUMF`"] +pub type ENUMF_R = crate::R; +#[doc = "Write proxy for field `ENUMF`"] +pub struct ENUMF_W<'a> { w: &'a mut W, } -impl<'a> _ENUMFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ENUMF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 13; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 13)) | (((value as u32) & 0x01) << 13); self.w } } -#[doc = r" Proxy"] -pub struct _ISOOPDIFW<'a> { +#[doc = "Reader of field `ISOOPDIF`"] +pub type ISOOPDIF_R = crate::R; +#[doc = "Write proxy for field `ISOOPDIF`"] +pub struct ISOOPDIF_W<'a> { w: &'a mut W, } -impl<'a> _ISOOPDIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ISOOPDIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 14; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 14)) | (((value as u32) & 0x01) << 14); self.w } } -#[doc = r" Proxy"] -pub struct _EOPFIFW<'a> { +#[doc = "Reader of field `EOPFIF`"] +pub type EOPFIF_R = crate::R; +#[doc = "Write proxy for field `EOPFIF`"] +pub struct EOPFIF_W<'a> { w: &'a mut W, } -impl<'a> _EOPFIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EOPFIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _ISOINCIFW<'a> { +#[doc = "Reader of field `IEPIF`"] +pub type IEPIF_R = crate::R; +#[doc = "Reader of field `OEPIF`"] +pub type OEPIF_R = crate::R; +#[doc = "Reader of field `ISOINCIF`"] +pub type ISOINCIF_R = crate::R; +#[doc = "Write proxy for field `ISOINCIF`"] +pub struct ISOINCIF_W<'a> { w: &'a mut W, } -impl<'a> _ISOINCIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ISOINCIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 20; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 20)) | (((value as u32) & 0x01) << 20); self.w } } -#[doc = r" Proxy"] -pub struct _PXNCIF_ISOONCIFW<'a> { +#[doc = "Reader of field `PXNCIF_ISOONCIF`"] +pub type PXNCIF_ISOONCIF_R = crate::R; +#[doc = "Write proxy for field `PXNCIF_ISOONCIF`"] +pub struct PXNCIF_ISOONCIF_W<'a> { w: &'a mut W, } -impl<'a> _PXNCIF_ISOONCIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PXNCIF_ISOONCIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 21; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 21)) | (((value as u32) & 0x01) << 21); self.w } } -#[doc = r" Proxy"] -pub struct _IDPSCW<'a> { +#[doc = "Reader of field `HPIF`"] +pub type HPIF_R = crate::R; +#[doc = "Reader of field `HCIF`"] +pub type HCIF_R = crate::R; +#[doc = "Reader of field `PTXFEIF`"] +pub type PTXFEIF_R = crate::R; +#[doc = "Reader of field `IDPSC`"] +pub type IDPSC_R = crate::R; +#[doc = "Write proxy for field `IDPSC`"] +pub struct IDPSC_W<'a> { w: &'a mut W, } -impl<'a> _IDPSCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> IDPSC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 28; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 28)) | (((value as u32) & 0x01) << 28); self.w } } -#[doc = r" Proxy"] -pub struct _DISCIFW<'a> { +#[doc = "Reader of field `DISCIF`"] +pub type DISCIF_R = crate::R; +#[doc = "Write proxy for field `DISCIF`"] +pub struct DISCIF_W<'a> { w: &'a mut W, } -impl<'a> _DISCIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DISCIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _SESIFW<'a> { +#[doc = "Reader of field `SESIF`"] +pub type SESIF_R = crate::R; +#[doc = "Write proxy for field `SESIF`"] +pub struct SESIF_W<'a> { w: &'a mut W, } -impl<'a> _SESIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SESIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _WKUPIFW<'a> { +#[doc = "Reader of field `WKUPIF`"] +pub type WKUPIF_R = crate::R; +#[doc = "Write proxy for field `WKUPIF`"] +pub struct WKUPIF_W<'a> { w: &'a mut W, } -impl<'a> _WKUPIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WKUPIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Current operation mode"] - #[inline] - pub fn copm(&self) -> COPMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - COPMR { bits } + #[inline(always)] + pub fn copm(&self) -> COPM_R { + COPM_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Mode fault interrupt flag"] - #[inline] - pub fn mfif(&self) -> MFIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - MFIFR { bits } + #[inline(always)] + pub fn mfif(&self) -> MFIF_R { + MFIF_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - OTG interrupt flag"] - #[inline] - pub fn otgif(&self) -> OTGIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OTGIFR { bits } + #[inline(always)] + pub fn otgif(&self) -> OTGIF_R { + OTGIF_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Start of frame"] - #[inline] - pub fn sof(&self) -> SOFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SOFR { bits } + #[inline(always)] + pub fn sof(&self) -> SOF_R { + SOF_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - RxFIFO non-empty interrupt flag"] - #[inline] - pub fn rxfneif(&self) -> RXFNEIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RXFNEIFR { bits } + #[inline(always)] + pub fn rxfneif(&self) -> RXFNEIF_R { + RXFNEIF_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - Non-periodic TxFIFO empty interrupt flag"] - #[inline] - pub fn nptxfeif(&self) -> NPTXFEIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NPTXFEIFR { bits } + #[inline(always)] + pub fn nptxfeif(&self) -> NPTXFEIF_R { + NPTXFEIF_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 6 - Global Non-Periodic IN NAK effective"] - #[inline] - pub fn gnpinak(&self) -> GNPINAKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GNPINAKR { bits } + #[inline(always)] + pub fn gnpinak(&self) -> GNPINAK_R { + GNPINAK_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Global OUT NAK effective"] - #[inline] - pub fn gonak(&self) -> GONAKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - GONAKR { bits } + #[inline(always)] + pub fn gonak(&self) -> GONAK_R { + GONAK_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 10 - Early suspend"] - #[inline] - pub fn esp(&self) -> ESPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ESPR { bits } + #[inline(always)] + pub fn esp(&self) -> ESP_R { + ESP_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - USB suspend"] - #[inline] - pub fn sp(&self) -> SPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SPR { bits } + #[inline(always)] + pub fn sp(&self) -> SP_R { + SP_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 12 - USB reset"] - #[inline] - pub fn rst(&self) -> RSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RSTR { bits } + #[inline(always)] + pub fn rst(&self) -> RST_R { + RST_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bit 13 - Enumeration finished"] - #[inline] - pub fn enumf(&self) -> ENUMFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 13; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ENUMFR { bits } + #[inline(always)] + pub fn enumf(&self) -> ENUMF_R { + ENUMF_R::new(((self.bits >> 13) & 0x01) != 0) } #[doc = "Bit 14 - Isochronous OUT packet dropped interrupt"] - #[inline] - pub fn isoopdif(&self) -> ISOOPDIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 14; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISOOPDIFR { bits } + #[inline(always)] + pub fn isoopdif(&self) -> ISOOPDIF_R { + ISOOPDIF_R::new(((self.bits >> 14) & 0x01) != 0) } #[doc = "Bit 15 - End of periodic frame interrupt flag"] - #[inline] - pub fn eopfif(&self) -> EOPFIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EOPFIFR { bits } + #[inline(always)] + pub fn eopfif(&self) -> EOPFIF_R { + EOPFIF_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 18 - IN endpoint interrupt flag"] - #[inline] - pub fn iepif(&self) -> IEPIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IEPIFR { bits } + #[inline(always)] + pub fn iepif(&self) -> IEPIF_R { + IEPIF_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - OUT endpoint interrupt flag"] - #[inline] - pub fn oepif(&self) -> OEPIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - OEPIFR { bits } + #[inline(always)] + pub fn oepif(&self) -> OEPIF_R { + OEPIF_R::new(((self.bits >> 19) & 0x01) != 0) } #[doc = "Bit 20 - Isochronous IN transfer Not Complete Interrupt Flag"] - #[inline] - pub fn isoincif(&self) -> ISOINCIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 20; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ISOINCIFR { bits } + #[inline(always)] + pub fn isoincif(&self) -> ISOINCIF_R { + ISOINCIF_R::new(((self.bits >> 20) & 0x01) != 0) } #[doc = "Bit 21 - periodic transfer not complete interrupt flag(Host mode)/isochronous OUT transfer not complete interrupt flag(Device mode)"] - #[inline] - pub fn pxncif_isooncif(&self) -> PXNCIF_ISOONCIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 21; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PXNCIF_ISOONCIFR { bits } + #[inline(always)] + pub fn pxncif_isooncif(&self) -> PXNCIF_ISOONCIF_R { + PXNCIF_ISOONCIF_R::new(((self.bits >> 21) & 0x01) != 0) } #[doc = "Bit 24 - Host port interrupt flag"] - #[inline] - pub fn hpif(&self) -> HPIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HPIFR { bits } + #[inline(always)] + pub fn hpif(&self) -> HPIF_R { + HPIF_R::new(((self.bits >> 24) & 0x01) != 0) } #[doc = "Bit 25 - Host channels interrupt flag"] - #[inline] - pub fn hcif(&self) -> HCIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 25; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HCIFR { bits } + #[inline(always)] + pub fn hcif(&self) -> HCIF_R { + HCIF_R::new(((self.bits >> 25) & 0x01) != 0) } #[doc = "Bit 26 - Periodic TxFIFO empty interrupt flag"] - #[inline] - pub fn ptxfeif(&self) -> PTXFEIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 26; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PTXFEIFR { bits } + #[inline(always)] + pub fn ptxfeif(&self) -> PTXFEIF_R { + PTXFEIF_R::new(((self.bits >> 26) & 0x01) != 0) } #[doc = "Bit 28 - ID pin status change"] - #[inline] - pub fn idpsc(&self) -> IDPSCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 28; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IDPSCR { bits } + #[inline(always)] + pub fn idpsc(&self) -> IDPSC_R { + IDPSC_R::new(((self.bits >> 28) & 0x01) != 0) } #[doc = "Bit 29 - Disconnect interrupt flag"] - #[inline] - pub fn discif(&self) -> DISCIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DISCIFR { bits } + #[inline(always)] + pub fn discif(&self) -> DISCIF_R { + DISCIF_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Session interrupt flag"] - #[inline] - pub fn sesif(&self) -> SESIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SESIFR { bits } + #[inline(always)] + pub fn sesif(&self) -> SESIF_R { + SESIF_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Wakeup interrupt flag"] - #[inline] - pub fn wkupif(&self) -> WKUPIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WKUPIFR { bits } + #[inline(always)] + pub fn wkupif(&self) -> WKUPIF_R { + WKUPIF_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0400_0021 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 1 - Mode fault interrupt flag"] - #[inline] - pub fn mfif(&mut self) -> _MFIFW { - _MFIFW { w: self } + #[inline(always)] + pub fn mfif(&mut self) -> MFIF_W { + MFIF_W { w: self } } #[doc = "Bit 3 - Start of frame"] - #[inline] - pub fn sof(&mut self) -> _SOFW { - _SOFW { w: self } + #[inline(always)] + pub fn sof(&mut self) -> SOF_W { + SOF_W { w: self } } #[doc = "Bit 10 - Early suspend"] - #[inline] - pub fn esp(&mut self) -> _ESPW { - _ESPW { w: self } + #[inline(always)] + pub fn esp(&mut self) -> ESP_W { + ESP_W { w: self } } #[doc = "Bit 11 - USB suspend"] - #[inline] - pub fn sp(&mut self) -> _SPW { - _SPW { w: self } + #[inline(always)] + pub fn sp(&mut self) -> SP_W { + SP_W { w: self } } #[doc = "Bit 12 - USB reset"] - #[inline] - pub fn rst(&mut self) -> _RSTW { - _RSTW { w: self } + #[inline(always)] + pub fn rst(&mut self) -> RST_W { + RST_W { w: self } } #[doc = "Bit 13 - Enumeration finished"] - #[inline] - pub fn enumf(&mut self) -> _ENUMFW { - _ENUMFW { w: self } + #[inline(always)] + pub fn enumf(&mut self) -> ENUMF_W { + ENUMF_W { w: self } } #[doc = "Bit 14 - Isochronous OUT packet dropped interrupt"] - #[inline] - pub fn isoopdif(&mut self) -> _ISOOPDIFW { - _ISOOPDIFW { w: self } + #[inline(always)] + pub fn isoopdif(&mut self) -> ISOOPDIF_W { + ISOOPDIF_W { w: self } } #[doc = "Bit 15 - End of periodic frame interrupt flag"] - #[inline] - pub fn eopfif(&mut self) -> _EOPFIFW { - _EOPFIFW { w: self } + #[inline(always)] + pub fn eopfif(&mut self) -> EOPFIF_W { + EOPFIF_W { w: self } } #[doc = "Bit 20 - Isochronous IN transfer Not Complete Interrupt Flag"] - #[inline] - pub fn isoincif(&mut self) -> _ISOINCIFW { - _ISOINCIFW { w: self } + #[inline(always)] + pub fn isoincif(&mut self) -> ISOINCIF_W { + ISOINCIF_W { w: self } } #[doc = "Bit 21 - periodic transfer not complete interrupt flag(Host mode)/isochronous OUT transfer not complete interrupt flag(Device mode)"] - #[inline] - pub fn pxncif_isooncif(&mut self) -> _PXNCIF_ISOONCIFW { - _PXNCIF_ISOONCIFW { w: self } + #[inline(always)] + pub fn pxncif_isooncif(&mut self) -> PXNCIF_ISOONCIF_W { + PXNCIF_ISOONCIF_W { w: self } } #[doc = "Bit 28 - ID pin status change"] - #[inline] - pub fn idpsc(&mut self) -> _IDPSCW { - _IDPSCW { w: self } + #[inline(always)] + pub fn idpsc(&mut self) -> IDPSC_W { + IDPSC_W { w: self } } #[doc = "Bit 29 - Disconnect interrupt flag"] - #[inline] - pub fn discif(&mut self) -> _DISCIFW { - _DISCIFW { w: self } + #[inline(always)] + pub fn discif(&mut self) -> DISCIF_W { + DISCIF_W { w: self } } #[doc = "Bit 30 - Session interrupt flag"] - #[inline] - pub fn sesif(&mut self) -> _SESIFW { - _SESIFW { w: self } + #[inline(always)] + pub fn sesif(&mut self) -> SESIF_W { + SESIF_W { w: self } } #[doc = "Bit 31 - Wakeup interrupt flag"] - #[inline] - pub fn wkupif(&mut self) -> _WKUPIFW { - _WKUPIFW { w: self } + #[inline(always)] + pub fn wkupif(&mut self) -> WKUPIF_W { + WKUPIF_W { w: self } } } diff --git a/src/usbfs_global/gotgcs.rs b/src/usbfs_global/gotgcs.rs index b2bff8f2979dde9cfc218f2c00cecb3f926a6e9e..62fdef48eed41e437e632f7e2864592a11cfec2c 100644 --- a/src/usbfs_global/gotgcs.rs +++ b/src/usbfs_global/gotgcs.rs @@ -1,486 +1,194 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::GOTGCS { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SRPSR { - bits: bool, -} -impl SRPSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SRPREQR { - bits: bool, -} -impl SRPREQR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HNPSR { - bits: bool, -} -impl HNPSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HNPREQR { - bits: bool, -} -impl HNPREQR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HHNPENR { - bits: bool, -} -impl HHNPENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DHNPENR { - bits: bool, -} -impl DHNPENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct IDPSR { - bits: bool, -} -impl IDPSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DIR { - bits: bool, -} -impl DIR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ASVR { - bits: bool, -} -impl ASVR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BSVR { - bits: bool, -} -impl BSVR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _SRPREQW<'a> { +#[doc = "Reader of register GOTGCS"] +pub type R = crate::R; +#[doc = "Writer for register GOTGCS"] +pub type W = crate::W; +#[doc = "Register GOTGCS `reset()`'s with value 0x0800"] +impl crate::ResetValue for super::GOTGCS { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0800 + } +} +#[doc = "Reader of field `SRPS`"] +pub type SRPS_R = crate::R; +#[doc = "Reader of field `SRPREQ`"] +pub type SRPREQ_R = crate::R; +#[doc = "Write proxy for field `SRPREQ`"] +pub struct SRPREQ_W<'a> { w: &'a mut W, } -impl<'a> _SRPREQW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SRPREQ_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _HNPREQW<'a> { +#[doc = "Reader of field `HNPS`"] +pub type HNPS_R = crate::R; +#[doc = "Reader of field `HNPREQ`"] +pub type HNPREQ_R = crate::R; +#[doc = "Write proxy for field `HNPREQ`"] +pub struct HNPREQ_W<'a> { w: &'a mut W, } -impl<'a> _HNPREQW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HNPREQ_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _HHNPENW<'a> { +#[doc = "Reader of field `HHNPEN`"] +pub type HHNPEN_R = crate::R; +#[doc = "Write proxy for field `HHNPEN`"] +pub struct HHNPEN_W<'a> { w: &'a mut W, } -impl<'a> _HHNPENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HHNPEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _DHNPENW<'a> { +#[doc = "Reader of field `DHNPEN`"] +pub type DHNPEN_R = crate::R; +#[doc = "Write proxy for field `DHNPEN`"] +pub struct DHNPEN_W<'a> { w: &'a mut W, } -impl<'a> _DHNPENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DHNPEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 11)) | (((value as u32) & 0x01) << 11); self.w } } +#[doc = "Reader of field `IDPS`"] +pub type IDPS_R = crate::R; +#[doc = "Reader of field `DI`"] +pub type DI_R = crate::R; +#[doc = "Reader of field `ASV`"] +pub type ASV_R = crate::R; +#[doc = "Reader of field `BSV`"] +pub type BSV_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - SRP success"] - #[inline] - pub fn srps(&self) -> SRPSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SRPSR { bits } + #[inline(always)] + pub fn srps(&self) -> SRPS_R { + SRPS_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - SRP request"] - #[inline] - pub fn srpreq(&self) -> SRPREQR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SRPREQR { bits } + #[inline(always)] + pub fn srpreq(&self) -> SRPREQ_R { + SRPREQ_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 8 - Host success"] - #[inline] - pub fn hnps(&self) -> HNPSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HNPSR { bits } + #[inline(always)] + pub fn hnps(&self) -> HNPS_R { + HNPS_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - HNP request"] - #[inline] - pub fn hnpreq(&self) -> HNPREQR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HNPREQR { bits } + #[inline(always)] + pub fn hnpreq(&self) -> HNPREQ_R { + HNPREQ_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Host HNP enable"] - #[inline] - pub fn hhnpen(&self) -> HHNPENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HHNPENR { bits } + #[inline(always)] + pub fn hhnpen(&self) -> HHNPEN_R { + HHNPEN_R::new(((self.bits >> 10) & 0x01) != 0) } #[doc = "Bit 11 - Device HNP enabled"] - #[inline] - pub fn dhnpen(&self) -> DHNPENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DHNPENR { bits } + #[inline(always)] + pub fn dhnpen(&self) -> DHNPEN_R { + DHNPEN_R::new(((self.bits >> 11) & 0x01) != 0) } #[doc = "Bit 16 - ID pin status"] - #[inline] - pub fn idps(&self) -> IDPSR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - IDPSR { bits } + #[inline(always)] + pub fn idps(&self) -> IDPS_R { + IDPS_R::new(((self.bits >> 16) & 0x01) != 0) } #[doc = "Bit 17 - Debounce interval"] - #[inline] - pub fn di(&self) -> DIR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DIR { bits } + #[inline(always)] + pub fn di(&self) -> DI_R { + DI_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - A-session valid"] - #[inline] - pub fn asv(&self) -> ASVR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ASVR { bits } + #[inline(always)] + pub fn asv(&self) -> ASV_R { + ASV_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - B-session valid"] - #[inline] - pub fn bsv(&self) -> BSVR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BSVR { bits } + #[inline(always)] + pub fn bsv(&self) -> BSV_R { + BSV_R::new(((self.bits >> 19) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0800 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 1 - SRP request"] - #[inline] - pub fn srpreq(&mut self) -> _SRPREQW { - _SRPREQW { w: self } + #[inline(always)] + pub fn srpreq(&mut self) -> SRPREQ_W { + SRPREQ_W { w: self } } #[doc = "Bit 9 - HNP request"] - #[inline] - pub fn hnpreq(&mut self) -> _HNPREQW { - _HNPREQW { w: self } + #[inline(always)] + pub fn hnpreq(&mut self) -> HNPREQ_W { + HNPREQ_W { w: self } } #[doc = "Bit 10 - Host HNP enable"] - #[inline] - pub fn hhnpen(&mut self) -> _HHNPENW { - _HHNPENW { w: self } + #[inline(always)] + pub fn hhnpen(&mut self) -> HHNPEN_W { + HHNPEN_W { w: self } } #[doc = "Bit 11 - Device HNP enabled"] - #[inline] - pub fn dhnpen(&mut self) -> _DHNPENW { - _DHNPENW { w: self } + #[inline(always)] + pub fn dhnpen(&mut self) -> DHNPEN_W { + DHNPEN_W { w: self } } } diff --git a/src/usbfs_global/gotgintf.rs b/src/usbfs_global/gotgintf.rs index 70397cb86c0037454862f6abfda993c52ec7b2ce..81f4a77f2ce775de6a0983e81d3df95d686ac718 100644 --- a/src/usbfs_global/gotgintf.rs +++ b/src/usbfs_global/gotgintf.rs @@ -1,418 +1,220 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::GOTGINTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SESENDR { - bits: bool, -} -impl SESENDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SRPENDR { - bits: bool, -} -impl SRPENDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HNPENDR { - bits: bool, -} -impl HNPENDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HNPDETR { - bits: bool, -} -impl HNPDETR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ADTOR { - bits: bool, -} -impl ADTOR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DFR { - bits: bool, -} -impl DFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _SESENDW<'a> { +#[doc = "Reader of register GOTGINTF"] +pub type R = crate::R; +#[doc = "Writer for register GOTGINTF"] +pub type W = crate::W; +#[doc = "Register GOTGINTF `reset()`'s with value 0"] +impl crate::ResetValue for super::GOTGINTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `SESEND`"] +pub type SESEND_R = crate::R; +#[doc = "Write proxy for field `SESEND`"] +pub struct SESEND_W<'a> { w: &'a mut W, } -impl<'a> _SESENDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SESEND_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _SRPENDW<'a> { +#[doc = "Reader of field `SRPEND`"] +pub type SRPEND_R = crate::R; +#[doc = "Write proxy for field `SRPEND`"] +pub struct SRPEND_W<'a> { w: &'a mut W, } -impl<'a> _SRPENDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SRPEND_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _HNPENDW<'a> { +#[doc = "Reader of field `HNPEND`"] +pub type HNPEND_R = crate::R; +#[doc = "Write proxy for field `HNPEND`"] +pub struct HNPEND_W<'a> { w: &'a mut W, } -impl<'a> _HNPENDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HNPEND_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _HNPDETW<'a> { +#[doc = "Reader of field `HNPDET`"] +pub type HNPDET_R = crate::R; +#[doc = "Write proxy for field `HNPDET`"] +pub struct HNPDET_W<'a> { w: &'a mut W, } -impl<'a> _HNPDETW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HNPDET_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _ADTOW<'a> { +#[doc = "Reader of field `ADTO`"] +pub type ADTO_R = crate::R; +#[doc = "Write proxy for field `ADTO`"] +pub struct ADTO_W<'a> { w: &'a mut W, } -impl<'a> _ADTOW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ADTO_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 18)) | (((value as u32) & 0x01) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _DFW<'a> { +#[doc = "Reader of field `DF`"] +pub type DF_R = crate::R; +#[doc = "Write proxy for field `DF`"] +pub struct DF_W<'a> { w: &'a mut W, } -impl<'a> _DFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 19)) | (((value as u32) & 0x01) << 19); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 2 - Session end"] - #[inline] - pub fn sesend(&self) -> SESENDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SESENDR { bits } + #[inline(always)] + pub fn sesend(&self) -> SESEND_R { + SESEND_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 8 - Session request success status change"] - #[inline] - pub fn srpend(&self) -> SRPENDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SRPENDR { bits } + #[inline(always)] + pub fn srpend(&self) -> SRPEND_R { + SRPEND_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - HNP end"] - #[inline] - pub fn hnpend(&self) -> HNPENDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HNPENDR { bits } + #[inline(always)] + pub fn hnpend(&self) -> HNPEND_R { + HNPEND_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 17 - Host negotiation request detected"] - #[inline] - pub fn hnpdet(&self) -> HNPDETR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HNPDETR { bits } + #[inline(always)] + pub fn hnpdet(&self) -> HNPDET_R { + HNPDET_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bit 18 - A-device timeout"] - #[inline] - pub fn adto(&self) -> ADTOR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ADTOR { bits } + #[inline(always)] + pub fn adto(&self) -> ADTO_R { + ADTO_R::new(((self.bits >> 18) & 0x01) != 0) } #[doc = "Bit 19 - Debounce finish"] - #[inline] - pub fn df(&self) -> DFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DFR { bits } + #[inline(always)] + pub fn df(&self) -> DF_R { + DF_R::new(((self.bits >> 19) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 2 - Session end"] - #[inline] - pub fn sesend(&mut self) -> _SESENDW { - _SESENDW { w: self } + #[inline(always)] + pub fn sesend(&mut self) -> SESEND_W { + SESEND_W { w: self } } #[doc = "Bit 8 - Session request success status change"] - #[inline] - pub fn srpend(&mut self) -> _SRPENDW { - _SRPENDW { w: self } + #[inline(always)] + pub fn srpend(&mut self) -> SRPEND_W { + SRPEND_W { w: self } } #[doc = "Bit 9 - HNP end"] - #[inline] - pub fn hnpend(&mut self) -> _HNPENDW { - _HNPENDW { w: self } + #[inline(always)] + pub fn hnpend(&mut self) -> HNPEND_W { + HNPEND_W { w: self } } #[doc = "Bit 17 - Host negotiation request detected"] - #[inline] - pub fn hnpdet(&mut self) -> _HNPDETW { - _HNPDETW { w: self } + #[inline(always)] + pub fn hnpdet(&mut self) -> HNPDET_W { + HNPDET_W { w: self } } #[doc = "Bit 18 - A-device timeout"] - #[inline] - pub fn adto(&mut self) -> _ADTOW { - _ADTOW { w: self } + #[inline(always)] + pub fn adto(&mut self) -> ADTO_W { + ADTO_W { w: self } } #[doc = "Bit 19 - Debounce finish"] - #[inline] - pub fn df(&mut self) -> _DFW { - _DFW { w: self } + #[inline(always)] + pub fn df(&mut self) -> DF_W { + DF_W { w: self } } } diff --git a/src/usbfs_global/grflen.rs b/src/usbfs_global/grflen.rs index 38ea2fccc82fe56914d0d0bd77fd00ed9c4cba65..4f9a37eb785e74a2e22cc04ab00e5eeabd778b31 100644 --- a/src/usbfs_global/grflen.rs +++ b/src/usbfs_global/grflen.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::GRFLEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct RXFDR { - bits: u16, -} -impl RXFDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _RXFDW<'a> { +#[doc = "Reader of register GRFLEN"] +pub type R = crate::R; +#[doc = "Writer for register GRFLEN"] +pub type W = crate::W; +#[doc = "Register GRFLEN `reset()`'s with value 0x0200"] +impl crate::ResetValue for super::GRFLEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0200 + } +} +#[doc = "Reader of field `RXFD`"] +pub type RXFD_R = crate::R; +#[doc = "Write proxy for field `RXFD`"] +pub struct RXFD_W<'a> { w: &'a mut W, } -impl<'a> _RXFDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> RXFD_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Rx FIFO depth"] - #[inline] - pub fn rxfd(&self) -> RXFDR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - RXFDR { bits } + #[inline(always)] + pub fn rxfd(&self) -> RXFD_R { + RXFD_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0200 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Rx FIFO depth"] - #[inline] - pub fn rxfd(&mut self) -> _RXFDW { - _RXFDW { w: self } + #[inline(always)] + pub fn rxfd(&mut self) -> RXFD_W { + RXFD_W { w: self } } } diff --git a/src/usbfs_global/grstatp_device.rs b/src/usbfs_global/grstatp_device.rs index 116d749fbe864172c71d8fe28d0ed5bd26603ba5..534c1eeaaa1c67e6c97dfda1645a191a130e7712 100644 --- a/src/usbfs_global/grstatp_device.rs +++ b/src/usbfs_global/grstatp_device.rs @@ -1,104 +1,32 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::GRSTATP_DEVICE { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct EPNUMR { - bits: u8, -} -impl EPNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct BCOUNTR { - bits: u16, -} -impl BCOUNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DPIDR { - bits: u8, -} -impl DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RPCKSTR { - bits: u8, -} -impl RPCKSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} +#[doc = "Reader of register GRSTATP_Device"] +pub type R = crate::R; +#[doc = "Reader of field `EPNUM`"] +pub type EPNUM_R = crate::R; +#[doc = "Reader of field `BCOUNT`"] +pub type BCOUNT_R = crate::R; +#[doc = "Reader of field `DPID`"] +pub type DPID_R = crate::R; +#[doc = "Reader of field `RPCKST`"] +pub type RPCKST_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:3 - Endpoint number"] - #[inline] - pub fn epnum(&self) -> EPNUMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPNUMR { bits } + #[inline(always)] + pub fn epnum(&self) -> EPNUM_R { + EPNUM_R::new((self.bits & 0x0f) as u8) } #[doc = "Bits 4:14 - Byte count"] - #[inline] - pub fn bcount(&self) -> BCOUNTR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - BCOUNTR { bits } + #[inline(always)] + pub fn bcount(&self) -> BCOUNT_R { + BCOUNT_R::new(((self.bits >> 4) & 0x07ff) as u16) } #[doc = "Bits 15:16 - Data PID"] - #[inline] - pub fn dpid(&self) -> DPIDR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DPIDR { bits } + #[inline(always)] + pub fn dpid(&self) -> DPID_R { + DPID_R::new(((self.bits >> 15) & 0x03) as u8) } #[doc = "Bits 17:20 - Recieve packet status"] - #[inline] - pub fn rpckst(&self) -> RPCKSTR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RPCKSTR { bits } + #[inline(always)] + pub fn rpckst(&self) -> RPCKST_R { + RPCKST_R::new(((self.bits >> 17) & 0x0f) as u8) } } diff --git a/src/usbfs_global/grstatp_host.rs b/src/usbfs_global/grstatp_host.rs index b8e18a911eb81fc29ca914d3aa91d15969c1e9c5..411fd1f023ab65d0872fd4c8b62031487b13d6f5 100644 --- a/src/usbfs_global/grstatp_host.rs +++ b/src/usbfs_global/grstatp_host.rs @@ -1,104 +1,32 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::GRSTATP_HOST { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct CNUMR { - bits: u8, -} -impl CNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct BCOUNTR { - bits: u16, -} -impl BCOUNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DPIDR { - bits: u8, -} -impl DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RPCKSTR { - bits: u8, -} -impl RPCKSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} +#[doc = "Reader of register GRSTATP_Host"] +pub type R = crate::R; +#[doc = "Reader of field `CNUM`"] +pub type CNUM_R = crate::R; +#[doc = "Reader of field `BCOUNT`"] +pub type BCOUNT_R = crate::R; +#[doc = "Reader of field `DPID`"] +pub type DPID_R = crate::R; +#[doc = "Reader of field `RPCKST`"] +pub type RPCKST_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:3 - Channel number"] - #[inline] - pub fn cnum(&self) -> CNUMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CNUMR { bits } + #[inline(always)] + pub fn cnum(&self) -> CNUM_R { + CNUM_R::new((self.bits & 0x0f) as u8) } #[doc = "Bits 4:14 - Byte count"] - #[inline] - pub fn bcount(&self) -> BCOUNTR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - BCOUNTR { bits } + #[inline(always)] + pub fn bcount(&self) -> BCOUNT_R { + BCOUNT_R::new(((self.bits >> 4) & 0x07ff) as u16) } #[doc = "Bits 15:16 - Data PID"] - #[inline] - pub fn dpid(&self) -> DPIDR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DPIDR { bits } + #[inline(always)] + pub fn dpid(&self) -> DPID_R { + DPID_R::new(((self.bits >> 15) & 0x03) as u8) } #[doc = "Bits 17:20 - Reivece packet status"] - #[inline] - pub fn rpckst(&self) -> RPCKSTR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RPCKSTR { bits } + #[inline(always)] + pub fn rpckst(&self) -> RPCKST_R { + RPCKST_R::new(((self.bits >> 17) & 0x0f) as u8) } } diff --git a/src/usbfs_global/grstatr_device.rs b/src/usbfs_global/grstatr_device.rs index b99d91c9595dd1fbe7766ce7fd7e080120613921..e843b9f4302950278392678840385fa86dfc7940 100644 --- a/src/usbfs_global/grstatr_device.rs +++ b/src/usbfs_global/grstatr_device.rs @@ -1,104 +1,32 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::GRSTATR_DEVICE { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct EPNUMR { - bits: u8, -} -impl EPNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct BCOUNTR { - bits: u16, -} -impl BCOUNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DPIDR { - bits: u8, -} -impl DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RPCKSTR { - bits: u8, -} -impl RPCKSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} +#[doc = "Reader of register GRSTATR_Device"] +pub type R = crate::R; +#[doc = "Reader of field `EPNUM`"] +pub type EPNUM_R = crate::R; +#[doc = "Reader of field `BCOUNT`"] +pub type BCOUNT_R = crate::R; +#[doc = "Reader of field `DPID`"] +pub type DPID_R = crate::R; +#[doc = "Reader of field `RPCKST`"] +pub type RPCKST_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:3 - Endpoint number"] - #[inline] - pub fn epnum(&self) -> EPNUMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPNUMR { bits } + #[inline(always)] + pub fn epnum(&self) -> EPNUM_R { + EPNUM_R::new((self.bits & 0x0f) as u8) } #[doc = "Bits 4:14 - Byte count"] - #[inline] - pub fn bcount(&self) -> BCOUNTR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - BCOUNTR { bits } + #[inline(always)] + pub fn bcount(&self) -> BCOUNT_R { + BCOUNT_R::new(((self.bits >> 4) & 0x07ff) as u16) } #[doc = "Bits 15:16 - Data PID"] - #[inline] - pub fn dpid(&self) -> DPIDR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DPIDR { bits } + #[inline(always)] + pub fn dpid(&self) -> DPID_R { + DPID_R::new(((self.bits >> 15) & 0x03) as u8) } #[doc = "Bits 17:20 - Recieve packet status"] - #[inline] - pub fn rpckst(&self) -> RPCKSTR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RPCKSTR { bits } + #[inline(always)] + pub fn rpckst(&self) -> RPCKST_R { + RPCKST_R::new(((self.bits >> 17) & 0x0f) as u8) } } diff --git a/src/usbfs_global/grstatr_host.rs b/src/usbfs_global/grstatr_host.rs index d140811a82d7ee827a7d7c0f095d263a84012f96..3f75e71aa8bd8fb91640c1e150bfab696e3b32ac 100644 --- a/src/usbfs_global/grstatr_host.rs +++ b/src/usbfs_global/grstatr_host.rs @@ -1,104 +1,32 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::GRSTATR_HOST { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct CNUMR { - bits: u8, -} -impl CNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct BCOUNTR { - bits: u16, -} -impl BCOUNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DPIDR { - bits: u8, -} -impl DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct RPCKSTR { - bits: u8, -} -impl RPCKSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} +#[doc = "Reader of register GRSTATR_Host"] +pub type R = crate::R; +#[doc = "Reader of field `CNUM`"] +pub type CNUM_R = crate::R; +#[doc = "Reader of field `BCOUNT`"] +pub type BCOUNT_R = crate::R; +#[doc = "Reader of field `DPID`"] +pub type DPID_R = crate::R; +#[doc = "Reader of field `RPCKST`"] +pub type RPCKST_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:3 - Channel number"] - #[inline] - pub fn cnum(&self) -> CNUMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CNUMR { bits } + #[inline(always)] + pub fn cnum(&self) -> CNUM_R { + CNUM_R::new((self.bits & 0x0f) as u8) } #[doc = "Bits 4:14 - Byte count"] - #[inline] - pub fn bcount(&self) -> BCOUNTR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - BCOUNTR { bits } + #[inline(always)] + pub fn bcount(&self) -> BCOUNT_R { + BCOUNT_R::new(((self.bits >> 4) & 0x07ff) as u16) } #[doc = "Bits 15:16 - Data PID"] - #[inline] - pub fn dpid(&self) -> DPIDR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DPIDR { bits } + #[inline(always)] + pub fn dpid(&self) -> DPID_R { + DPID_R::new(((self.bits >> 15) & 0x03) as u8) } #[doc = "Bits 17:20 - Reivece packet status"] - #[inline] - pub fn rpckst(&self) -> RPCKSTR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - RPCKSTR { bits } + #[inline(always)] + pub fn rpckst(&self) -> RPCKST_R { + RPCKST_R::new(((self.bits >> 17) & 0x0f) as u8) } } diff --git a/src/usbfs_global/grstctl.rs b/src/usbfs_global/grstctl.rs index e8cc1f8a2a2690e538c18720cd655f771e53f08c..242ff1d6f2fad15a9e05cfbc81d88b193385f631 100644 --- a/src/usbfs_global/grstctl.rs +++ b/src/usbfs_global/grstctl.rs @@ -1,400 +1,210 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::GRSTCTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CSRSTR { - bits: bool, -} -impl CSRSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HCSRSTR { - bits: bool, -} -impl HCSRSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HFCRSTR { - bits: bool, -} -impl HFCRSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct RXFFR { - bits: bool, -} -impl RXFFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TXFFR { - bits: bool, -} -impl TXFFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct TXFNUMR { - bits: u8, -} -impl TXFNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CSRSTW<'a> { +#[doc = "Reader of register GRSTCTL"] +pub type R = crate::R; +#[doc = "Writer for register GRSTCTL"] +pub type W = crate::W; +#[doc = "Register GRSTCTL `reset()`'s with value 0x8000_0000"] +impl crate::ResetValue for super::GRSTCTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x8000_0000 + } +} +#[doc = "Reader of field `CSRST`"] +pub type CSRST_R = crate::R; +#[doc = "Write proxy for field `CSRST`"] +pub struct CSRST_W<'a> { w: &'a mut W, } -impl<'a> _CSRSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CSRST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _HCSRSTW<'a> { +#[doc = "Reader of field `HCSRST`"] +pub type HCSRST_R = crate::R; +#[doc = "Write proxy for field `HCSRST`"] +pub struct HCSRST_W<'a> { w: &'a mut W, } -impl<'a> _HCSRSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HCSRST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _HFCRSTW<'a> { +#[doc = "Reader of field `HFCRST`"] +pub type HFCRST_R = crate::R; +#[doc = "Write proxy for field `HFCRST`"] +pub struct HFCRST_W<'a> { w: &'a mut W, } -impl<'a> _HFCRSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HFCRST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _RXFFW<'a> { +#[doc = "Reader of field `RXFF`"] +pub type RXFF_R = crate::R; +#[doc = "Write proxy for field `RXFF`"] +pub struct RXFF_W<'a> { w: &'a mut W, } -impl<'a> _RXFFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> RXFF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _TXFFW<'a> { +#[doc = "Reader of field `TXFF`"] +pub type TXFF_R = crate::R; +#[doc = "Write proxy for field `TXFF`"] +pub struct TXFF_W<'a> { w: &'a mut W, } -impl<'a> _TXFFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TXFF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _TXFNUMW<'a> { +#[doc = "Reader of field `TXFNUM`"] +pub type TXFNUM_R = crate::R; +#[doc = "Write proxy for field `TXFNUM`"] +pub struct TXFNUM_W<'a> { w: &'a mut W, } -impl<'a> _TXFNUMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TXFNUM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x1f << 6)) | (((value as u32) & 0x1f) << 6); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Core soft reset"] - #[inline] - pub fn csrst(&self) -> CSRSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CSRSTR { bits } + #[inline(always)] + pub fn csrst(&self) -> CSRST_R { + CSRST_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - HCLK soft reset"] - #[inline] - pub fn hcsrst(&self) -> HCSRSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HCSRSTR { bits } + #[inline(always)] + pub fn hcsrst(&self) -> HCSRST_R { + HCSRST_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Host frame counter reset"] - #[inline] - pub fn hfcrst(&self) -> HFCRSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HFCRSTR { bits } + #[inline(always)] + pub fn hfcrst(&self) -> HFCRST_R { + HFCRST_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 4 - RxFIFO flush"] - #[inline] - pub fn rxff(&self) -> RXFFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - RXFFR { bits } + #[inline(always)] + pub fn rxff(&self) -> RXFF_R { + RXFF_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - TxFIFO flush"] - #[inline] - pub fn txff(&self) -> TXFFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TXFFR { bits } + #[inline(always)] + pub fn txff(&self) -> TXFF_R { + TXFF_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bits 6:10 - TxFIFO number"] - #[inline] - pub fn txfnum(&self) -> TXFNUMR { - let bits = { - const MASK: u8 = 0x1f; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - TXFNUMR { bits } + #[inline(always)] + pub fn txfnum(&self) -> TXFNUM_R { + TXFNUM_R::new(((self.bits >> 6) & 0x1f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x8000_0000 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Core soft reset"] - #[inline] - pub fn csrst(&mut self) -> _CSRSTW { - _CSRSTW { w: self } + #[inline(always)] + pub fn csrst(&mut self) -> CSRST_W { + CSRST_W { w: self } } #[doc = "Bit 1 - HCLK soft reset"] - #[inline] - pub fn hcsrst(&mut self) -> _HCSRSTW { - _HCSRSTW { w: self } + #[inline(always)] + pub fn hcsrst(&mut self) -> HCSRST_W { + HCSRST_W { w: self } } #[doc = "Bit 2 - Host frame counter reset"] - #[inline] - pub fn hfcrst(&mut self) -> _HFCRSTW { - _HFCRSTW { w: self } + #[inline(always)] + pub fn hfcrst(&mut self) -> HFCRST_W { + HFCRST_W { w: self } } #[doc = "Bit 4 - RxFIFO flush"] - #[inline] - pub fn rxff(&mut self) -> _RXFFW { - _RXFFW { w: self } + #[inline(always)] + pub fn rxff(&mut self) -> RXFF_W { + RXFF_W { w: self } } #[doc = "Bit 5 - TxFIFO flush"] - #[inline] - pub fn txff(&mut self) -> _TXFFW { - _TXFFW { w: self } + #[inline(always)] + pub fn txff(&mut self) -> TXFF_W { + TXFF_W { w: self } } #[doc = "Bits 6:10 - TxFIFO number"] - #[inline] - pub fn txfnum(&mut self) -> _TXFNUMW { - _TXFNUMW { w: self } + #[inline(always)] + pub fn txfnum(&mut self) -> TXFNUM_W { + TXFNUM_W { w: self } } } diff --git a/src/usbfs_global/gusbcs.rs b/src/usbfs_global/gusbcs.rs index d36d8e82a20a4f6127eb18558a7d520afc153839..df73f52657492553f7a68f2caf9fb715c29220a9 100644 --- a/src/usbfs_global/gusbcs.rs +++ b/src/usbfs_global/gusbcs.rs @@ -1,382 +1,200 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::GUSBCS { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TOCR { - bits: u8, -} -impl TOCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct SRPCENR { - bits: bool, -} -impl SRPCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct HNPCENR { - bits: bool, -} -impl HNPCENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct UTTR { - bits: u8, -} -impl UTTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct FHMR { - bits: bool, -} -impl FHMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct FDMR { - bits: bool, -} -impl FDMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TOCW<'a> { +#[doc = "Reader of register GUSBCS"] +pub type R = crate::R; +#[doc = "Writer for register GUSBCS"] +pub type W = crate::W; +#[doc = "Register GUSBCS `reset()`'s with value 0x0a80"] +impl crate::ResetValue for super::GUSBCS { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0a80 + } +} +#[doc = "Reader of field `TOC`"] +pub type TOC_R = crate::R; +#[doc = "Write proxy for field `TOC`"] +pub struct TOC_W<'a> { w: &'a mut W, } -impl<'a> _TOCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TOC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07) | ((value as u32) & 0x07); self.w } } -#[doc = r" Proxy"] -pub struct _SRPCENW<'a> { +#[doc = "Reader of field `SRPCEN`"] +pub type SRPCEN_R = crate::R; +#[doc = "Write proxy for field `SRPCEN`"] +pub struct SRPCEN_W<'a> { w: &'a mut W, } -impl<'a> _SRPCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SRPCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _HNPCENW<'a> { +#[doc = "Reader of field `HNPCEN`"] +pub type HNPCEN_R = crate::R; +#[doc = "Write proxy for field `HNPCEN`"] +pub struct HNPCEN_W<'a> { w: &'a mut W, } -impl<'a> _HNPCENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> HNPCEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _UTTW<'a> { +#[doc = "Reader of field `UTT`"] +pub type UTT_R = crate::R; +#[doc = "Write proxy for field `UTT`"] +pub struct UTT_W<'a> { w: &'a mut W, } -impl<'a> _UTTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> UTT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 10)) | (((value as u32) & 0x0f) << 10); self.w } } -#[doc = r" Proxy"] -pub struct _FHMW<'a> { +#[doc = "Reader of field `FHM`"] +pub type FHM_R = crate::R; +#[doc = "Write proxy for field `FHM`"] +pub struct FHM_W<'a> { w: &'a mut W, } -impl<'a> _FHMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FHM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _FDMW<'a> { +#[doc = "Reader of field `FDM`"] +pub type FDM_R = crate::R; +#[doc = "Write proxy for field `FDM`"] +pub struct FDM_W<'a> { w: &'a mut W, } -impl<'a> _FDMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> FDM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:2 - Timeout calibration"] - #[inline] - pub fn toc(&self) -> TOCR { - let bits = { - const MASK: u8 = 0x07; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - TOCR { bits } + #[inline(always)] + pub fn toc(&self) -> TOC_R { + TOC_R::new((self.bits & 0x07) as u8) } #[doc = "Bit 8 - SRP capability enable"] - #[inline] - pub fn srpcen(&self) -> SRPCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SRPCENR { bits } + #[inline(always)] + pub fn srpcen(&self) -> SRPCEN_R { + SRPCEN_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - HNP capability enable"] - #[inline] - pub fn hnpcen(&self) -> HNPCENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - HNPCENR { bits } + #[inline(always)] + pub fn hnpcen(&self) -> HNPCEN_R { + HNPCEN_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bits 10:13 - USB turnaround time"] - #[inline] - pub fn utt(&self) -> UTTR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - UTTR { bits } + #[inline(always)] + pub fn utt(&self) -> UTT_R { + UTT_R::new(((self.bits >> 10) & 0x0f) as u8) } #[doc = "Bit 29 - Force host mode"] - #[inline] - pub fn fhm(&self) -> FHMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FHMR { bits } + #[inline(always)] + pub fn fhm(&self) -> FHM_R { + FHM_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Force device mode"] - #[inline] - pub fn fdm(&self) -> FDMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - FDMR { bits } + #[inline(always)] + pub fn fdm(&self) -> FDM_R { + FDM_R::new(((self.bits >> 30) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0a80 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:2 - Timeout calibration"] - #[inline] - pub fn toc(&mut self) -> _TOCW { - _TOCW { w: self } + #[inline(always)] + pub fn toc(&mut self) -> TOC_W { + TOC_W { w: self } } #[doc = "Bit 8 - SRP capability enable"] - #[inline] - pub fn srpcen(&mut self) -> _SRPCENW { - _SRPCENW { w: self } + #[inline(always)] + pub fn srpcen(&mut self) -> SRPCEN_W { + SRPCEN_W { w: self } } #[doc = "Bit 9 - HNP capability enable"] - #[inline] - pub fn hnpcen(&mut self) -> _HNPCENW { - _HNPCENW { w: self } + #[inline(always)] + pub fn hnpcen(&mut self) -> HNPCEN_W { + HNPCEN_W { w: self } } #[doc = "Bits 10:13 - USB turnaround time"] - #[inline] - pub fn utt(&mut self) -> _UTTW { - _UTTW { w: self } + #[inline(always)] + pub fn utt(&mut self) -> UTT_W { + UTT_W { w: self } } #[doc = "Bit 29 - Force host mode"] - #[inline] - pub fn fhm(&mut self) -> _FHMW { - _FHMW { w: self } + #[inline(always)] + pub fn fhm(&mut self) -> FHM_W { + FHM_W { w: self } } #[doc = "Bit 30 - Force device mode"] - #[inline] - pub fn fdm(&mut self) -> _FDMW { - _FDMW { w: self } + #[inline(always)] + pub fn fdm(&mut self) -> FDM_W { + FDM_W { w: self } } } diff --git a/src/usbfs_global/hnptflen.rs b/src/usbfs_global/hnptflen.rs index c95de8f4830252271f6dcc55a80959808d7a5de0..b9918c0a87a9ea23faa69ff3576882ecb9fd8dcc 100644 --- a/src/usbfs_global/hnptflen.rs +++ b/src/usbfs_global/hnptflen.rs @@ -1,146 +1,64 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HNPTFLEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct HNPTXRSARR { - bits: u16, -} -impl HNPTXRSARR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct HNPTXFDR { - bits: u16, -} -impl HNPTXFDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits +#[doc = "Reader of register HNPTFLEN"] +pub type R = crate::R; +#[doc = "Writer for register HNPTFLEN"] +pub type W = crate::W; +#[doc = "Register HNPTFLEN `reset()`'s with value 0x0200_0200"] +impl crate::ResetValue for super::HNPTFLEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0200_0200 } } -#[doc = r" Proxy"] -pub struct _HNPTXRSARW<'a> { +#[doc = "Reader of field `HNPTXRSAR`"] +pub type HNPTXRSAR_R = crate::R; +#[doc = "Write proxy for field `HNPTXRSAR`"] +pub struct HNPTXRSAR_W<'a> { w: &'a mut W, } -impl<'a> _HNPTXRSARW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> HNPTXRSAR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } -#[doc = r" Proxy"] -pub struct _HNPTXFDW<'a> { +#[doc = "Reader of field `HNPTXFD`"] +pub type HNPTXFD_R = crate::R; +#[doc = "Write proxy for field `HNPTXFD`"] +pub struct HNPTXFD_W<'a> { w: &'a mut W, } -impl<'a> _HNPTXFDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> HNPTXFD_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xffff << 16)) | (((value as u32) & 0xffff) << 16); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - host non-periodic transmit Tx RAM start address"] - #[inline] - pub fn hnptxrsar(&self) -> HNPTXRSARR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - HNPTXRSARR { bits } + #[inline(always)] + pub fn hnptxrsar(&self) -> HNPTXRSAR_R { + HNPTXRSAR_R::new((self.bits & 0xffff) as u16) } #[doc = "Bits 16:31 - host non-periodic TxFIFO depth"] - #[inline] - pub fn hnptxfd(&self) -> HNPTXFDR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - HNPTXFDR { bits } + #[inline(always)] + pub fn hnptxfd(&self) -> HNPTXFD_R { + HNPTXFD_R::new(((self.bits >> 16) & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0200_0200 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - host non-periodic transmit Tx RAM start address"] - #[inline] - pub fn hnptxrsar(&mut self) -> _HNPTXRSARW { - _HNPTXRSARW { w: self } + #[inline(always)] + pub fn hnptxrsar(&mut self) -> HNPTXRSAR_W { + HNPTXRSAR_W { w: self } } #[doc = "Bits 16:31 - host non-periodic TxFIFO depth"] - #[inline] - pub fn hnptxfd(&mut self) -> _HNPTXFDW { - _HNPTXFDW { w: self } + #[inline(always)] + pub fn hnptxfd(&mut self) -> HNPTXFD_W { + HNPTXFD_W { w: self } } } diff --git a/src/usbfs_global/hnptfqstat.rs b/src/usbfs_global/hnptfqstat.rs index d4fcdd1c686e754f223385951e6a31e1a58a6a70..7b5c0bebbb01e1d8641da2db72095ba0a49d4594 100644 --- a/src/usbfs_global/hnptfqstat.rs +++ b/src/usbfs_global/hnptfqstat.rs @@ -1,83 +1,25 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::HNPTFQSTAT { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct NPTXFSR { - bits: u16, -} -impl NPTXFSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct NPTXRQSR { - bits: u8, -} -impl NPTXRQSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct NPTXRQTOPR { - bits: u8, -} -impl NPTXRQTOPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} +#[doc = "Reader of register HNPTFQSTAT"] +pub type R = crate::R; +#[doc = "Reader of field `NPTXFS`"] +pub type NPTXFS_R = crate::R; +#[doc = "Reader of field `NPTXRQS`"] +pub type NPTXRQS_R = crate::R; +#[doc = "Reader of field `NPTXRQTOP`"] +pub type NPTXRQTOP_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Non-periodic TxFIFO space"] - #[inline] - pub fn nptxfs(&self) -> NPTXFSR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - NPTXFSR { bits } + #[inline(always)] + pub fn nptxfs(&self) -> NPTXFS_R { + NPTXFS_R::new((self.bits & 0xffff) as u16) } #[doc = "Bits 16:23 - Non-periodic transmit request queue space"] - #[inline] - pub fn nptxrqs(&self) -> NPTXRQSR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - NPTXRQSR { bits } + #[inline(always)] + pub fn nptxrqs(&self) -> NPTXRQS_R { + NPTXRQS_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bits 24:30 - Top of the non-periodic transmit request queue"] - #[inline] - pub fn nptxrqtop(&self) -> NPTXRQTOPR { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - NPTXRQTOPR { bits } + #[inline(always)] + pub fn nptxrqtop(&self) -> NPTXRQTOP_R { + NPTXRQTOP_R::new(((self.bits >> 24) & 0x7f) as u8) } } diff --git a/src/usbfs_global/hptflen.rs b/src/usbfs_global/hptflen.rs index 849e0923fc17b79c320518c03ee631b120325b10..f63303920f68f5b7b190c7a3575b738114a27cb0 100644 --- a/src/usbfs_global/hptflen.rs +++ b/src/usbfs_global/hptflen.rs @@ -1,146 +1,64 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HPTFLEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct HPTXFSARR { - bits: u16, -} -impl HPTXFSARR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct HPTXFDR { - bits: u16, -} -impl HPTXFDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits +#[doc = "Reader of register HPTFLEN"] +pub type R = crate::R; +#[doc = "Writer for register HPTFLEN"] +pub type W = crate::W; +#[doc = "Register HPTFLEN `reset()`'s with value 0x0200_0600"] +impl crate::ResetValue for super::HPTFLEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x0200_0600 } } -#[doc = r" Proxy"] -pub struct _HPTXFSARW<'a> { +#[doc = "Reader of field `HPTXFSAR`"] +pub type HPTXFSAR_R = crate::R; +#[doc = "Write proxy for field `HPTXFSAR`"] +pub struct HPTXFSAR_W<'a> { w: &'a mut W, } -impl<'a> _HPTXFSARW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> HPTXFSAR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } -#[doc = r" Proxy"] -pub struct _HPTXFDW<'a> { +#[doc = "Reader of field `HPTXFD`"] +pub type HPTXFD_R = crate::R; +#[doc = "Write proxy for field `HPTXFD`"] +pub struct HPTXFD_W<'a> { w: &'a mut W, } -impl<'a> _HPTXFDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> HPTXFD_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0xffff << 16)) | (((value as u32) & 0xffff) << 16); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Host periodic TxFIFO start address"] - #[inline] - pub fn hptxfsar(&self) -> HPTXFSARR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - HPTXFSARR { bits } + #[inline(always)] + pub fn hptxfsar(&self) -> HPTXFSAR_R { + HPTXFSAR_R::new((self.bits & 0xffff) as u16) } #[doc = "Bits 16:31 - Host periodic TxFIFO depth"] - #[inline] - pub fn hptxfd(&self) -> HPTXFDR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - HPTXFDR { bits } + #[inline(always)] + pub fn hptxfd(&self) -> HPTXFD_R { + HPTXFD_R::new(((self.bits >> 16) & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x0200_0600 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Host periodic TxFIFO start address"] - #[inline] - pub fn hptxfsar(&mut self) -> _HPTXFSARW { - _HPTXFSARW { w: self } + #[inline(always)] + pub fn hptxfsar(&mut self) -> HPTXFSAR_W { + HPTXFSAR_W { w: self } } #[doc = "Bits 16:31 - Host periodic TxFIFO depth"] - #[inline] - pub fn hptxfd(&mut self) -> _HPTXFDW { - _HPTXFDW { w: self } + #[inline(always)] + pub fn hptxfd(&mut self) -> HPTXFD_W { + HPTXFD_W { w: self } } } diff --git a/src/usbfs_host.rs b/src/usbfs_host.rs index 06f6c8b5f47fcdc28740059866d83111e4bf7f18..f8cc218d4aec8be8832baa353c176c457f2c9a2a 100644 --- a/src/usbfs_host.rs +++ b/src/usbfs_host.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - host configuration register (HCTL)"] @@ -7,90 +7,90 @@ pub struct RegisterBlock { pub hft: HFT, #[doc = "0x08 - FS host frame number/frame time remaining register (HFINFR)"] pub hfinfr: HFINFR, - _reserved0: [u8; 4usize], + _reserved3: [u8; 4usize], #[doc = "0x10 - Host periodic transmit FIFO/queue status register (HPTFQSTAT)"] pub hptfqstat: HPTFQSTAT, #[doc = "0x14 - Host all channels interrupt register"] pub hachint: HACHINT, #[doc = "0x18 - host all channels interrupt mask register"] pub hachinten: HACHINTEN, - _reserved1: [u8; 36usize], + _reserved6: [u8; 36usize], #[doc = "0x40 - Host port control and status register (USBFS_HPCS)"] pub hpcs: HPCS, - _reserved2: [u8; 188usize], + _reserved7: [u8; 188usize], #[doc = "0x100 - host channel-0 characteristics register (HCH0CTL)"] pub hch0ctl: HCH0CTL, - _reserved3: [u8; 4usize], + _reserved8: [u8; 4usize], #[doc = "0x108 - host channel-0 interrupt register (USBFS_HCHxINTF)"] pub hch0intf: HCH0INTF, #[doc = "0x10c - host channel-0 interrupt enable register (HCH0INTEN)"] pub hch0inten: HCH0INTEN, #[doc = "0x110 - host channel-0 transfer length register"] pub hch0len: HCH0LEN, - _reserved4: [u8; 12usize], + _reserved11: [u8; 12usize], #[doc = "0x120 - host channel-1 characteristics register (HCH1CTL)"] pub hch1ctl: HCH1CTL, - _reserved5: [u8; 4usize], + _reserved12: [u8; 4usize], #[doc = "0x128 - host channel-1 interrupt register (HCH1INTF)"] pub hch1intf: HCH1INTF, #[doc = "0x12c - host channel-1 interrupt enable register (HCH1INTEN)"] pub hch1inten: HCH1INTEN, #[doc = "0x130 - host channel-1 transfer length register"] pub hch1len: HCH1LEN, - _reserved6: [u8; 12usize], + _reserved15: [u8; 12usize], #[doc = "0x140 - host channel-2 characteristics register (HCH2CTL)"] pub hch2ctl: HCH2CTL, - _reserved7: [u8; 4usize], + _reserved16: [u8; 4usize], #[doc = "0x148 - host channel-2 interrupt register (HCH2INTF)"] pub hch2intf: HCH2INTF, #[doc = "0x14c - host channel-2 interrupt enable register (HCH2INTEN)"] pub hch2inten: HCH2INTEN, #[doc = "0x150 - host channel-2 transfer length register"] pub hch2len: HCH2LEN, - _reserved8: [u8; 12usize], + _reserved19: [u8; 12usize], #[doc = "0x160 - host channel-3 characteristics register (HCH3CTL)"] pub hch3ctl: HCH3CTL, - _reserved9: [u8; 4usize], + _reserved20: [u8; 4usize], #[doc = "0x168 - host channel-3 interrupt register (HCH3INTF)"] pub hch3intf: HCH3INTF, #[doc = "0x16c - host channel-3 interrupt enable register (HCH3INTEN)"] pub hch3inten: HCH3INTEN, #[doc = "0x170 - host channel-3 transfer length register"] pub hch3len: HCH3LEN, - _reserved10: [u8; 12usize], + _reserved23: [u8; 12usize], #[doc = "0x180 - host channel-4 characteristics register (HCH4CTL)"] pub hch4ctl: HCH4CTL, - _reserved11: [u8; 4usize], + _reserved24: [u8; 4usize], #[doc = "0x188 - host channel-4 interrupt register (HCH4INTF)"] pub hch4intf: HCH4INTF, #[doc = "0x18c - host channel-4 interrupt enable register (HCH4INTEN)"] pub hch4inten: HCH4INTEN, #[doc = "0x190 - host channel-4 transfer length register"] pub hch4len: HCH4LEN, - _reserved12: [u8; 12usize], + _reserved27: [u8; 12usize], #[doc = "0x1a0 - host channel-5 characteristics register (HCH5CTL)"] pub hch5ctl: HCH5CTL, - _reserved13: [u8; 4usize], + _reserved28: [u8; 4usize], #[doc = "0x1a8 - host channel-5 interrupt register (HCH5INTF)"] pub hch5intf: HCH5INTF, #[doc = "0x1ac - host channel-5 interrupt enable register (HCH5INTEN)"] pub hch5inten: HCH5INTEN, #[doc = "0x1b0 - host channel-5 transfer length register"] pub hch5len: HCH5LEN, - _reserved14: [u8; 12usize], + _reserved31: [u8; 12usize], #[doc = "0x1c0 - host channel-6 characteristics register (HCH6CTL)"] pub hch6ctl: HCH6CTL, - _reserved15: [u8; 4usize], + _reserved32: [u8; 4usize], #[doc = "0x1c8 - host channel-6 interrupt register (HCH6INTF)"] pub hch6intf: HCH6INTF, #[doc = "0x1cc - host channel-6 interrupt enable register (HCH6INTEN)"] pub hch6inten: HCH6INTEN, #[doc = "0x1d0 - host channel-6 transfer length register"] pub hch6len: HCH6LEN, - _reserved16: [u8; 12usize], + _reserved35: [u8; 12usize], #[doc = "0x1e0 - host channel-7 characteristics register (HCH7CTL)"] pub hch7ctl: HCH7CTL, - _reserved17: [u8; 4usize], + _reserved36: [u8; 4usize], #[doc = "0x1e8 - host channel-7 interrupt register (HCH7INTF)"] pub hch7intf: HCH7INTF, #[doc = "0x1ec - host channel-7 interrupt enable register (HCH7INTEN)"] @@ -98,237 +98,426 @@ pub struct RegisterBlock { #[doc = "0x1f0 - host channel-7 transfer length register"] pub hch7len: HCH7LEN, } -#[doc = "host configuration register (HCTL)"] -pub struct HCTL { - register: ::vcell::VolatileCell, -} +#[doc = "host configuration register (HCTL)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hctl](hctl) module"] +pub type HCTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCTL; +#[doc = "`read()` method returns [hctl::R](hctl::R) reader structure"] +impl crate::Readable for HCTL {} +#[doc = "`write(|w| ..)` method takes [hctl::W](hctl::W) writer structure"] +impl crate::Writable for HCTL {} #[doc = "host configuration register (HCTL)"] pub mod hctl; -#[doc = "Host frame interval register"] -pub struct HFT { - register: ::vcell::VolatileCell, -} +#[doc = "Host frame interval register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hft](hft) module"] +pub type HFT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HFT; +#[doc = "`read()` method returns [hft::R](hft::R) reader structure"] +impl crate::Readable for HFT {} +#[doc = "`write(|w| ..)` method takes [hft::W](hft::W) writer structure"] +impl crate::Writable for HFT {} #[doc = "Host frame interval register"] pub mod hft; -#[doc = "FS host frame number/frame time remaining register (HFINFR)"] -pub struct HFINFR { - register: ::vcell::VolatileCell, -} +#[doc = "FS host frame number/frame time remaining register (HFINFR)\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hfinfr](hfinfr) module"] +pub type HFINFR = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HFINFR; +#[doc = "`read()` method returns [hfinfr::R](hfinfr::R) reader structure"] +impl crate::Readable for HFINFR {} #[doc = "FS host frame number/frame time remaining register (HFINFR)"] pub mod hfinfr; -#[doc = "Host periodic transmit FIFO/queue status register (HPTFQSTAT)"] -pub struct HPTFQSTAT { - register: ::vcell::VolatileCell, -} +#[doc = "Host periodic transmit FIFO/queue status register (HPTFQSTAT)\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hptfqstat](hptfqstat) module"] +pub type HPTFQSTAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HPTFQSTAT; +#[doc = "`read()` method returns [hptfqstat::R](hptfqstat::R) reader structure"] +impl crate::Readable for HPTFQSTAT {} #[doc = "Host periodic transmit FIFO/queue status register (HPTFQSTAT)"] pub mod hptfqstat; -#[doc = "Host all channels interrupt register"] -pub struct HACHINT { - register: ::vcell::VolatileCell, -} +#[doc = "Host all channels interrupt register\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hachint](hachint) module"] +pub type HACHINT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HACHINT; +#[doc = "`read()` method returns [hachint::R](hachint::R) reader structure"] +impl crate::Readable for HACHINT {} #[doc = "Host all channels interrupt register"] pub mod hachint; -#[doc = "host all channels interrupt mask register"] -pub struct HACHINTEN { - register: ::vcell::VolatileCell, -} +#[doc = "host all channels interrupt mask register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hachinten](hachinten) module"] +pub type HACHINTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HACHINTEN; +#[doc = "`read()` method returns [hachinten::R](hachinten::R) reader structure"] +impl crate::Readable for HACHINTEN {} +#[doc = "`write(|w| ..)` method takes [hachinten::W](hachinten::W) writer structure"] +impl crate::Writable for HACHINTEN {} #[doc = "host all channels interrupt mask register"] pub mod hachinten; -#[doc = "Host port control and status register (USBFS_HPCS)"] -pub struct HPCS { - register: ::vcell::VolatileCell, -} +#[doc = "Host port control and status register (USBFS_HPCS)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hpcs](hpcs) module"] +pub type HPCS = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HPCS; +#[doc = "`read()` method returns [hpcs::R](hpcs::R) reader structure"] +impl crate::Readable for HPCS {} +#[doc = "`write(|w| ..)` method takes [hpcs::W](hpcs::W) writer structure"] +impl crate::Writable for HPCS {} #[doc = "Host port control and status register (USBFS_HPCS)"] pub mod hpcs; -#[doc = "host channel-0 characteristics register (HCH0CTL)"] -pub struct HCH0CTL { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-0 characteristics register (HCH0CTL)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch0ctl](hch0ctl) module"] +pub type HCH0CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH0CTL; +#[doc = "`read()` method returns [hch0ctl::R](hch0ctl::R) reader structure"] +impl crate::Readable for HCH0CTL {} +#[doc = "`write(|w| ..)` method takes [hch0ctl::W](hch0ctl::W) writer structure"] +impl crate::Writable for HCH0CTL {} #[doc = "host channel-0 characteristics register (HCH0CTL)"] pub mod hch0ctl; -#[doc = "host channel-1 characteristics register (HCH1CTL)"] -pub struct HCH1CTL { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-1 characteristics register (HCH1CTL)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch1ctl](hch1ctl) module"] +pub type HCH1CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH1CTL; +#[doc = "`read()` method returns [hch1ctl::R](hch1ctl::R) reader structure"] +impl crate::Readable for HCH1CTL {} +#[doc = "`write(|w| ..)` method takes [hch1ctl::W](hch1ctl::W) writer structure"] +impl crate::Writable for HCH1CTL {} #[doc = "host channel-1 characteristics register (HCH1CTL)"] pub mod hch1ctl; -#[doc = "host channel-2 characteristics register (HCH2CTL)"] -pub struct HCH2CTL { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-2 characteristics register (HCH2CTL)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch2ctl](hch2ctl) module"] +pub type HCH2CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH2CTL; +#[doc = "`read()` method returns [hch2ctl::R](hch2ctl::R) reader structure"] +impl crate::Readable for HCH2CTL {} +#[doc = "`write(|w| ..)` method takes [hch2ctl::W](hch2ctl::W) writer structure"] +impl crate::Writable for HCH2CTL {} #[doc = "host channel-2 characteristics register (HCH2CTL)"] pub mod hch2ctl; -#[doc = "host channel-3 characteristics register (HCH3CTL)"] -pub struct HCH3CTL { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-3 characteristics register (HCH3CTL)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch3ctl](hch3ctl) module"] +pub type HCH3CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH3CTL; +#[doc = "`read()` method returns [hch3ctl::R](hch3ctl::R) reader structure"] +impl crate::Readable for HCH3CTL {} +#[doc = "`write(|w| ..)` method takes [hch3ctl::W](hch3ctl::W) writer structure"] +impl crate::Writable for HCH3CTL {} #[doc = "host channel-3 characteristics register (HCH3CTL)"] pub mod hch3ctl; -#[doc = "host channel-4 characteristics register (HCH4CTL)"] -pub struct HCH4CTL { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-4 characteristics register (HCH4CTL)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch4ctl](hch4ctl) module"] +pub type HCH4CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH4CTL; +#[doc = "`read()` method returns [hch4ctl::R](hch4ctl::R) reader structure"] +impl crate::Readable for HCH4CTL {} +#[doc = "`write(|w| ..)` method takes [hch4ctl::W](hch4ctl::W) writer structure"] +impl crate::Writable for HCH4CTL {} #[doc = "host channel-4 characteristics register (HCH4CTL)"] pub mod hch4ctl; -#[doc = "host channel-5 characteristics register (HCH5CTL)"] -pub struct HCH5CTL { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-5 characteristics register (HCH5CTL)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch5ctl](hch5ctl) module"] +pub type HCH5CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH5CTL; +#[doc = "`read()` method returns [hch5ctl::R](hch5ctl::R) reader structure"] +impl crate::Readable for HCH5CTL {} +#[doc = "`write(|w| ..)` method takes [hch5ctl::W](hch5ctl::W) writer structure"] +impl crate::Writable for HCH5CTL {} #[doc = "host channel-5 characteristics register (HCH5CTL)"] pub mod hch5ctl; -#[doc = "host channel-6 characteristics register (HCH6CTL)"] -pub struct HCH6CTL { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-6 characteristics register (HCH6CTL)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch6ctl](hch6ctl) module"] +pub type HCH6CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH6CTL; +#[doc = "`read()` method returns [hch6ctl::R](hch6ctl::R) reader structure"] +impl crate::Readable for HCH6CTL {} +#[doc = "`write(|w| ..)` method takes [hch6ctl::W](hch6ctl::W) writer structure"] +impl crate::Writable for HCH6CTL {} #[doc = "host channel-6 characteristics register (HCH6CTL)"] pub mod hch6ctl; -#[doc = "host channel-7 characteristics register (HCH7CTL)"] -pub struct HCH7CTL { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-7 characteristics register (HCH7CTL)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch7ctl](hch7ctl) module"] +pub type HCH7CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH7CTL; +#[doc = "`read()` method returns [hch7ctl::R](hch7ctl::R) reader structure"] +impl crate::Readable for HCH7CTL {} +#[doc = "`write(|w| ..)` method takes [hch7ctl::W](hch7ctl::W) writer structure"] +impl crate::Writable for HCH7CTL {} #[doc = "host channel-7 characteristics register (HCH7CTL)"] pub mod hch7ctl; -#[doc = "host channel-0 interrupt register (USBFS_HCHxINTF)"] -pub struct HCH0INTF { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-0 interrupt register (USBFS_HCHxINTF)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch0intf](hch0intf) module"] +pub type HCH0INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH0INTF; +#[doc = "`read()` method returns [hch0intf::R](hch0intf::R) reader structure"] +impl crate::Readable for HCH0INTF {} +#[doc = "`write(|w| ..)` method takes [hch0intf::W](hch0intf::W) writer structure"] +impl crate::Writable for HCH0INTF {} #[doc = "host channel-0 interrupt register (USBFS_HCHxINTF)"] pub mod hch0intf; -#[doc = "host channel-1 interrupt register (HCH1INTF)"] -pub struct HCH1INTF { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-1 interrupt register (HCH1INTF)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch1intf](hch1intf) module"] +pub type HCH1INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH1INTF; +#[doc = "`read()` method returns [hch1intf::R](hch1intf::R) reader structure"] +impl crate::Readable for HCH1INTF {} +#[doc = "`write(|w| ..)` method takes [hch1intf::W](hch1intf::W) writer structure"] +impl crate::Writable for HCH1INTF {} #[doc = "host channel-1 interrupt register (HCH1INTF)"] pub mod hch1intf; -#[doc = "host channel-2 interrupt register (HCH2INTF)"] -pub struct HCH2INTF { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-2 interrupt register (HCH2INTF)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch2intf](hch2intf) module"] +pub type HCH2INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH2INTF; +#[doc = "`read()` method returns [hch2intf::R](hch2intf::R) reader structure"] +impl crate::Readable for HCH2INTF {} +#[doc = "`write(|w| ..)` method takes [hch2intf::W](hch2intf::W) writer structure"] +impl crate::Writable for HCH2INTF {} #[doc = "host channel-2 interrupt register (HCH2INTF)"] pub mod hch2intf; -#[doc = "host channel-3 interrupt register (HCH3INTF)"] -pub struct HCH3INTF { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-3 interrupt register (HCH3INTF)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch3intf](hch3intf) module"] +pub type HCH3INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH3INTF; +#[doc = "`read()` method returns [hch3intf::R](hch3intf::R) reader structure"] +impl crate::Readable for HCH3INTF {} +#[doc = "`write(|w| ..)` method takes [hch3intf::W](hch3intf::W) writer structure"] +impl crate::Writable for HCH3INTF {} #[doc = "host channel-3 interrupt register (HCH3INTF)"] pub mod hch3intf; -#[doc = "host channel-4 interrupt register (HCH4INTF)"] -pub struct HCH4INTF { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-4 interrupt register (HCH4INTF)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch4intf](hch4intf) module"] +pub type HCH4INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH4INTF; +#[doc = "`read()` method returns [hch4intf::R](hch4intf::R) reader structure"] +impl crate::Readable for HCH4INTF {} +#[doc = "`write(|w| ..)` method takes [hch4intf::W](hch4intf::W) writer structure"] +impl crate::Writable for HCH4INTF {} #[doc = "host channel-4 interrupt register (HCH4INTF)"] pub mod hch4intf; -#[doc = "host channel-5 interrupt register (HCH5INTF)"] -pub struct HCH5INTF { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-5 interrupt register (HCH5INTF)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch5intf](hch5intf) module"] +pub type HCH5INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH5INTF; +#[doc = "`read()` method returns [hch5intf::R](hch5intf::R) reader structure"] +impl crate::Readable for HCH5INTF {} +#[doc = "`write(|w| ..)` method takes [hch5intf::W](hch5intf::W) writer structure"] +impl crate::Writable for HCH5INTF {} #[doc = "host channel-5 interrupt register (HCH5INTF)"] pub mod hch5intf; -#[doc = "host channel-6 interrupt register (HCH6INTF)"] -pub struct HCH6INTF { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-6 interrupt register (HCH6INTF)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch6intf](hch6intf) module"] +pub type HCH6INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH6INTF; +#[doc = "`read()` method returns [hch6intf::R](hch6intf::R) reader structure"] +impl crate::Readable for HCH6INTF {} +#[doc = "`write(|w| ..)` method takes [hch6intf::W](hch6intf::W) writer structure"] +impl crate::Writable for HCH6INTF {} #[doc = "host channel-6 interrupt register (HCH6INTF)"] pub mod hch6intf; -#[doc = "host channel-7 interrupt register (HCH7INTF)"] -pub struct HCH7INTF { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-7 interrupt register (HCH7INTF)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch7intf](hch7intf) module"] +pub type HCH7INTF = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH7INTF; +#[doc = "`read()` method returns [hch7intf::R](hch7intf::R) reader structure"] +impl crate::Readable for HCH7INTF {} +#[doc = "`write(|w| ..)` method takes [hch7intf::W](hch7intf::W) writer structure"] +impl crate::Writable for HCH7INTF {} #[doc = "host channel-7 interrupt register (HCH7INTF)"] pub mod hch7intf; -#[doc = "host channel-0 interrupt enable register (HCH0INTEN)"] -pub struct HCH0INTEN { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-0 interrupt enable register (HCH0INTEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch0inten](hch0inten) module"] +pub type HCH0INTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH0INTEN; +#[doc = "`read()` method returns [hch0inten::R](hch0inten::R) reader structure"] +impl crate::Readable for HCH0INTEN {} +#[doc = "`write(|w| ..)` method takes [hch0inten::W](hch0inten::W) writer structure"] +impl crate::Writable for HCH0INTEN {} #[doc = "host channel-0 interrupt enable register (HCH0INTEN)"] pub mod hch0inten; -#[doc = "host channel-1 interrupt enable register (HCH1INTEN)"] -pub struct HCH1INTEN { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-1 interrupt enable register (HCH1INTEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch1inten](hch1inten) module"] +pub type HCH1INTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH1INTEN; +#[doc = "`read()` method returns [hch1inten::R](hch1inten::R) reader structure"] +impl crate::Readable for HCH1INTEN {} +#[doc = "`write(|w| ..)` method takes [hch1inten::W](hch1inten::W) writer structure"] +impl crate::Writable for HCH1INTEN {} #[doc = "host channel-1 interrupt enable register (HCH1INTEN)"] pub mod hch1inten; -#[doc = "host channel-2 interrupt enable register (HCH2INTEN)"] -pub struct HCH2INTEN { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-2 interrupt enable register (HCH2INTEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch2inten](hch2inten) module"] +pub type HCH2INTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH2INTEN; +#[doc = "`read()` method returns [hch2inten::R](hch2inten::R) reader structure"] +impl crate::Readable for HCH2INTEN {} +#[doc = "`write(|w| ..)` method takes [hch2inten::W](hch2inten::W) writer structure"] +impl crate::Writable for HCH2INTEN {} #[doc = "host channel-2 interrupt enable register (HCH2INTEN)"] pub mod hch2inten; -#[doc = "host channel-3 interrupt enable register (HCH3INTEN)"] -pub struct HCH3INTEN { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-3 interrupt enable register (HCH3INTEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch3inten](hch3inten) module"] +pub type HCH3INTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH3INTEN; +#[doc = "`read()` method returns [hch3inten::R](hch3inten::R) reader structure"] +impl crate::Readable for HCH3INTEN {} +#[doc = "`write(|w| ..)` method takes [hch3inten::W](hch3inten::W) writer structure"] +impl crate::Writable for HCH3INTEN {} #[doc = "host channel-3 interrupt enable register (HCH3INTEN)"] pub mod hch3inten; -#[doc = "host channel-4 interrupt enable register (HCH4INTEN)"] -pub struct HCH4INTEN { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-4 interrupt enable register (HCH4INTEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch4inten](hch4inten) module"] +pub type HCH4INTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH4INTEN; +#[doc = "`read()` method returns [hch4inten::R](hch4inten::R) reader structure"] +impl crate::Readable for HCH4INTEN {} +#[doc = "`write(|w| ..)` method takes [hch4inten::W](hch4inten::W) writer structure"] +impl crate::Writable for HCH4INTEN {} #[doc = "host channel-4 interrupt enable register (HCH4INTEN)"] pub mod hch4inten; -#[doc = "host channel-5 interrupt enable register (HCH5INTEN)"] -pub struct HCH5INTEN { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-5 interrupt enable register (HCH5INTEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch5inten](hch5inten) module"] +pub type HCH5INTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH5INTEN; +#[doc = "`read()` method returns [hch5inten::R](hch5inten::R) reader structure"] +impl crate::Readable for HCH5INTEN {} +#[doc = "`write(|w| ..)` method takes [hch5inten::W](hch5inten::W) writer structure"] +impl crate::Writable for HCH5INTEN {} #[doc = "host channel-5 interrupt enable register (HCH5INTEN)"] pub mod hch5inten; -#[doc = "host channel-6 interrupt enable register (HCH6INTEN)"] -pub struct HCH6INTEN { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-6 interrupt enable register (HCH6INTEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch6inten](hch6inten) module"] +pub type HCH6INTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH6INTEN; +#[doc = "`read()` method returns [hch6inten::R](hch6inten::R) reader structure"] +impl crate::Readable for HCH6INTEN {} +#[doc = "`write(|w| ..)` method takes [hch6inten::W](hch6inten::W) writer structure"] +impl crate::Writable for HCH6INTEN {} #[doc = "host channel-6 interrupt enable register (HCH6INTEN)"] pub mod hch6inten; -#[doc = "host channel-7 interrupt enable register (HCH7INTEN)"] -pub struct HCH7INTEN { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-7 interrupt enable register (HCH7INTEN)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch7inten](hch7inten) module"] +pub type HCH7INTEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH7INTEN; +#[doc = "`read()` method returns [hch7inten::R](hch7inten::R) reader structure"] +impl crate::Readable for HCH7INTEN {} +#[doc = "`write(|w| ..)` method takes [hch7inten::W](hch7inten::W) writer structure"] +impl crate::Writable for HCH7INTEN {} #[doc = "host channel-7 interrupt enable register (HCH7INTEN)"] pub mod hch7inten; -#[doc = "host channel-0 transfer length register"] -pub struct HCH0LEN { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-0 transfer length register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch0len](hch0len) module"] +pub type HCH0LEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH0LEN; +#[doc = "`read()` method returns [hch0len::R](hch0len::R) reader structure"] +impl crate::Readable for HCH0LEN {} +#[doc = "`write(|w| ..)` method takes [hch0len::W](hch0len::W) writer structure"] +impl crate::Writable for HCH0LEN {} #[doc = "host channel-0 transfer length register"] pub mod hch0len; -#[doc = "host channel-1 transfer length register"] -pub struct HCH1LEN { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-1 transfer length register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch1len](hch1len) module"] +pub type HCH1LEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH1LEN; +#[doc = "`read()` method returns [hch1len::R](hch1len::R) reader structure"] +impl crate::Readable for HCH1LEN {} +#[doc = "`write(|w| ..)` method takes [hch1len::W](hch1len::W) writer structure"] +impl crate::Writable for HCH1LEN {} #[doc = "host channel-1 transfer length register"] pub mod hch1len; -#[doc = "host channel-2 transfer length register"] -pub struct HCH2LEN { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-2 transfer length register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch2len](hch2len) module"] +pub type HCH2LEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH2LEN; +#[doc = "`read()` method returns [hch2len::R](hch2len::R) reader structure"] +impl crate::Readable for HCH2LEN {} +#[doc = "`write(|w| ..)` method takes [hch2len::W](hch2len::W) writer structure"] +impl crate::Writable for HCH2LEN {} #[doc = "host channel-2 transfer length register"] pub mod hch2len; -#[doc = "host channel-3 transfer length register"] -pub struct HCH3LEN { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-3 transfer length register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch3len](hch3len) module"] +pub type HCH3LEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH3LEN; +#[doc = "`read()` method returns [hch3len::R](hch3len::R) reader structure"] +impl crate::Readable for HCH3LEN {} +#[doc = "`write(|w| ..)` method takes [hch3len::W](hch3len::W) writer structure"] +impl crate::Writable for HCH3LEN {} #[doc = "host channel-3 transfer length register"] pub mod hch3len; -#[doc = "host channel-4 transfer length register"] -pub struct HCH4LEN { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-4 transfer length register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch4len](hch4len) module"] +pub type HCH4LEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH4LEN; +#[doc = "`read()` method returns [hch4len::R](hch4len::R) reader structure"] +impl crate::Readable for HCH4LEN {} +#[doc = "`write(|w| ..)` method takes [hch4len::W](hch4len::W) writer structure"] +impl crate::Writable for HCH4LEN {} #[doc = "host channel-4 transfer length register"] pub mod hch4len; -#[doc = "host channel-5 transfer length register"] -pub struct HCH5LEN { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-5 transfer length register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch5len](hch5len) module"] +pub type HCH5LEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH5LEN; +#[doc = "`read()` method returns [hch5len::R](hch5len::R) reader structure"] +impl crate::Readable for HCH5LEN {} +#[doc = "`write(|w| ..)` method takes [hch5len::W](hch5len::W) writer structure"] +impl crate::Writable for HCH5LEN {} #[doc = "host channel-5 transfer length register"] pub mod hch5len; -#[doc = "host channel-6 transfer length register"] -pub struct HCH6LEN { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-6 transfer length register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch6len](hch6len) module"] +pub type HCH6LEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH6LEN; +#[doc = "`read()` method returns [hch6len::R](hch6len::R) reader structure"] +impl crate::Readable for HCH6LEN {} +#[doc = "`write(|w| ..)` method takes [hch6len::W](hch6len::W) writer structure"] +impl crate::Writable for HCH6LEN {} #[doc = "host channel-6 transfer length register"] pub mod hch6len; -#[doc = "host channel-7 transfer length register"] -pub struct HCH7LEN { - register: ::vcell::VolatileCell, -} +#[doc = "host channel-7 transfer length register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [hch7len](hch7len) module"] +pub type HCH7LEN = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _HCH7LEN; +#[doc = "`read()` method returns [hch7len::R](hch7len::R) reader structure"] +impl crate::Readable for HCH7LEN {} +#[doc = "`write(|w| ..)` method takes [hch7len::W](hch7len::W) writer structure"] +impl crate::Writable for HCH7LEN {} #[doc = "host channel-7 transfer length register"] pub mod hch7len; diff --git a/src/usbfs_host/hachint.rs b/src/usbfs_host/hachint.rs index ff54969ed6a7cff5e6098749554af155451629c5..3e9f6e9325138e785b55bcb5bb56a2e439e38768 100644 --- a/src/usbfs_host/hachint.rs +++ b/src/usbfs_host/hachint.rs @@ -1,41 +1,11 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::HACHINT { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct HACHINTR { - bits: u8, -} -impl HACHINTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} +#[doc = "Reader of register HACHINT"] +pub type R = crate::R; +#[doc = "Reader of field `HACHINT`"] +pub type HACHINT_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:7 - Host all channel interrupts"] - #[inline] - pub fn hachint(&self) -> HACHINTR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - HACHINTR { bits } + #[inline(always)] + pub fn hachint(&self) -> HACHINT_R { + HACHINT_R::new((self.bits & 0xff) as u8) } } diff --git a/src/usbfs_host/hachinten.rs b/src/usbfs_host/hachinten.rs index 77f512d66b0f3597b8cc6d5be07351b3466e56e2..30504cf055d67dbe39d2e5235454d0d471a70489 100644 --- a/src/usbfs_host/hachinten.rs +++ b/src/usbfs_host/hachinten.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HACHINTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CINTENR { - bits: u8, -} -impl CINTENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CINTENW<'a> { +#[doc = "Reader of register HACHINTEN"] +pub type R = crate::R; +#[doc = "Writer for register HACHINTEN"] +pub type W = crate::W; +#[doc = "Register HACHINTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HACHINTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CINTEN`"] +pub type CINTEN_R = crate::R; +#[doc = "Write proxy for field `CINTEN`"] +pub struct CINTEN_W<'a> { w: &'a mut W, } -impl<'a> _CINTENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CINTEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:7 - Channel interrupt enable"] - #[inline] - pub fn cinten(&self) -> CINTENR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CINTENR { bits } + #[inline(always)] + pub fn cinten(&self) -> CINTEN_R { + CINTEN_R::new((self.bits & 0xff) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:7 - Channel interrupt enable"] - #[inline] - pub fn cinten(&mut self) -> _CINTENW { - _CINTENW { w: self } + #[inline(always)] + pub fn cinten(&mut self) -> CINTEN_W { + CINTEN_W { w: self } } } diff --git a/src/usbfs_host/hch0ctl.rs b/src/usbfs_host/hch0ctl.rs index 4ab584aa63b5faec30901d59ac4b5a82ebacc696..eff0efbc589e1dc35ee2e0b86808d80e9d2c334f 100644 --- a/src/usbfs_host/hch0ctl.rs +++ b/src/usbfs_host/hch0ctl.rs @@ -1,523 +1,282 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH0CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MPLR { - bits: u16, -} -impl MPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPNUMR { - bits: u8, -} -impl EPNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPDIRR { - bits: bool, -} -impl EPDIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LSDR { - bits: bool, -} -impl LSDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTYPER { - bits: u8, -} -impl EPTYPER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DARR { - bits: u8, -} -impl DARR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ODDFRMR { - bits: bool, -} -impl ODDFRMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CDISR { - bits: bool, -} -impl CDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CENR { - bits: bool, -} -impl CENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _MPLW<'a> { +#[doc = "Reader of register HCH0CTL"] +pub type R = crate::R; +#[doc = "Writer for register HCH0CTL"] +pub type W = crate::W; +#[doc = "Register HCH0CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH0CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MPL`"] +pub type MPL_R = crate::R; +#[doc = "Write proxy for field `MPL`"] +pub struct MPL_W<'a> { w: &'a mut W, } -impl<'a> _MPLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MPL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07ff) | ((value as u32) & 0x07ff); self.w } } -#[doc = r" Proxy"] -pub struct _EPNUMW<'a> { +#[doc = "Reader of field `EPNUM`"] +pub type EPNUM_R = crate::R; +#[doc = "Write proxy for field `EPNUM`"] +pub struct EPNUM_W<'a> { w: &'a mut W, } -impl<'a> _EPNUMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPNUM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 11)) | (((value as u32) & 0x0f) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _EPDIRW<'a> { +#[doc = "Reader of field `EPDIR`"] +pub type EPDIR_R = crate::R; +#[doc = "Write proxy for field `EPDIR`"] +pub struct EPDIR_W<'a> { w: &'a mut W, } -impl<'a> _EPDIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _LSDW<'a> { +#[doc = "Reader of field `LSD`"] +pub type LSD_R = crate::R; +#[doc = "Write proxy for field `LSD`"] +pub struct LSD_W<'a> { w: &'a mut W, } -impl<'a> _LSDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LSD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _EPTYPEW<'a> { +#[doc = "Reader of field `EPTYPE`"] +pub type EPTYPE_R = crate::R; +#[doc = "Write proxy for field `EPTYPE`"] +pub struct EPTYPE_W<'a> { w: &'a mut W, } -impl<'a> _EPTYPEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPTYPE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _DARW<'a> { +#[doc = "Reader of field `DAR`"] +pub type DAR_R = crate::R; +#[doc = "Write proxy for field `DAR`"] +pub struct DAR_W<'a> { w: &'a mut W, } -impl<'a> _DARW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x7f << 22)) | (((value as u32) & 0x7f) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _ODDFRMW<'a> { +#[doc = "Reader of field `ODDFRM`"] +pub type ODDFRM_R = crate::R; +#[doc = "Write proxy for field `ODDFRM`"] +pub struct ODDFRM_W<'a> { w: &'a mut W, } -impl<'a> _ODDFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ODDFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _CDISW<'a> { +#[doc = "Reader of field `CDIS`"] +pub type CDIS_R = crate::R; +#[doc = "Write proxy for field `CDIS`"] +pub struct CDIS_W<'a> { w: &'a mut W, } -impl<'a> _CDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _CENW<'a> { +#[doc = "Reader of field `CEN`"] +pub type CEN_R = crate::R; +#[doc = "Write proxy for field `CEN`"] +pub struct CEN_W<'a> { w: &'a mut W, } -impl<'a> _CENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:10 - Maximum packet size"] - #[inline] - pub fn mpl(&self) -> MPLR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - MPLR { bits } + #[inline(always)] + pub fn mpl(&self) -> MPL_R { + MPL_R::new((self.bits & 0x07ff) as u16) } #[doc = "Bits 11:14 - Endpoint number"] - #[inline] - pub fn epnum(&self) -> EPNUMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPNUMR { bits } + #[inline(always)] + pub fn epnum(&self) -> EPNUM_R { + EPNUM_R::new(((self.bits >> 11) & 0x0f) as u8) } #[doc = "Bit 15 - Endpoint direction"] - #[inline] - pub fn epdir(&self) -> EPDIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDIRR { bits } + #[inline(always)] + pub fn epdir(&self) -> EPDIR_R { + EPDIR_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 17 - Low-speed device"] - #[inline] - pub fn lsd(&self) -> LSDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LSDR { bits } + #[inline(always)] + pub fn lsd(&self) -> LSD_R { + LSD_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&self) -> EPTYPER { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPTYPER { bits } + #[inline(always)] + pub fn eptype(&self) -> EPTYPE_R { + EPTYPE_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bits 22:28 - Device address"] - #[inline] - pub fn dar(&self) -> DARR { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DARR { bits } + #[inline(always)] + pub fn dar(&self) -> DAR_R { + DAR_R::new(((self.bits >> 22) & 0x7f) as u8) } #[doc = "Bit 29 - Odd frame"] - #[inline] - pub fn oddfrm(&self) -> ODDFRMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ODDFRMR { bits } + #[inline(always)] + pub fn oddfrm(&self) -> ODDFRM_R { + ODDFRM_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Channel disable"] - #[inline] - pub fn cdis(&self) -> CDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CDISR { bits } + #[inline(always)] + pub fn cdis(&self) -> CDIS_R { + CDIS_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Channel enable"] - #[inline] - pub fn cen(&self) -> CENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CENR { bits } + #[inline(always)] + pub fn cen(&self) -> CEN_R { + CEN_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:10 - Maximum packet size"] - #[inline] - pub fn mpl(&mut self) -> _MPLW { - _MPLW { w: self } + #[inline(always)] + pub fn mpl(&mut self) -> MPL_W { + MPL_W { w: self } } #[doc = "Bits 11:14 - Endpoint number"] - #[inline] - pub fn epnum(&mut self) -> _EPNUMW { - _EPNUMW { w: self } + #[inline(always)] + pub fn epnum(&mut self) -> EPNUM_W { + EPNUM_W { w: self } } #[doc = "Bit 15 - Endpoint direction"] - #[inline] - pub fn epdir(&mut self) -> _EPDIRW { - _EPDIRW { w: self } + #[inline(always)] + pub fn epdir(&mut self) -> EPDIR_W { + EPDIR_W { w: self } } #[doc = "Bit 17 - Low-speed device"] - #[inline] - pub fn lsd(&mut self) -> _LSDW { - _LSDW { w: self } + #[inline(always)] + pub fn lsd(&mut self) -> LSD_W { + LSD_W { w: self } } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&mut self) -> _EPTYPEW { - _EPTYPEW { w: self } + #[inline(always)] + pub fn eptype(&mut self) -> EPTYPE_W { + EPTYPE_W { w: self } } #[doc = "Bits 22:28 - Device address"] - #[inline] - pub fn dar(&mut self) -> _DARW { - _DARW { w: self } + #[inline(always)] + pub fn dar(&mut self) -> DAR_W { + DAR_W { w: self } } #[doc = "Bit 29 - Odd frame"] - #[inline] - pub fn oddfrm(&mut self) -> _ODDFRMW { - _ODDFRMW { w: self } + #[inline(always)] + pub fn oddfrm(&mut self) -> ODDFRM_W { + ODDFRM_W { w: self } } #[doc = "Bit 30 - Channel disable"] - #[inline] - pub fn cdis(&mut self) -> _CDISW { - _CDISW { w: self } + #[inline(always)] + pub fn cdis(&mut self) -> CDIS_W { + CDIS_W { w: self } } #[doc = "Bit 31 - Channel enable"] - #[inline] - pub fn cen(&mut self) -> _CENW { - _CENW { w: self } + #[inline(always)] + pub fn cen(&mut self) -> CEN_W { + CEN_W { w: self } } } diff --git a/src/usbfs_host/hch0inten.rs b/src/usbfs_host/hch0inten.rs index 478fce36504fcafc2702a17305138ee9ad2d4a07..3dd111ecd6fcab6454f7632c3f6bbc11d2f27cdc 100644 --- a/src/usbfs_host/hch0inten.rs +++ b/src/usbfs_host/hch0inten.rs @@ -1,595 +1,322 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH0INTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFIER { - bits: bool, -} -impl TFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CHIER { - bits: bool, -} -impl CHIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLIER { - bits: bool, -} -impl STALLIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKIER { - bits: bool, -} -impl NAKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKIER { - bits: bool, -} -impl ACKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBERIER { - bits: bool, -} -impl USBERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BBERIER { - bits: bool, -} -impl BBERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct REQOVRIER { - bits: bool, -} -impl REQOVRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTERIER { - bits: bool, -} -impl DTERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFIEW<'a> { +#[doc = "Reader of register HCH0INTEN"] +pub type R = crate::R; +#[doc = "Writer for register HCH0INTEN"] +pub type W = crate::W; +#[doc = "Register HCH0INTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH0INTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TFIE`"] +pub type TFIE_R = crate::R; +#[doc = "Write proxy for field `TFIE`"] +pub struct TFIE_W<'a> { w: &'a mut W, } -impl<'a> _TFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _CHIEW<'a> { +#[doc = "Reader of field `CHIE`"] +pub type CHIE_R = crate::R; +#[doc = "Write proxy for field `CHIE`"] +pub struct CHIE_W<'a> { w: &'a mut W, } -impl<'a> _CHIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STALLIEW<'a> { +#[doc = "Reader of field `STALLIE`"] +pub type STALLIE_R = crate::R; +#[doc = "Write proxy for field `STALLIE`"] +pub struct STALLIE_W<'a> { w: &'a mut W, } -impl<'a> _STALLIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALLIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NAKIEW<'a> { +#[doc = "Reader of field `NAKIE`"] +pub type NAKIE_R = crate::R; +#[doc = "Write proxy for field `NAKIE`"] +pub struct NAKIE_W<'a> { w: &'a mut W, } -impl<'a> _NAKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NAKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ACKIEW<'a> { +#[doc = "Reader of field `ACKIE`"] +pub type ACKIE_R = crate::R; +#[doc = "Write proxy for field `ACKIE`"] +pub struct ACKIE_W<'a> { w: &'a mut W, } -impl<'a> _ACKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _USBERIEW<'a> { +#[doc = "Reader of field `USBERIE`"] +pub type USBERIE_R = crate::R; +#[doc = "Write proxy for field `USBERIE`"] +pub struct USBERIE_W<'a> { w: &'a mut W, } -impl<'a> _USBERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BBERIEW<'a> { +#[doc = "Reader of field `BBERIE`"] +pub type BBERIE_R = crate::R; +#[doc = "Write proxy for field `BBERIE`"] +pub struct BBERIE_W<'a> { w: &'a mut W, } -impl<'a> _BBERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BBERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _REQOVRIEW<'a> { +#[doc = "Reader of field `REQOVRIE`"] +pub type REQOVRIE_R = crate::R; +#[doc = "Write proxy for field `REQOVRIE`"] +pub struct REQOVRIE_W<'a> { w: &'a mut W, } -impl<'a> _REQOVRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REQOVRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _DTERIEW<'a> { +#[doc = "Reader of field `DTERIE`"] +pub type DTERIE_R = crate::R; +#[doc = "Write proxy for field `DTERIE`"] +pub struct DTERIE_W<'a> { w: &'a mut W, } -impl<'a> _DTERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer completed interrupt enable"] - #[inline] - pub fn tfie(&self) -> TFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFIER { bits } + #[inline(always)] + pub fn tfie(&self) -> TFIE_R { + TFIE_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Channel halted interrupt enable"] - #[inline] - pub fn chie(&self) -> CHIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHIER { bits } + #[inline(always)] + pub fn chie(&self) -> CHIE_R { + CHIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - STALL interrupt enable"] - #[inline] - pub fn stallie(&self) -> STALLIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLIER { bits } + #[inline(always)] + pub fn stallie(&self) -> STALLIE_R { + STALLIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - NAK interrupt enable"] - #[inline] - pub fn nakie(&self) -> NAKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKIER { bits } + #[inline(always)] + pub fn nakie(&self) -> NAKIE_R { + NAKIE_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - ACK interrupt enable"] - #[inline] - pub fn ackie(&self) -> ACKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ACKIER { bits } + #[inline(always)] + pub fn ackie(&self) -> ACKIE_R { + ACKIE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 7 - USB bus error interrupt enable"] - #[inline] - pub fn usberie(&self) -> USBERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBERIER { bits } + #[inline(always)] + pub fn usberie(&self) -> USBERIE_R { + USBERIE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Babble error interrupt enable"] - #[inline] - pub fn bberie(&self) -> BBERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BBERIER { bits } + #[inline(always)] + pub fn bberie(&self) -> BBERIE_R { + BBERIE_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - request queue overrun interrupt enable"] - #[inline] - pub fn reqovrie(&self) -> REQOVRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - REQOVRIER { bits } + #[inline(always)] + pub fn reqovrie(&self) -> REQOVRIE_R { + REQOVRIE_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Data toggle error interrupt enable"] - #[inline] - pub fn dterie(&self) -> DTERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTERIER { bits } + #[inline(always)] + pub fn dterie(&self) -> DTERIE_R { + DTERIE_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer completed interrupt enable"] - #[inline] - pub fn tfie(&mut self) -> _TFIEW { - _TFIEW { w: self } + #[inline(always)] + pub fn tfie(&mut self) -> TFIE_W { + TFIE_W { w: self } } #[doc = "Bit 1 - Channel halted interrupt enable"] - #[inline] - pub fn chie(&mut self) -> _CHIEW { - _CHIEW { w: self } + #[inline(always)] + pub fn chie(&mut self) -> CHIE_W { + CHIE_W { w: self } } #[doc = "Bit 3 - STALL interrupt enable"] - #[inline] - pub fn stallie(&mut self) -> _STALLIEW { - _STALLIEW { w: self } + #[inline(always)] + pub fn stallie(&mut self) -> STALLIE_W { + STALLIE_W { w: self } } #[doc = "Bit 4 - NAK interrupt enable"] - #[inline] - pub fn nakie(&mut self) -> _NAKIEW { - _NAKIEW { w: self } + #[inline(always)] + pub fn nakie(&mut self) -> NAKIE_W { + NAKIE_W { w: self } } #[doc = "Bit 5 - ACK interrupt enable"] - #[inline] - pub fn ackie(&mut self) -> _ACKIEW { - _ACKIEW { w: self } + #[inline(always)] + pub fn ackie(&mut self) -> ACKIE_W { + ACKIE_W { w: self } } #[doc = "Bit 7 - USB bus error interrupt enable"] - #[inline] - pub fn usberie(&mut self) -> _USBERIEW { - _USBERIEW { w: self } + #[inline(always)] + pub fn usberie(&mut self) -> USBERIE_W { + USBERIE_W { w: self } } #[doc = "Bit 8 - Babble error interrupt enable"] - #[inline] - pub fn bberie(&mut self) -> _BBERIEW { - _BBERIEW { w: self } + #[inline(always)] + pub fn bberie(&mut self) -> BBERIE_W { + BBERIE_W { w: self } } #[doc = "Bit 9 - request queue overrun interrupt enable"] - #[inline] - pub fn reqovrie(&mut self) -> _REQOVRIEW { - _REQOVRIEW { w: self } + #[inline(always)] + pub fn reqovrie(&mut self) -> REQOVRIE_W { + REQOVRIE_W { w: self } } #[doc = "Bit 10 - Data toggle error interrupt enable"] - #[inline] - pub fn dterie(&mut self) -> _DTERIEW { - _DTERIEW { w: self } + #[inline(always)] + pub fn dterie(&mut self) -> DTERIE_W { + DTERIE_W { w: self } } } diff --git a/src/usbfs_host/hch0intf.rs b/src/usbfs_host/hch0intf.rs index b36e546c061a161891d2eaec8193fd1a42ec21cf..54bfa2187f932787343286c89b043234d6aa3f22 100644 --- a/src/usbfs_host/hch0intf.rs +++ b/src/usbfs_host/hch0intf.rs @@ -1,595 +1,322 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH0INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFR { - bits: bool, -} -impl TFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CHR { - bits: bool, -} -impl CHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLR { - bits: bool, -} -impl STALLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKR { - bits: bool, -} -impl NAKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKR { - bits: bool, -} -impl ACKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBERR { - bits: bool, -} -impl USBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BBERR { - bits: bool, -} -impl BBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct REQOVRR { - bits: bool, -} -impl REQOVRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTERR { - bits: bool, -} -impl DTERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFW<'a> { +#[doc = "Reader of register HCH0INTF"] +pub type R = crate::R; +#[doc = "Writer for register HCH0INTF"] +pub type W = crate::W; +#[doc = "Register HCH0INTF `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH0INTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TF`"] +pub type TF_R = crate::R; +#[doc = "Write proxy for field `TF`"] +pub struct TF_W<'a> { w: &'a mut W, } -impl<'a> _TFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _CHW<'a> { +#[doc = "Reader of field `CH`"] +pub type CH_R = crate::R; +#[doc = "Write proxy for field `CH`"] +pub struct CH_W<'a> { w: &'a mut W, } -impl<'a> _CHW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STALLW<'a> { +#[doc = "Reader of field `STALL`"] +pub type STALL_R = crate::R; +#[doc = "Write proxy for field `STALL`"] +pub struct STALL_W<'a> { w: &'a mut W, } -impl<'a> _STALLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NAKW<'a> { +#[doc = "Reader of field `NAK`"] +pub type NAK_R = crate::R; +#[doc = "Write proxy for field `NAK`"] +pub struct NAK_W<'a> { w: &'a mut W, } -impl<'a> _NAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ACKW<'a> { +#[doc = "Reader of field `ACK`"] +pub type ACK_R = crate::R; +#[doc = "Write proxy for field `ACK`"] +pub struct ACK_W<'a> { w: &'a mut W, } -impl<'a> _ACKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _USBERW<'a> { +#[doc = "Reader of field `USBER`"] +pub type USBER_R = crate::R; +#[doc = "Write proxy for field `USBER`"] +pub struct USBER_W<'a> { w: &'a mut W, } -impl<'a> _USBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BBERW<'a> { +#[doc = "Reader of field `BBER`"] +pub type BBER_R = crate::R; +#[doc = "Write proxy for field `BBER`"] +pub struct BBER_W<'a> { w: &'a mut W, } -impl<'a> _BBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _REQOVRW<'a> { +#[doc = "Reader of field `REQOVR`"] +pub type REQOVR_R = crate::R; +#[doc = "Write proxy for field `REQOVR`"] +pub struct REQOVR_W<'a> { w: &'a mut W, } -impl<'a> _REQOVRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REQOVR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _DTERW<'a> { +#[doc = "Reader of field `DTER`"] +pub type DTER_R = crate::R; +#[doc = "Write proxy for field `DTER`"] +pub struct DTER_W<'a> { w: &'a mut W, } -impl<'a> _DTERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&self) -> TFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFR { bits } + #[inline(always)] + pub fn tf(&self) -> TF_R { + TF_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Channel halted"] - #[inline] - pub fn ch(&self) -> CHR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHR { bits } + #[inline(always)] + pub fn ch(&self) -> CH_R { + CH_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - STALL response received interrupt"] - #[inline] - pub fn stall(&self) -> STALLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLR { bits } + #[inline(always)] + pub fn stall(&self) -> STALL_R { + STALL_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - NAK response received interrupt"] - #[inline] - pub fn nak(&self) -> NAKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKR { bits } + #[inline(always)] + pub fn nak(&self) -> NAK_R { + NAK_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - ACK response received/transmitted interrupt"] - #[inline] - pub fn ack(&self) -> ACKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ACKR { bits } + #[inline(always)] + pub fn ack(&self) -> ACK_R { + ACK_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 7 - USB bus error"] - #[inline] - pub fn usber(&self) -> USBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBERR { bits } + #[inline(always)] + pub fn usber(&self) -> USBER_R { + USBER_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Babble error"] - #[inline] - pub fn bber(&self) -> BBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BBERR { bits } + #[inline(always)] + pub fn bber(&self) -> BBER_R { + BBER_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Request queue overrun"] - #[inline] - pub fn reqovr(&self) -> REQOVRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - REQOVRR { bits } + #[inline(always)] + pub fn reqovr(&self) -> REQOVR_R { + REQOVR_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Data toggle error"] - #[inline] - pub fn dter(&self) -> DTERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTERR { bits } + #[inline(always)] + pub fn dter(&self) -> DTER_R { + DTER_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&mut self) -> _TFW { - _TFW { w: self } + #[inline(always)] + pub fn tf(&mut self) -> TF_W { + TF_W { w: self } } #[doc = "Bit 1 - Channel halted"] - #[inline] - pub fn ch(&mut self) -> _CHW { - _CHW { w: self } + #[inline(always)] + pub fn ch(&mut self) -> CH_W { + CH_W { w: self } } #[doc = "Bit 3 - STALL response received interrupt"] - #[inline] - pub fn stall(&mut self) -> _STALLW { - _STALLW { w: self } + #[inline(always)] + pub fn stall(&mut self) -> STALL_W { + STALL_W { w: self } } #[doc = "Bit 4 - NAK response received interrupt"] - #[inline] - pub fn nak(&mut self) -> _NAKW { - _NAKW { w: self } + #[inline(always)] + pub fn nak(&mut self) -> NAK_W { + NAK_W { w: self } } #[doc = "Bit 5 - ACK response received/transmitted interrupt"] - #[inline] - pub fn ack(&mut self) -> _ACKW { - _ACKW { w: self } + #[inline(always)] + pub fn ack(&mut self) -> ACK_W { + ACK_W { w: self } } #[doc = "Bit 7 - USB bus error"] - #[inline] - pub fn usber(&mut self) -> _USBERW { - _USBERW { w: self } + #[inline(always)] + pub fn usber(&mut self) -> USBER_W { + USBER_W { w: self } } #[doc = "Bit 8 - Babble error"] - #[inline] - pub fn bber(&mut self) -> _BBERW { - _BBERW { w: self } + #[inline(always)] + pub fn bber(&mut self) -> BBER_W { + BBER_W { w: self } } #[doc = "Bit 9 - Request queue overrun"] - #[inline] - pub fn reqovr(&mut self) -> _REQOVRW { - _REQOVRW { w: self } + #[inline(always)] + pub fn reqovr(&mut self) -> REQOVR_W { + REQOVR_W { w: self } } #[doc = "Bit 10 - Data toggle error"] - #[inline] - pub fn dter(&mut self) -> _DTERW { - _DTERW { w: self } + #[inline(always)] + pub fn dter(&mut self) -> DTER_W { + DTER_W { w: self } } } diff --git a/src/usbfs_host/hch0len.rs b/src/usbfs_host/hch0len.rs index 7a6c58db6f065a560992895f81f97f0421798b0d..527e7440c33ef8acef3d0b6724eb1a2f2bedebbb 100644 --- a/src/usbfs_host/hch0len.rs +++ b/src/usbfs_host/hch0len.rs @@ -1,187 +1,88 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH0LEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TLENR { - bits: u32, -} -impl TLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PCNTR { - bits: u16, -} -impl PCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DPIDR { - bits: u8, -} -impl DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _TLENW<'a> { +#[doc = "Reader of register HCH0LEN"] +pub type R = crate::R; +#[doc = "Writer for register HCH0LEN"] +pub type W = crate::W; +#[doc = "Register HCH0LEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH0LEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TLEN`"] +pub type TLEN_R = crate::R; +#[doc = "Write proxy for field `TLEN`"] +pub struct TLEN_W<'a> { w: &'a mut W, } -impl<'a> _TLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0007_ffff) | ((value as u32) & 0x0007_ffff); self.w } } -#[doc = r" Proxy"] -pub struct _PCNTW<'a> { +#[doc = "Reader of field `PCNT`"] +pub type PCNT_R = crate::R; +#[doc = "Write proxy for field `PCNT`"] +pub struct PCNT_W<'a> { w: &'a mut W, } -impl<'a> _PCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03ff << 19)) | (((value as u32) & 0x03ff) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _DPIDW<'a> { +#[doc = "Reader of field `DPID`"] +pub type DPID_R = crate::R; +#[doc = "Write proxy for field `DPID`"] +pub struct DPID_W<'a> { w: &'a mut W, } -impl<'a> _DPIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DPID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 29)) | (((value as u32) & 0x03) << 29); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&self) -> TLENR { - let bits = { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - TLENR { bits } + #[inline(always)] + pub fn tlen(&self) -> TLEN_R { + TLEN_R::new((self.bits & 0x0007_ffff) as u32) } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&self) -> PCNTR { - let bits = { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - PCNTR { bits } + #[inline(always)] + pub fn pcnt(&self) -> PCNT_R { + PCNT_R::new(((self.bits >> 19) & 0x03ff) as u16) } #[doc = "Bits 29:30 - Data PID"] - #[inline] - pub fn dpid(&self) -> DPIDR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DPIDR { bits } + #[inline(always)] + pub fn dpid(&self) -> DPID_R { + DPID_R::new(((self.bits >> 29) & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&mut self) -> _TLENW { - _TLENW { w: self } + #[inline(always)] + pub fn tlen(&mut self) -> TLEN_W { + TLEN_W { w: self } } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&mut self) -> _PCNTW { - _PCNTW { w: self } + #[inline(always)] + pub fn pcnt(&mut self) -> PCNT_W { + PCNT_W { w: self } } #[doc = "Bits 29:30 - Data PID"] - #[inline] - pub fn dpid(&mut self) -> _DPIDW { - _DPIDW { w: self } + #[inline(always)] + pub fn dpid(&mut self) -> DPID_W { + DPID_W { w: self } } } diff --git a/src/usbfs_host/hch1ctl.rs b/src/usbfs_host/hch1ctl.rs index 7be161e008a64651f876ff0e2cb3859b89ba08d7..51ed4f633745941e476fdcf8cb28ab0f7fb672e0 100644 --- a/src/usbfs_host/hch1ctl.rs +++ b/src/usbfs_host/hch1ctl.rs @@ -1,523 +1,282 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH1CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MPLR { - bits: u16, -} -impl MPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPNUMR { - bits: u8, -} -impl EPNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPDIRR { - bits: bool, -} -impl EPDIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LSDR { - bits: bool, -} -impl LSDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTYPER { - bits: u8, -} -impl EPTYPER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DARR { - bits: u8, -} -impl DARR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ODDFRMR { - bits: bool, -} -impl ODDFRMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CDISR { - bits: bool, -} -impl CDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CENR { - bits: bool, -} -impl CENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _MPLW<'a> { +#[doc = "Reader of register HCH1CTL"] +pub type R = crate::R; +#[doc = "Writer for register HCH1CTL"] +pub type W = crate::W; +#[doc = "Register HCH1CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH1CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MPL`"] +pub type MPL_R = crate::R; +#[doc = "Write proxy for field `MPL`"] +pub struct MPL_W<'a> { w: &'a mut W, } -impl<'a> _MPLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MPL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07ff) | ((value as u32) & 0x07ff); self.w } } -#[doc = r" Proxy"] -pub struct _EPNUMW<'a> { +#[doc = "Reader of field `EPNUM`"] +pub type EPNUM_R = crate::R; +#[doc = "Write proxy for field `EPNUM`"] +pub struct EPNUM_W<'a> { w: &'a mut W, } -impl<'a> _EPNUMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPNUM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 11)) | (((value as u32) & 0x0f) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _EPDIRW<'a> { +#[doc = "Reader of field `EPDIR`"] +pub type EPDIR_R = crate::R; +#[doc = "Write proxy for field `EPDIR`"] +pub struct EPDIR_W<'a> { w: &'a mut W, } -impl<'a> _EPDIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _LSDW<'a> { +#[doc = "Reader of field `LSD`"] +pub type LSD_R = crate::R; +#[doc = "Write proxy for field `LSD`"] +pub struct LSD_W<'a> { w: &'a mut W, } -impl<'a> _LSDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LSD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _EPTYPEW<'a> { +#[doc = "Reader of field `EPTYPE`"] +pub type EPTYPE_R = crate::R; +#[doc = "Write proxy for field `EPTYPE`"] +pub struct EPTYPE_W<'a> { w: &'a mut W, } -impl<'a> _EPTYPEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPTYPE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _DARW<'a> { +#[doc = "Reader of field `DAR`"] +pub type DAR_R = crate::R; +#[doc = "Write proxy for field `DAR`"] +pub struct DAR_W<'a> { w: &'a mut W, } -impl<'a> _DARW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x7f << 22)) | (((value as u32) & 0x7f) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _ODDFRMW<'a> { +#[doc = "Reader of field `ODDFRM`"] +pub type ODDFRM_R = crate::R; +#[doc = "Write proxy for field `ODDFRM`"] +pub struct ODDFRM_W<'a> { w: &'a mut W, } -impl<'a> _ODDFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ODDFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _CDISW<'a> { +#[doc = "Reader of field `CDIS`"] +pub type CDIS_R = crate::R; +#[doc = "Write proxy for field `CDIS`"] +pub struct CDIS_W<'a> { w: &'a mut W, } -impl<'a> _CDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _CENW<'a> { +#[doc = "Reader of field `CEN`"] +pub type CEN_R = crate::R; +#[doc = "Write proxy for field `CEN`"] +pub struct CEN_W<'a> { w: &'a mut W, } -impl<'a> _CENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:10 - Maximum packet size"] - #[inline] - pub fn mpl(&self) -> MPLR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - MPLR { bits } + #[inline(always)] + pub fn mpl(&self) -> MPL_R { + MPL_R::new((self.bits & 0x07ff) as u16) } #[doc = "Bits 11:14 - Endpoint number"] - #[inline] - pub fn epnum(&self) -> EPNUMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPNUMR { bits } + #[inline(always)] + pub fn epnum(&self) -> EPNUM_R { + EPNUM_R::new(((self.bits >> 11) & 0x0f) as u8) } #[doc = "Bit 15 - Endpoint direction"] - #[inline] - pub fn epdir(&self) -> EPDIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDIRR { bits } + #[inline(always)] + pub fn epdir(&self) -> EPDIR_R { + EPDIR_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 17 - Low-speed device"] - #[inline] - pub fn lsd(&self) -> LSDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LSDR { bits } + #[inline(always)] + pub fn lsd(&self) -> LSD_R { + LSD_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&self) -> EPTYPER { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPTYPER { bits } + #[inline(always)] + pub fn eptype(&self) -> EPTYPE_R { + EPTYPE_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bits 22:28 - Device address"] - #[inline] - pub fn dar(&self) -> DARR { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DARR { bits } + #[inline(always)] + pub fn dar(&self) -> DAR_R { + DAR_R::new(((self.bits >> 22) & 0x7f) as u8) } #[doc = "Bit 29 - Odd frame"] - #[inline] - pub fn oddfrm(&self) -> ODDFRMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ODDFRMR { bits } + #[inline(always)] + pub fn oddfrm(&self) -> ODDFRM_R { + ODDFRM_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Channel disable"] - #[inline] - pub fn cdis(&self) -> CDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CDISR { bits } + #[inline(always)] + pub fn cdis(&self) -> CDIS_R { + CDIS_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Channel enable"] - #[inline] - pub fn cen(&self) -> CENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CENR { bits } + #[inline(always)] + pub fn cen(&self) -> CEN_R { + CEN_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:10 - Maximum packet size"] - #[inline] - pub fn mpl(&mut self) -> _MPLW { - _MPLW { w: self } + #[inline(always)] + pub fn mpl(&mut self) -> MPL_W { + MPL_W { w: self } } #[doc = "Bits 11:14 - Endpoint number"] - #[inline] - pub fn epnum(&mut self) -> _EPNUMW { - _EPNUMW { w: self } + #[inline(always)] + pub fn epnum(&mut self) -> EPNUM_W { + EPNUM_W { w: self } } #[doc = "Bit 15 - Endpoint direction"] - #[inline] - pub fn epdir(&mut self) -> _EPDIRW { - _EPDIRW { w: self } + #[inline(always)] + pub fn epdir(&mut self) -> EPDIR_W { + EPDIR_W { w: self } } #[doc = "Bit 17 - Low-speed device"] - #[inline] - pub fn lsd(&mut self) -> _LSDW { - _LSDW { w: self } + #[inline(always)] + pub fn lsd(&mut self) -> LSD_W { + LSD_W { w: self } } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&mut self) -> _EPTYPEW { - _EPTYPEW { w: self } + #[inline(always)] + pub fn eptype(&mut self) -> EPTYPE_W { + EPTYPE_W { w: self } } #[doc = "Bits 22:28 - Device address"] - #[inline] - pub fn dar(&mut self) -> _DARW { - _DARW { w: self } + #[inline(always)] + pub fn dar(&mut self) -> DAR_W { + DAR_W { w: self } } #[doc = "Bit 29 - Odd frame"] - #[inline] - pub fn oddfrm(&mut self) -> _ODDFRMW { - _ODDFRMW { w: self } + #[inline(always)] + pub fn oddfrm(&mut self) -> ODDFRM_W { + ODDFRM_W { w: self } } #[doc = "Bit 30 - Channel disable"] - #[inline] - pub fn cdis(&mut self) -> _CDISW { - _CDISW { w: self } + #[inline(always)] + pub fn cdis(&mut self) -> CDIS_W { + CDIS_W { w: self } } #[doc = "Bit 31 - Channel enable"] - #[inline] - pub fn cen(&mut self) -> _CENW { - _CENW { w: self } + #[inline(always)] + pub fn cen(&mut self) -> CEN_W { + CEN_W { w: self } } } diff --git a/src/usbfs_host/hch1inten.rs b/src/usbfs_host/hch1inten.rs index aa9df08e1e8e86ef384bb787b9d8808f31daef06..6399a6b03416f240ae7756e9f71c3c9076e1f06b 100644 --- a/src/usbfs_host/hch1inten.rs +++ b/src/usbfs_host/hch1inten.rs @@ -1,595 +1,322 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH1INTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFIER { - bits: bool, -} -impl TFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CHIER { - bits: bool, -} -impl CHIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLIER { - bits: bool, -} -impl STALLIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKIER { - bits: bool, -} -impl NAKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKIER { - bits: bool, -} -impl ACKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBERIER { - bits: bool, -} -impl USBERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BBERIER { - bits: bool, -} -impl BBERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct REQOVRIER { - bits: bool, -} -impl REQOVRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTERIER { - bits: bool, -} -impl DTERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFIEW<'a> { +#[doc = "Reader of register HCH1INTEN"] +pub type R = crate::R; +#[doc = "Writer for register HCH1INTEN"] +pub type W = crate::W; +#[doc = "Register HCH1INTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH1INTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TFIE`"] +pub type TFIE_R = crate::R; +#[doc = "Write proxy for field `TFIE`"] +pub struct TFIE_W<'a> { w: &'a mut W, } -impl<'a> _TFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _CHIEW<'a> { +#[doc = "Reader of field `CHIE`"] +pub type CHIE_R = crate::R; +#[doc = "Write proxy for field `CHIE`"] +pub struct CHIE_W<'a> { w: &'a mut W, } -impl<'a> _CHIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STALLIEW<'a> { +#[doc = "Reader of field `STALLIE`"] +pub type STALLIE_R = crate::R; +#[doc = "Write proxy for field `STALLIE`"] +pub struct STALLIE_W<'a> { w: &'a mut W, } -impl<'a> _STALLIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALLIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NAKIEW<'a> { +#[doc = "Reader of field `NAKIE`"] +pub type NAKIE_R = crate::R; +#[doc = "Write proxy for field `NAKIE`"] +pub struct NAKIE_W<'a> { w: &'a mut W, } -impl<'a> _NAKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NAKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ACKIEW<'a> { +#[doc = "Reader of field `ACKIE`"] +pub type ACKIE_R = crate::R; +#[doc = "Write proxy for field `ACKIE`"] +pub struct ACKIE_W<'a> { w: &'a mut W, } -impl<'a> _ACKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _USBERIEW<'a> { +#[doc = "Reader of field `USBERIE`"] +pub type USBERIE_R = crate::R; +#[doc = "Write proxy for field `USBERIE`"] +pub struct USBERIE_W<'a> { w: &'a mut W, } -impl<'a> _USBERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BBERIEW<'a> { +#[doc = "Reader of field `BBERIE`"] +pub type BBERIE_R = crate::R; +#[doc = "Write proxy for field `BBERIE`"] +pub struct BBERIE_W<'a> { w: &'a mut W, } -impl<'a> _BBERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BBERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _REQOVRIEW<'a> { +#[doc = "Reader of field `REQOVRIE`"] +pub type REQOVRIE_R = crate::R; +#[doc = "Write proxy for field `REQOVRIE`"] +pub struct REQOVRIE_W<'a> { w: &'a mut W, } -impl<'a> _REQOVRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REQOVRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _DTERIEW<'a> { +#[doc = "Reader of field `DTERIE`"] +pub type DTERIE_R = crate::R; +#[doc = "Write proxy for field `DTERIE`"] +pub struct DTERIE_W<'a> { w: &'a mut W, } -impl<'a> _DTERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer completed interrupt enable"] - #[inline] - pub fn tfie(&self) -> TFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFIER { bits } + #[inline(always)] + pub fn tfie(&self) -> TFIE_R { + TFIE_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Channel halted interrupt enable"] - #[inline] - pub fn chie(&self) -> CHIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHIER { bits } + #[inline(always)] + pub fn chie(&self) -> CHIE_R { + CHIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - STALL interrupt enable"] - #[inline] - pub fn stallie(&self) -> STALLIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLIER { bits } + #[inline(always)] + pub fn stallie(&self) -> STALLIE_R { + STALLIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - NAK interrupt enable"] - #[inline] - pub fn nakie(&self) -> NAKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKIER { bits } + #[inline(always)] + pub fn nakie(&self) -> NAKIE_R { + NAKIE_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - ACK interrupt enable"] - #[inline] - pub fn ackie(&self) -> ACKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ACKIER { bits } + #[inline(always)] + pub fn ackie(&self) -> ACKIE_R { + ACKIE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 7 - USB bus error interrupt enable"] - #[inline] - pub fn usberie(&self) -> USBERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBERIER { bits } + #[inline(always)] + pub fn usberie(&self) -> USBERIE_R { + USBERIE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Babble error interrupt enable"] - #[inline] - pub fn bberie(&self) -> BBERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BBERIER { bits } + #[inline(always)] + pub fn bberie(&self) -> BBERIE_R { + BBERIE_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - request queue overrun interrupt enable"] - #[inline] - pub fn reqovrie(&self) -> REQOVRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - REQOVRIER { bits } + #[inline(always)] + pub fn reqovrie(&self) -> REQOVRIE_R { + REQOVRIE_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Data toggle error interrupt enable"] - #[inline] - pub fn dterie(&self) -> DTERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTERIER { bits } + #[inline(always)] + pub fn dterie(&self) -> DTERIE_R { + DTERIE_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer completed interrupt enable"] - #[inline] - pub fn tfie(&mut self) -> _TFIEW { - _TFIEW { w: self } + #[inline(always)] + pub fn tfie(&mut self) -> TFIE_W { + TFIE_W { w: self } } #[doc = "Bit 1 - Channel halted interrupt enable"] - #[inline] - pub fn chie(&mut self) -> _CHIEW { - _CHIEW { w: self } + #[inline(always)] + pub fn chie(&mut self) -> CHIE_W { + CHIE_W { w: self } } #[doc = "Bit 3 - STALL interrupt enable"] - #[inline] - pub fn stallie(&mut self) -> _STALLIEW { - _STALLIEW { w: self } + #[inline(always)] + pub fn stallie(&mut self) -> STALLIE_W { + STALLIE_W { w: self } } #[doc = "Bit 4 - NAK interrupt enable"] - #[inline] - pub fn nakie(&mut self) -> _NAKIEW { - _NAKIEW { w: self } + #[inline(always)] + pub fn nakie(&mut self) -> NAKIE_W { + NAKIE_W { w: self } } #[doc = "Bit 5 - ACK interrupt enable"] - #[inline] - pub fn ackie(&mut self) -> _ACKIEW { - _ACKIEW { w: self } + #[inline(always)] + pub fn ackie(&mut self) -> ACKIE_W { + ACKIE_W { w: self } } #[doc = "Bit 7 - USB bus error interrupt enable"] - #[inline] - pub fn usberie(&mut self) -> _USBERIEW { - _USBERIEW { w: self } + #[inline(always)] + pub fn usberie(&mut self) -> USBERIE_W { + USBERIE_W { w: self } } #[doc = "Bit 8 - Babble error interrupt enable"] - #[inline] - pub fn bberie(&mut self) -> _BBERIEW { - _BBERIEW { w: self } + #[inline(always)] + pub fn bberie(&mut self) -> BBERIE_W { + BBERIE_W { w: self } } #[doc = "Bit 9 - request queue overrun interrupt enable"] - #[inline] - pub fn reqovrie(&mut self) -> _REQOVRIEW { - _REQOVRIEW { w: self } + #[inline(always)] + pub fn reqovrie(&mut self) -> REQOVRIE_W { + REQOVRIE_W { w: self } } #[doc = "Bit 10 - Data toggle error interrupt enable"] - #[inline] - pub fn dterie(&mut self) -> _DTERIEW { - _DTERIEW { w: self } + #[inline(always)] + pub fn dterie(&mut self) -> DTERIE_W { + DTERIE_W { w: self } } } diff --git a/src/usbfs_host/hch1intf.rs b/src/usbfs_host/hch1intf.rs index 652788266369480e700e79d1f4b940aaa1f3bdc8..7f16c84aeacb5b627edd46b3b231a6cacc6502b0 100644 --- a/src/usbfs_host/hch1intf.rs +++ b/src/usbfs_host/hch1intf.rs @@ -1,595 +1,322 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH1INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFR { - bits: bool, -} -impl TFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CHR { - bits: bool, -} -impl CHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLR { - bits: bool, -} -impl STALLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKR { - bits: bool, -} -impl NAKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKR { - bits: bool, -} -impl ACKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBERR { - bits: bool, -} -impl USBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BBERR { - bits: bool, -} -impl BBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct REQOVRR { - bits: bool, -} -impl REQOVRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTERR { - bits: bool, -} -impl DTERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFW<'a> { +#[doc = "Reader of register HCH1INTF"] +pub type R = crate::R; +#[doc = "Writer for register HCH1INTF"] +pub type W = crate::W; +#[doc = "Register HCH1INTF `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH1INTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TF`"] +pub type TF_R = crate::R; +#[doc = "Write proxy for field `TF`"] +pub struct TF_W<'a> { w: &'a mut W, } -impl<'a> _TFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _CHW<'a> { +#[doc = "Reader of field `CH`"] +pub type CH_R = crate::R; +#[doc = "Write proxy for field `CH`"] +pub struct CH_W<'a> { w: &'a mut W, } -impl<'a> _CHW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STALLW<'a> { +#[doc = "Reader of field `STALL`"] +pub type STALL_R = crate::R; +#[doc = "Write proxy for field `STALL`"] +pub struct STALL_W<'a> { w: &'a mut W, } -impl<'a> _STALLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NAKW<'a> { +#[doc = "Reader of field `NAK`"] +pub type NAK_R = crate::R; +#[doc = "Write proxy for field `NAK`"] +pub struct NAK_W<'a> { w: &'a mut W, } -impl<'a> _NAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ACKW<'a> { +#[doc = "Reader of field `ACK`"] +pub type ACK_R = crate::R; +#[doc = "Write proxy for field `ACK`"] +pub struct ACK_W<'a> { w: &'a mut W, } -impl<'a> _ACKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _USBERW<'a> { +#[doc = "Reader of field `USBER`"] +pub type USBER_R = crate::R; +#[doc = "Write proxy for field `USBER`"] +pub struct USBER_W<'a> { w: &'a mut W, } -impl<'a> _USBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BBERW<'a> { +#[doc = "Reader of field `BBER`"] +pub type BBER_R = crate::R; +#[doc = "Write proxy for field `BBER`"] +pub struct BBER_W<'a> { w: &'a mut W, } -impl<'a> _BBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _REQOVRW<'a> { +#[doc = "Reader of field `REQOVR`"] +pub type REQOVR_R = crate::R; +#[doc = "Write proxy for field `REQOVR`"] +pub struct REQOVR_W<'a> { w: &'a mut W, } -impl<'a> _REQOVRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REQOVR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _DTERW<'a> { +#[doc = "Reader of field `DTER`"] +pub type DTER_R = crate::R; +#[doc = "Write proxy for field `DTER`"] +pub struct DTER_W<'a> { w: &'a mut W, } -impl<'a> _DTERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&self) -> TFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFR { bits } + #[inline(always)] + pub fn tf(&self) -> TF_R { + TF_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Channel halted"] - #[inline] - pub fn ch(&self) -> CHR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHR { bits } + #[inline(always)] + pub fn ch(&self) -> CH_R { + CH_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - STALL response received interrupt"] - #[inline] - pub fn stall(&self) -> STALLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLR { bits } + #[inline(always)] + pub fn stall(&self) -> STALL_R { + STALL_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - NAK response received interrupt"] - #[inline] - pub fn nak(&self) -> NAKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKR { bits } + #[inline(always)] + pub fn nak(&self) -> NAK_R { + NAK_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - ACK response received/transmitted interrupt"] - #[inline] - pub fn ack(&self) -> ACKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ACKR { bits } + #[inline(always)] + pub fn ack(&self) -> ACK_R { + ACK_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 7 - USB bus error"] - #[inline] - pub fn usber(&self) -> USBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBERR { bits } + #[inline(always)] + pub fn usber(&self) -> USBER_R { + USBER_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Babble error"] - #[inline] - pub fn bber(&self) -> BBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BBERR { bits } + #[inline(always)] + pub fn bber(&self) -> BBER_R { + BBER_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Request queue overrun"] - #[inline] - pub fn reqovr(&self) -> REQOVRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - REQOVRR { bits } + #[inline(always)] + pub fn reqovr(&self) -> REQOVR_R { + REQOVR_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Data toggle error"] - #[inline] - pub fn dter(&self) -> DTERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTERR { bits } + #[inline(always)] + pub fn dter(&self) -> DTER_R { + DTER_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&mut self) -> _TFW { - _TFW { w: self } + #[inline(always)] + pub fn tf(&mut self) -> TF_W { + TF_W { w: self } } #[doc = "Bit 1 - Channel halted"] - #[inline] - pub fn ch(&mut self) -> _CHW { - _CHW { w: self } + #[inline(always)] + pub fn ch(&mut self) -> CH_W { + CH_W { w: self } } #[doc = "Bit 3 - STALL response received interrupt"] - #[inline] - pub fn stall(&mut self) -> _STALLW { - _STALLW { w: self } + #[inline(always)] + pub fn stall(&mut self) -> STALL_W { + STALL_W { w: self } } #[doc = "Bit 4 - NAK response received interrupt"] - #[inline] - pub fn nak(&mut self) -> _NAKW { - _NAKW { w: self } + #[inline(always)] + pub fn nak(&mut self) -> NAK_W { + NAK_W { w: self } } #[doc = "Bit 5 - ACK response received/transmitted interrupt"] - #[inline] - pub fn ack(&mut self) -> _ACKW { - _ACKW { w: self } + #[inline(always)] + pub fn ack(&mut self) -> ACK_W { + ACK_W { w: self } } #[doc = "Bit 7 - USB bus error"] - #[inline] - pub fn usber(&mut self) -> _USBERW { - _USBERW { w: self } + #[inline(always)] + pub fn usber(&mut self) -> USBER_W { + USBER_W { w: self } } #[doc = "Bit 8 - Babble error"] - #[inline] - pub fn bber(&mut self) -> _BBERW { - _BBERW { w: self } + #[inline(always)] + pub fn bber(&mut self) -> BBER_W { + BBER_W { w: self } } #[doc = "Bit 9 - Request queue overrun"] - #[inline] - pub fn reqovr(&mut self) -> _REQOVRW { - _REQOVRW { w: self } + #[inline(always)] + pub fn reqovr(&mut self) -> REQOVR_W { + REQOVR_W { w: self } } #[doc = "Bit 10 - Data toggle error"] - #[inline] - pub fn dter(&mut self) -> _DTERW { - _DTERW { w: self } + #[inline(always)] + pub fn dter(&mut self) -> DTER_W { + DTER_W { w: self } } } diff --git a/src/usbfs_host/hch1len.rs b/src/usbfs_host/hch1len.rs index 39f6889d1569e0b01be867600a920c4f86d7e0ac..049e2c446f658f5115f529d271a9fa919097b6ea 100644 --- a/src/usbfs_host/hch1len.rs +++ b/src/usbfs_host/hch1len.rs @@ -1,187 +1,88 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH1LEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TLENR { - bits: u32, -} -impl TLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PCNTR { - bits: u16, -} -impl PCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DPIDR { - bits: u8, -} -impl DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _TLENW<'a> { +#[doc = "Reader of register HCH1LEN"] +pub type R = crate::R; +#[doc = "Writer for register HCH1LEN"] +pub type W = crate::W; +#[doc = "Register HCH1LEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH1LEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TLEN`"] +pub type TLEN_R = crate::R; +#[doc = "Write proxy for field `TLEN`"] +pub struct TLEN_W<'a> { w: &'a mut W, } -impl<'a> _TLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0007_ffff) | ((value as u32) & 0x0007_ffff); self.w } } -#[doc = r" Proxy"] -pub struct _PCNTW<'a> { +#[doc = "Reader of field `PCNT`"] +pub type PCNT_R = crate::R; +#[doc = "Write proxy for field `PCNT`"] +pub struct PCNT_W<'a> { w: &'a mut W, } -impl<'a> _PCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03ff << 19)) | (((value as u32) & 0x03ff) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _DPIDW<'a> { +#[doc = "Reader of field `DPID`"] +pub type DPID_R = crate::R; +#[doc = "Write proxy for field `DPID`"] +pub struct DPID_W<'a> { w: &'a mut W, } -impl<'a> _DPIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DPID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 29)) | (((value as u32) & 0x03) << 29); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&self) -> TLENR { - let bits = { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - TLENR { bits } + #[inline(always)] + pub fn tlen(&self) -> TLEN_R { + TLEN_R::new((self.bits & 0x0007_ffff) as u32) } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&self) -> PCNTR { - let bits = { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - PCNTR { bits } + #[inline(always)] + pub fn pcnt(&self) -> PCNT_R { + PCNT_R::new(((self.bits >> 19) & 0x03ff) as u16) } #[doc = "Bits 29:30 - Data PID"] - #[inline] - pub fn dpid(&self) -> DPIDR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DPIDR { bits } + #[inline(always)] + pub fn dpid(&self) -> DPID_R { + DPID_R::new(((self.bits >> 29) & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&mut self) -> _TLENW { - _TLENW { w: self } + #[inline(always)] + pub fn tlen(&mut self) -> TLEN_W { + TLEN_W { w: self } } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&mut self) -> _PCNTW { - _PCNTW { w: self } + #[inline(always)] + pub fn pcnt(&mut self) -> PCNT_W { + PCNT_W { w: self } } #[doc = "Bits 29:30 - Data PID"] - #[inline] - pub fn dpid(&mut self) -> _DPIDW { - _DPIDW { w: self } + #[inline(always)] + pub fn dpid(&mut self) -> DPID_W { + DPID_W { w: self } } } diff --git a/src/usbfs_host/hch2ctl.rs b/src/usbfs_host/hch2ctl.rs index 85710ae5f4b876a0c87777f1a1c37047957f5598..15beef4f909755eff455ab85955df11e9954f0f1 100644 --- a/src/usbfs_host/hch2ctl.rs +++ b/src/usbfs_host/hch2ctl.rs @@ -1,523 +1,282 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH2CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MPLR { - bits: u16, -} -impl MPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPNUMR { - bits: u8, -} -impl EPNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPDIRR { - bits: bool, -} -impl EPDIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LSDR { - bits: bool, -} -impl LSDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTYPER { - bits: u8, -} -impl EPTYPER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DARR { - bits: u8, -} -impl DARR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ODDFRMR { - bits: bool, -} -impl ODDFRMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CDISR { - bits: bool, -} -impl CDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CENR { - bits: bool, -} -impl CENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _MPLW<'a> { +#[doc = "Reader of register HCH2CTL"] +pub type R = crate::R; +#[doc = "Writer for register HCH2CTL"] +pub type W = crate::W; +#[doc = "Register HCH2CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH2CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MPL`"] +pub type MPL_R = crate::R; +#[doc = "Write proxy for field `MPL`"] +pub struct MPL_W<'a> { w: &'a mut W, } -impl<'a> _MPLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MPL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07ff) | ((value as u32) & 0x07ff); self.w } } -#[doc = r" Proxy"] -pub struct _EPNUMW<'a> { +#[doc = "Reader of field `EPNUM`"] +pub type EPNUM_R = crate::R; +#[doc = "Write proxy for field `EPNUM`"] +pub struct EPNUM_W<'a> { w: &'a mut W, } -impl<'a> _EPNUMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPNUM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 11)) | (((value as u32) & 0x0f) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _EPDIRW<'a> { +#[doc = "Reader of field `EPDIR`"] +pub type EPDIR_R = crate::R; +#[doc = "Write proxy for field `EPDIR`"] +pub struct EPDIR_W<'a> { w: &'a mut W, } -impl<'a> _EPDIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _LSDW<'a> { +#[doc = "Reader of field `LSD`"] +pub type LSD_R = crate::R; +#[doc = "Write proxy for field `LSD`"] +pub struct LSD_W<'a> { w: &'a mut W, } -impl<'a> _LSDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LSD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _EPTYPEW<'a> { +#[doc = "Reader of field `EPTYPE`"] +pub type EPTYPE_R = crate::R; +#[doc = "Write proxy for field `EPTYPE`"] +pub struct EPTYPE_W<'a> { w: &'a mut W, } -impl<'a> _EPTYPEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPTYPE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _DARW<'a> { +#[doc = "Reader of field `DAR`"] +pub type DAR_R = crate::R; +#[doc = "Write proxy for field `DAR`"] +pub struct DAR_W<'a> { w: &'a mut W, } -impl<'a> _DARW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x7f << 22)) | (((value as u32) & 0x7f) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _ODDFRMW<'a> { +#[doc = "Reader of field `ODDFRM`"] +pub type ODDFRM_R = crate::R; +#[doc = "Write proxy for field `ODDFRM`"] +pub struct ODDFRM_W<'a> { w: &'a mut W, } -impl<'a> _ODDFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ODDFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _CDISW<'a> { +#[doc = "Reader of field `CDIS`"] +pub type CDIS_R = crate::R; +#[doc = "Write proxy for field `CDIS`"] +pub struct CDIS_W<'a> { w: &'a mut W, } -impl<'a> _CDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _CENW<'a> { +#[doc = "Reader of field `CEN`"] +pub type CEN_R = crate::R; +#[doc = "Write proxy for field `CEN`"] +pub struct CEN_W<'a> { w: &'a mut W, } -impl<'a> _CENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:10 - Maximum packet size"] - #[inline] - pub fn mpl(&self) -> MPLR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - MPLR { bits } + #[inline(always)] + pub fn mpl(&self) -> MPL_R { + MPL_R::new((self.bits & 0x07ff) as u16) } #[doc = "Bits 11:14 - Endpoint number"] - #[inline] - pub fn epnum(&self) -> EPNUMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPNUMR { bits } + #[inline(always)] + pub fn epnum(&self) -> EPNUM_R { + EPNUM_R::new(((self.bits >> 11) & 0x0f) as u8) } #[doc = "Bit 15 - Endpoint direction"] - #[inline] - pub fn epdir(&self) -> EPDIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDIRR { bits } + #[inline(always)] + pub fn epdir(&self) -> EPDIR_R { + EPDIR_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 17 - Low-speed device"] - #[inline] - pub fn lsd(&self) -> LSDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LSDR { bits } + #[inline(always)] + pub fn lsd(&self) -> LSD_R { + LSD_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&self) -> EPTYPER { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPTYPER { bits } + #[inline(always)] + pub fn eptype(&self) -> EPTYPE_R { + EPTYPE_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bits 22:28 - Device address"] - #[inline] - pub fn dar(&self) -> DARR { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DARR { bits } + #[inline(always)] + pub fn dar(&self) -> DAR_R { + DAR_R::new(((self.bits >> 22) & 0x7f) as u8) } #[doc = "Bit 29 - Odd frame"] - #[inline] - pub fn oddfrm(&self) -> ODDFRMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ODDFRMR { bits } + #[inline(always)] + pub fn oddfrm(&self) -> ODDFRM_R { + ODDFRM_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Channel disable"] - #[inline] - pub fn cdis(&self) -> CDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CDISR { bits } + #[inline(always)] + pub fn cdis(&self) -> CDIS_R { + CDIS_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Channel enable"] - #[inline] - pub fn cen(&self) -> CENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CENR { bits } + #[inline(always)] + pub fn cen(&self) -> CEN_R { + CEN_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:10 - Maximum packet size"] - #[inline] - pub fn mpl(&mut self) -> _MPLW { - _MPLW { w: self } + #[inline(always)] + pub fn mpl(&mut self) -> MPL_W { + MPL_W { w: self } } #[doc = "Bits 11:14 - Endpoint number"] - #[inline] - pub fn epnum(&mut self) -> _EPNUMW { - _EPNUMW { w: self } + #[inline(always)] + pub fn epnum(&mut self) -> EPNUM_W { + EPNUM_W { w: self } } #[doc = "Bit 15 - Endpoint direction"] - #[inline] - pub fn epdir(&mut self) -> _EPDIRW { - _EPDIRW { w: self } + #[inline(always)] + pub fn epdir(&mut self) -> EPDIR_W { + EPDIR_W { w: self } } #[doc = "Bit 17 - Low-speed device"] - #[inline] - pub fn lsd(&mut self) -> _LSDW { - _LSDW { w: self } + #[inline(always)] + pub fn lsd(&mut self) -> LSD_W { + LSD_W { w: self } } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&mut self) -> _EPTYPEW { - _EPTYPEW { w: self } + #[inline(always)] + pub fn eptype(&mut self) -> EPTYPE_W { + EPTYPE_W { w: self } } #[doc = "Bits 22:28 - Device address"] - #[inline] - pub fn dar(&mut self) -> _DARW { - _DARW { w: self } + #[inline(always)] + pub fn dar(&mut self) -> DAR_W { + DAR_W { w: self } } #[doc = "Bit 29 - Odd frame"] - #[inline] - pub fn oddfrm(&mut self) -> _ODDFRMW { - _ODDFRMW { w: self } + #[inline(always)] + pub fn oddfrm(&mut self) -> ODDFRM_W { + ODDFRM_W { w: self } } #[doc = "Bit 30 - Channel disable"] - #[inline] - pub fn cdis(&mut self) -> _CDISW { - _CDISW { w: self } + #[inline(always)] + pub fn cdis(&mut self) -> CDIS_W { + CDIS_W { w: self } } #[doc = "Bit 31 - Channel enable"] - #[inline] - pub fn cen(&mut self) -> _CENW { - _CENW { w: self } + #[inline(always)] + pub fn cen(&mut self) -> CEN_W { + CEN_W { w: self } } } diff --git a/src/usbfs_host/hch2inten.rs b/src/usbfs_host/hch2inten.rs index 31fe527755a89b25a762cb6dfd68dedc3a61ce1e..78009bd657c3ee665e8f0b1a4c22ca1356dc2bf6 100644 --- a/src/usbfs_host/hch2inten.rs +++ b/src/usbfs_host/hch2inten.rs @@ -1,595 +1,322 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH2INTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFIER { - bits: bool, -} -impl TFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CHIER { - bits: bool, -} -impl CHIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLIER { - bits: bool, -} -impl STALLIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKIER { - bits: bool, -} -impl NAKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKIER { - bits: bool, -} -impl ACKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBERIER { - bits: bool, -} -impl USBERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BBERIER { - bits: bool, -} -impl BBERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct REQOVRIER { - bits: bool, -} -impl REQOVRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTERIER { - bits: bool, -} -impl DTERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFIEW<'a> { +#[doc = "Reader of register HCH2INTEN"] +pub type R = crate::R; +#[doc = "Writer for register HCH2INTEN"] +pub type W = crate::W; +#[doc = "Register HCH2INTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH2INTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TFIE`"] +pub type TFIE_R = crate::R; +#[doc = "Write proxy for field `TFIE`"] +pub struct TFIE_W<'a> { w: &'a mut W, } -impl<'a> _TFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _CHIEW<'a> { +#[doc = "Reader of field `CHIE`"] +pub type CHIE_R = crate::R; +#[doc = "Write proxy for field `CHIE`"] +pub struct CHIE_W<'a> { w: &'a mut W, } -impl<'a> _CHIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STALLIEW<'a> { +#[doc = "Reader of field `STALLIE`"] +pub type STALLIE_R = crate::R; +#[doc = "Write proxy for field `STALLIE`"] +pub struct STALLIE_W<'a> { w: &'a mut W, } -impl<'a> _STALLIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALLIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NAKIEW<'a> { +#[doc = "Reader of field `NAKIE`"] +pub type NAKIE_R = crate::R; +#[doc = "Write proxy for field `NAKIE`"] +pub struct NAKIE_W<'a> { w: &'a mut W, } -impl<'a> _NAKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NAKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ACKIEW<'a> { +#[doc = "Reader of field `ACKIE`"] +pub type ACKIE_R = crate::R; +#[doc = "Write proxy for field `ACKIE`"] +pub struct ACKIE_W<'a> { w: &'a mut W, } -impl<'a> _ACKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _USBERIEW<'a> { +#[doc = "Reader of field `USBERIE`"] +pub type USBERIE_R = crate::R; +#[doc = "Write proxy for field `USBERIE`"] +pub struct USBERIE_W<'a> { w: &'a mut W, } -impl<'a> _USBERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BBERIEW<'a> { +#[doc = "Reader of field `BBERIE`"] +pub type BBERIE_R = crate::R; +#[doc = "Write proxy for field `BBERIE`"] +pub struct BBERIE_W<'a> { w: &'a mut W, } -impl<'a> _BBERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BBERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _REQOVRIEW<'a> { +#[doc = "Reader of field `REQOVRIE`"] +pub type REQOVRIE_R = crate::R; +#[doc = "Write proxy for field `REQOVRIE`"] +pub struct REQOVRIE_W<'a> { w: &'a mut W, } -impl<'a> _REQOVRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REQOVRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _DTERIEW<'a> { +#[doc = "Reader of field `DTERIE`"] +pub type DTERIE_R = crate::R; +#[doc = "Write proxy for field `DTERIE`"] +pub struct DTERIE_W<'a> { w: &'a mut W, } -impl<'a> _DTERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer completed interrupt enable"] - #[inline] - pub fn tfie(&self) -> TFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFIER { bits } + #[inline(always)] + pub fn tfie(&self) -> TFIE_R { + TFIE_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Channel halted interrupt enable"] - #[inline] - pub fn chie(&self) -> CHIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHIER { bits } + #[inline(always)] + pub fn chie(&self) -> CHIE_R { + CHIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - STALL interrupt enable"] - #[inline] - pub fn stallie(&self) -> STALLIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLIER { bits } + #[inline(always)] + pub fn stallie(&self) -> STALLIE_R { + STALLIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - NAK interrupt enable"] - #[inline] - pub fn nakie(&self) -> NAKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKIER { bits } + #[inline(always)] + pub fn nakie(&self) -> NAKIE_R { + NAKIE_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - ACK interrupt enable"] - #[inline] - pub fn ackie(&self) -> ACKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ACKIER { bits } + #[inline(always)] + pub fn ackie(&self) -> ACKIE_R { + ACKIE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 7 - USB bus error interrupt enable"] - #[inline] - pub fn usberie(&self) -> USBERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBERIER { bits } + #[inline(always)] + pub fn usberie(&self) -> USBERIE_R { + USBERIE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Babble error interrupt enable"] - #[inline] - pub fn bberie(&self) -> BBERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BBERIER { bits } + #[inline(always)] + pub fn bberie(&self) -> BBERIE_R { + BBERIE_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - request queue overrun interrupt enable"] - #[inline] - pub fn reqovrie(&self) -> REQOVRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - REQOVRIER { bits } + #[inline(always)] + pub fn reqovrie(&self) -> REQOVRIE_R { + REQOVRIE_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Data toggle error interrupt enable"] - #[inline] - pub fn dterie(&self) -> DTERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTERIER { bits } + #[inline(always)] + pub fn dterie(&self) -> DTERIE_R { + DTERIE_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer completed interrupt enable"] - #[inline] - pub fn tfie(&mut self) -> _TFIEW { - _TFIEW { w: self } + #[inline(always)] + pub fn tfie(&mut self) -> TFIE_W { + TFIE_W { w: self } } #[doc = "Bit 1 - Channel halted interrupt enable"] - #[inline] - pub fn chie(&mut self) -> _CHIEW { - _CHIEW { w: self } + #[inline(always)] + pub fn chie(&mut self) -> CHIE_W { + CHIE_W { w: self } } #[doc = "Bit 3 - STALL interrupt enable"] - #[inline] - pub fn stallie(&mut self) -> _STALLIEW { - _STALLIEW { w: self } + #[inline(always)] + pub fn stallie(&mut self) -> STALLIE_W { + STALLIE_W { w: self } } #[doc = "Bit 4 - NAK interrupt enable"] - #[inline] - pub fn nakie(&mut self) -> _NAKIEW { - _NAKIEW { w: self } + #[inline(always)] + pub fn nakie(&mut self) -> NAKIE_W { + NAKIE_W { w: self } } #[doc = "Bit 5 - ACK interrupt enable"] - #[inline] - pub fn ackie(&mut self) -> _ACKIEW { - _ACKIEW { w: self } + #[inline(always)] + pub fn ackie(&mut self) -> ACKIE_W { + ACKIE_W { w: self } } #[doc = "Bit 7 - USB bus error interrupt enable"] - #[inline] - pub fn usberie(&mut self) -> _USBERIEW { - _USBERIEW { w: self } + #[inline(always)] + pub fn usberie(&mut self) -> USBERIE_W { + USBERIE_W { w: self } } #[doc = "Bit 8 - Babble error interrupt enable"] - #[inline] - pub fn bberie(&mut self) -> _BBERIEW { - _BBERIEW { w: self } + #[inline(always)] + pub fn bberie(&mut self) -> BBERIE_W { + BBERIE_W { w: self } } #[doc = "Bit 9 - request queue overrun interrupt enable"] - #[inline] - pub fn reqovrie(&mut self) -> _REQOVRIEW { - _REQOVRIEW { w: self } + #[inline(always)] + pub fn reqovrie(&mut self) -> REQOVRIE_W { + REQOVRIE_W { w: self } } #[doc = "Bit 10 - Data toggle error interrupt enable"] - #[inline] - pub fn dterie(&mut self) -> _DTERIEW { - _DTERIEW { w: self } + #[inline(always)] + pub fn dterie(&mut self) -> DTERIE_W { + DTERIE_W { w: self } } } diff --git a/src/usbfs_host/hch2intf.rs b/src/usbfs_host/hch2intf.rs index 775fbe201770b474d9a01ffbe8bb5d17456d244b..3a081aa52275f079d7537aefe2dbabac5dcf6d1d 100644 --- a/src/usbfs_host/hch2intf.rs +++ b/src/usbfs_host/hch2intf.rs @@ -1,595 +1,322 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH2INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFR { - bits: bool, -} -impl TFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CHR { - bits: bool, -} -impl CHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLR { - bits: bool, -} -impl STALLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKR { - bits: bool, -} -impl NAKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKR { - bits: bool, -} -impl ACKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBERR { - bits: bool, -} -impl USBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BBERR { - bits: bool, -} -impl BBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct REQOVRR { - bits: bool, -} -impl REQOVRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTERR { - bits: bool, -} -impl DTERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFW<'a> { +#[doc = "Reader of register HCH2INTF"] +pub type R = crate::R; +#[doc = "Writer for register HCH2INTF"] +pub type W = crate::W; +#[doc = "Register HCH2INTF `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH2INTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TF`"] +pub type TF_R = crate::R; +#[doc = "Write proxy for field `TF`"] +pub struct TF_W<'a> { w: &'a mut W, } -impl<'a> _TFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _CHW<'a> { +#[doc = "Reader of field `CH`"] +pub type CH_R = crate::R; +#[doc = "Write proxy for field `CH`"] +pub struct CH_W<'a> { w: &'a mut W, } -impl<'a> _CHW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STALLW<'a> { +#[doc = "Reader of field `STALL`"] +pub type STALL_R = crate::R; +#[doc = "Write proxy for field `STALL`"] +pub struct STALL_W<'a> { w: &'a mut W, } -impl<'a> _STALLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NAKW<'a> { +#[doc = "Reader of field `NAK`"] +pub type NAK_R = crate::R; +#[doc = "Write proxy for field `NAK`"] +pub struct NAK_W<'a> { w: &'a mut W, } -impl<'a> _NAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ACKW<'a> { +#[doc = "Reader of field `ACK`"] +pub type ACK_R = crate::R; +#[doc = "Write proxy for field `ACK`"] +pub struct ACK_W<'a> { w: &'a mut W, } -impl<'a> _ACKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _USBERW<'a> { +#[doc = "Reader of field `USBER`"] +pub type USBER_R = crate::R; +#[doc = "Write proxy for field `USBER`"] +pub struct USBER_W<'a> { w: &'a mut W, } -impl<'a> _USBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BBERW<'a> { +#[doc = "Reader of field `BBER`"] +pub type BBER_R = crate::R; +#[doc = "Write proxy for field `BBER`"] +pub struct BBER_W<'a> { w: &'a mut W, } -impl<'a> _BBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _REQOVRW<'a> { +#[doc = "Reader of field `REQOVR`"] +pub type REQOVR_R = crate::R; +#[doc = "Write proxy for field `REQOVR`"] +pub struct REQOVR_W<'a> { w: &'a mut W, } -impl<'a> _REQOVRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REQOVR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _DTERW<'a> { +#[doc = "Reader of field `DTER`"] +pub type DTER_R = crate::R; +#[doc = "Write proxy for field `DTER`"] +pub struct DTER_W<'a> { w: &'a mut W, } -impl<'a> _DTERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&self) -> TFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFR { bits } + #[inline(always)] + pub fn tf(&self) -> TF_R { + TF_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Channel halted"] - #[inline] - pub fn ch(&self) -> CHR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHR { bits } + #[inline(always)] + pub fn ch(&self) -> CH_R { + CH_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - STALL response received interrupt"] - #[inline] - pub fn stall(&self) -> STALLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLR { bits } + #[inline(always)] + pub fn stall(&self) -> STALL_R { + STALL_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - NAK response received interrupt"] - #[inline] - pub fn nak(&self) -> NAKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKR { bits } + #[inline(always)] + pub fn nak(&self) -> NAK_R { + NAK_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - ACK response received/transmitted interrupt"] - #[inline] - pub fn ack(&self) -> ACKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ACKR { bits } + #[inline(always)] + pub fn ack(&self) -> ACK_R { + ACK_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 7 - USB bus error"] - #[inline] - pub fn usber(&self) -> USBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBERR { bits } + #[inline(always)] + pub fn usber(&self) -> USBER_R { + USBER_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Babble error"] - #[inline] - pub fn bber(&self) -> BBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BBERR { bits } + #[inline(always)] + pub fn bber(&self) -> BBER_R { + BBER_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Request queue overrun"] - #[inline] - pub fn reqovr(&self) -> REQOVRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - REQOVRR { bits } + #[inline(always)] + pub fn reqovr(&self) -> REQOVR_R { + REQOVR_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Data toggle error"] - #[inline] - pub fn dter(&self) -> DTERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTERR { bits } + #[inline(always)] + pub fn dter(&self) -> DTER_R { + DTER_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&mut self) -> _TFW { - _TFW { w: self } + #[inline(always)] + pub fn tf(&mut self) -> TF_W { + TF_W { w: self } } #[doc = "Bit 1 - Channel halted"] - #[inline] - pub fn ch(&mut self) -> _CHW { - _CHW { w: self } + #[inline(always)] + pub fn ch(&mut self) -> CH_W { + CH_W { w: self } } #[doc = "Bit 3 - STALL response received interrupt"] - #[inline] - pub fn stall(&mut self) -> _STALLW { - _STALLW { w: self } + #[inline(always)] + pub fn stall(&mut self) -> STALL_W { + STALL_W { w: self } } #[doc = "Bit 4 - NAK response received interrupt"] - #[inline] - pub fn nak(&mut self) -> _NAKW { - _NAKW { w: self } + #[inline(always)] + pub fn nak(&mut self) -> NAK_W { + NAK_W { w: self } } #[doc = "Bit 5 - ACK response received/transmitted interrupt"] - #[inline] - pub fn ack(&mut self) -> _ACKW { - _ACKW { w: self } + #[inline(always)] + pub fn ack(&mut self) -> ACK_W { + ACK_W { w: self } } #[doc = "Bit 7 - USB bus error"] - #[inline] - pub fn usber(&mut self) -> _USBERW { - _USBERW { w: self } + #[inline(always)] + pub fn usber(&mut self) -> USBER_W { + USBER_W { w: self } } #[doc = "Bit 8 - Babble error"] - #[inline] - pub fn bber(&mut self) -> _BBERW { - _BBERW { w: self } + #[inline(always)] + pub fn bber(&mut self) -> BBER_W { + BBER_W { w: self } } #[doc = "Bit 9 - Request queue overrun"] - #[inline] - pub fn reqovr(&mut self) -> _REQOVRW { - _REQOVRW { w: self } + #[inline(always)] + pub fn reqovr(&mut self) -> REQOVR_W { + REQOVR_W { w: self } } #[doc = "Bit 10 - Data toggle error"] - #[inline] - pub fn dter(&mut self) -> _DTERW { - _DTERW { w: self } + #[inline(always)] + pub fn dter(&mut self) -> DTER_W { + DTER_W { w: self } } } diff --git a/src/usbfs_host/hch2len.rs b/src/usbfs_host/hch2len.rs index c97184fa26509d199dfeff4d5bc5183b8840c03b..660cc821943468a77b9b9c1a798338b6e73ab925 100644 --- a/src/usbfs_host/hch2len.rs +++ b/src/usbfs_host/hch2len.rs @@ -1,187 +1,88 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH2LEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TLENR { - bits: u32, -} -impl TLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PCNTR { - bits: u16, -} -impl PCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DPIDR { - bits: u8, -} -impl DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _TLENW<'a> { +#[doc = "Reader of register HCH2LEN"] +pub type R = crate::R; +#[doc = "Writer for register HCH2LEN"] +pub type W = crate::W; +#[doc = "Register HCH2LEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH2LEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TLEN`"] +pub type TLEN_R = crate::R; +#[doc = "Write proxy for field `TLEN`"] +pub struct TLEN_W<'a> { w: &'a mut W, } -impl<'a> _TLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0007_ffff) | ((value as u32) & 0x0007_ffff); self.w } } -#[doc = r" Proxy"] -pub struct _PCNTW<'a> { +#[doc = "Reader of field `PCNT`"] +pub type PCNT_R = crate::R; +#[doc = "Write proxy for field `PCNT`"] +pub struct PCNT_W<'a> { w: &'a mut W, } -impl<'a> _PCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03ff << 19)) | (((value as u32) & 0x03ff) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _DPIDW<'a> { +#[doc = "Reader of field `DPID`"] +pub type DPID_R = crate::R; +#[doc = "Write proxy for field `DPID`"] +pub struct DPID_W<'a> { w: &'a mut W, } -impl<'a> _DPIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DPID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 29)) | (((value as u32) & 0x03) << 29); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&self) -> TLENR { - let bits = { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - TLENR { bits } + #[inline(always)] + pub fn tlen(&self) -> TLEN_R { + TLEN_R::new((self.bits & 0x0007_ffff) as u32) } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&self) -> PCNTR { - let bits = { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - PCNTR { bits } + #[inline(always)] + pub fn pcnt(&self) -> PCNT_R { + PCNT_R::new(((self.bits >> 19) & 0x03ff) as u16) } #[doc = "Bits 29:30 - Data PID"] - #[inline] - pub fn dpid(&self) -> DPIDR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DPIDR { bits } + #[inline(always)] + pub fn dpid(&self) -> DPID_R { + DPID_R::new(((self.bits >> 29) & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&mut self) -> _TLENW { - _TLENW { w: self } + #[inline(always)] + pub fn tlen(&mut self) -> TLEN_W { + TLEN_W { w: self } } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&mut self) -> _PCNTW { - _PCNTW { w: self } + #[inline(always)] + pub fn pcnt(&mut self) -> PCNT_W { + PCNT_W { w: self } } #[doc = "Bits 29:30 - Data PID"] - #[inline] - pub fn dpid(&mut self) -> _DPIDW { - _DPIDW { w: self } + #[inline(always)] + pub fn dpid(&mut self) -> DPID_W { + DPID_W { w: self } } } diff --git a/src/usbfs_host/hch3ctl.rs b/src/usbfs_host/hch3ctl.rs index fa13d9dadb424f423ebfd51409e607904ba022fe..51724fe077a80c53997ff06ec966480da1172f6e 100644 --- a/src/usbfs_host/hch3ctl.rs +++ b/src/usbfs_host/hch3ctl.rs @@ -1,523 +1,282 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH3CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MPLR { - bits: u16, -} -impl MPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPNUMR { - bits: u8, -} -impl EPNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPDIRR { - bits: bool, -} -impl EPDIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LSDR { - bits: bool, -} -impl LSDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTYPER { - bits: u8, -} -impl EPTYPER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DARR { - bits: u8, -} -impl DARR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ODDFRMR { - bits: bool, -} -impl ODDFRMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CDISR { - bits: bool, -} -impl CDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CENR { - bits: bool, -} -impl CENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _MPLW<'a> { +#[doc = "Reader of register HCH3CTL"] +pub type R = crate::R; +#[doc = "Writer for register HCH3CTL"] +pub type W = crate::W; +#[doc = "Register HCH3CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH3CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MPL`"] +pub type MPL_R = crate::R; +#[doc = "Write proxy for field `MPL`"] +pub struct MPL_W<'a> { w: &'a mut W, } -impl<'a> _MPLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MPL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07ff) | ((value as u32) & 0x07ff); self.w } } -#[doc = r" Proxy"] -pub struct _EPNUMW<'a> { +#[doc = "Reader of field `EPNUM`"] +pub type EPNUM_R = crate::R; +#[doc = "Write proxy for field `EPNUM`"] +pub struct EPNUM_W<'a> { w: &'a mut W, } -impl<'a> _EPNUMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPNUM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 11)) | (((value as u32) & 0x0f) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _EPDIRW<'a> { +#[doc = "Reader of field `EPDIR`"] +pub type EPDIR_R = crate::R; +#[doc = "Write proxy for field `EPDIR`"] +pub struct EPDIR_W<'a> { w: &'a mut W, } -impl<'a> _EPDIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _LSDW<'a> { +#[doc = "Reader of field `LSD`"] +pub type LSD_R = crate::R; +#[doc = "Write proxy for field `LSD`"] +pub struct LSD_W<'a> { w: &'a mut W, } -impl<'a> _LSDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LSD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _EPTYPEW<'a> { +#[doc = "Reader of field `EPTYPE`"] +pub type EPTYPE_R = crate::R; +#[doc = "Write proxy for field `EPTYPE`"] +pub struct EPTYPE_W<'a> { w: &'a mut W, } -impl<'a> _EPTYPEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPTYPE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _DARW<'a> { +#[doc = "Reader of field `DAR`"] +pub type DAR_R = crate::R; +#[doc = "Write proxy for field `DAR`"] +pub struct DAR_W<'a> { w: &'a mut W, } -impl<'a> _DARW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x7f << 22)) | (((value as u32) & 0x7f) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _ODDFRMW<'a> { +#[doc = "Reader of field `ODDFRM`"] +pub type ODDFRM_R = crate::R; +#[doc = "Write proxy for field `ODDFRM`"] +pub struct ODDFRM_W<'a> { w: &'a mut W, } -impl<'a> _ODDFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ODDFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _CDISW<'a> { +#[doc = "Reader of field `CDIS`"] +pub type CDIS_R = crate::R; +#[doc = "Write proxy for field `CDIS`"] +pub struct CDIS_W<'a> { w: &'a mut W, } -impl<'a> _CDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _CENW<'a> { +#[doc = "Reader of field `CEN`"] +pub type CEN_R = crate::R; +#[doc = "Write proxy for field `CEN`"] +pub struct CEN_W<'a> { w: &'a mut W, } -impl<'a> _CENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:10 - Maximum packet size"] - #[inline] - pub fn mpl(&self) -> MPLR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - MPLR { bits } + #[inline(always)] + pub fn mpl(&self) -> MPL_R { + MPL_R::new((self.bits & 0x07ff) as u16) } #[doc = "Bits 11:14 - Endpoint number"] - #[inline] - pub fn epnum(&self) -> EPNUMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPNUMR { bits } + #[inline(always)] + pub fn epnum(&self) -> EPNUM_R { + EPNUM_R::new(((self.bits >> 11) & 0x0f) as u8) } #[doc = "Bit 15 - Endpoint direction"] - #[inline] - pub fn epdir(&self) -> EPDIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDIRR { bits } + #[inline(always)] + pub fn epdir(&self) -> EPDIR_R { + EPDIR_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 17 - Low-speed device"] - #[inline] - pub fn lsd(&self) -> LSDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LSDR { bits } + #[inline(always)] + pub fn lsd(&self) -> LSD_R { + LSD_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&self) -> EPTYPER { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPTYPER { bits } + #[inline(always)] + pub fn eptype(&self) -> EPTYPE_R { + EPTYPE_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bits 22:28 - Device address"] - #[inline] - pub fn dar(&self) -> DARR { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DARR { bits } + #[inline(always)] + pub fn dar(&self) -> DAR_R { + DAR_R::new(((self.bits >> 22) & 0x7f) as u8) } #[doc = "Bit 29 - Odd frame"] - #[inline] - pub fn oddfrm(&self) -> ODDFRMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ODDFRMR { bits } + #[inline(always)] + pub fn oddfrm(&self) -> ODDFRM_R { + ODDFRM_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Channel disable"] - #[inline] - pub fn cdis(&self) -> CDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CDISR { bits } + #[inline(always)] + pub fn cdis(&self) -> CDIS_R { + CDIS_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Channel enable"] - #[inline] - pub fn cen(&self) -> CENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CENR { bits } + #[inline(always)] + pub fn cen(&self) -> CEN_R { + CEN_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:10 - Maximum packet size"] - #[inline] - pub fn mpl(&mut self) -> _MPLW { - _MPLW { w: self } + #[inline(always)] + pub fn mpl(&mut self) -> MPL_W { + MPL_W { w: self } } #[doc = "Bits 11:14 - Endpoint number"] - #[inline] - pub fn epnum(&mut self) -> _EPNUMW { - _EPNUMW { w: self } + #[inline(always)] + pub fn epnum(&mut self) -> EPNUM_W { + EPNUM_W { w: self } } #[doc = "Bit 15 - Endpoint direction"] - #[inline] - pub fn epdir(&mut self) -> _EPDIRW { - _EPDIRW { w: self } + #[inline(always)] + pub fn epdir(&mut self) -> EPDIR_W { + EPDIR_W { w: self } } #[doc = "Bit 17 - Low-speed device"] - #[inline] - pub fn lsd(&mut self) -> _LSDW { - _LSDW { w: self } + #[inline(always)] + pub fn lsd(&mut self) -> LSD_W { + LSD_W { w: self } } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&mut self) -> _EPTYPEW { - _EPTYPEW { w: self } + #[inline(always)] + pub fn eptype(&mut self) -> EPTYPE_W { + EPTYPE_W { w: self } } #[doc = "Bits 22:28 - Device address"] - #[inline] - pub fn dar(&mut self) -> _DARW { - _DARW { w: self } + #[inline(always)] + pub fn dar(&mut self) -> DAR_W { + DAR_W { w: self } } #[doc = "Bit 29 - Odd frame"] - #[inline] - pub fn oddfrm(&mut self) -> _ODDFRMW { - _ODDFRMW { w: self } + #[inline(always)] + pub fn oddfrm(&mut self) -> ODDFRM_W { + ODDFRM_W { w: self } } #[doc = "Bit 30 - Channel disable"] - #[inline] - pub fn cdis(&mut self) -> _CDISW { - _CDISW { w: self } + #[inline(always)] + pub fn cdis(&mut self) -> CDIS_W { + CDIS_W { w: self } } #[doc = "Bit 31 - Channel enable"] - #[inline] - pub fn cen(&mut self) -> _CENW { - _CENW { w: self } + #[inline(always)] + pub fn cen(&mut self) -> CEN_W { + CEN_W { w: self } } } diff --git a/src/usbfs_host/hch3inten.rs b/src/usbfs_host/hch3inten.rs index 947aa1a542e55152b1237d9de174b0feec8c26df..48d3525fabcf81dc2fcd6d78c5b69775cc450c92 100644 --- a/src/usbfs_host/hch3inten.rs +++ b/src/usbfs_host/hch3inten.rs @@ -1,595 +1,322 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH3INTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFIER { - bits: bool, -} -impl TFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CHIER { - bits: bool, -} -impl CHIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLIER { - bits: bool, -} -impl STALLIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKIER { - bits: bool, -} -impl NAKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKIER { - bits: bool, -} -impl ACKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBERIER { - bits: bool, -} -impl USBERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BBERIER { - bits: bool, -} -impl BBERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct REQOVRIER { - bits: bool, -} -impl REQOVRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTERIER { - bits: bool, -} -impl DTERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFIEW<'a> { +#[doc = "Reader of register HCH3INTEN"] +pub type R = crate::R; +#[doc = "Writer for register HCH3INTEN"] +pub type W = crate::W; +#[doc = "Register HCH3INTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH3INTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TFIE`"] +pub type TFIE_R = crate::R; +#[doc = "Write proxy for field `TFIE`"] +pub struct TFIE_W<'a> { w: &'a mut W, } -impl<'a> _TFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _CHIEW<'a> { +#[doc = "Reader of field `CHIE`"] +pub type CHIE_R = crate::R; +#[doc = "Write proxy for field `CHIE`"] +pub struct CHIE_W<'a> { w: &'a mut W, } -impl<'a> _CHIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STALLIEW<'a> { +#[doc = "Reader of field `STALLIE`"] +pub type STALLIE_R = crate::R; +#[doc = "Write proxy for field `STALLIE`"] +pub struct STALLIE_W<'a> { w: &'a mut W, } -impl<'a> _STALLIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALLIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NAKIEW<'a> { +#[doc = "Reader of field `NAKIE`"] +pub type NAKIE_R = crate::R; +#[doc = "Write proxy for field `NAKIE`"] +pub struct NAKIE_W<'a> { w: &'a mut W, } -impl<'a> _NAKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NAKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ACKIEW<'a> { +#[doc = "Reader of field `ACKIE`"] +pub type ACKIE_R = crate::R; +#[doc = "Write proxy for field `ACKIE`"] +pub struct ACKIE_W<'a> { w: &'a mut W, } -impl<'a> _ACKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _USBERIEW<'a> { +#[doc = "Reader of field `USBERIE`"] +pub type USBERIE_R = crate::R; +#[doc = "Write proxy for field `USBERIE`"] +pub struct USBERIE_W<'a> { w: &'a mut W, } -impl<'a> _USBERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BBERIEW<'a> { +#[doc = "Reader of field `BBERIE`"] +pub type BBERIE_R = crate::R; +#[doc = "Write proxy for field `BBERIE`"] +pub struct BBERIE_W<'a> { w: &'a mut W, } -impl<'a> _BBERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BBERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _REQOVRIEW<'a> { +#[doc = "Reader of field `REQOVRIE`"] +pub type REQOVRIE_R = crate::R; +#[doc = "Write proxy for field `REQOVRIE`"] +pub struct REQOVRIE_W<'a> { w: &'a mut W, } -impl<'a> _REQOVRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REQOVRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _DTERIEW<'a> { +#[doc = "Reader of field `DTERIE`"] +pub type DTERIE_R = crate::R; +#[doc = "Write proxy for field `DTERIE`"] +pub struct DTERIE_W<'a> { w: &'a mut W, } -impl<'a> _DTERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer completed interrupt enable"] - #[inline] - pub fn tfie(&self) -> TFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFIER { bits } + #[inline(always)] + pub fn tfie(&self) -> TFIE_R { + TFIE_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Channel halted interrupt enable"] - #[inline] - pub fn chie(&self) -> CHIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHIER { bits } + #[inline(always)] + pub fn chie(&self) -> CHIE_R { + CHIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - STALL interrupt enable"] - #[inline] - pub fn stallie(&self) -> STALLIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLIER { bits } + #[inline(always)] + pub fn stallie(&self) -> STALLIE_R { + STALLIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - NAK interrupt enable"] - #[inline] - pub fn nakie(&self) -> NAKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKIER { bits } + #[inline(always)] + pub fn nakie(&self) -> NAKIE_R { + NAKIE_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - ACK interrupt enable"] - #[inline] - pub fn ackie(&self) -> ACKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ACKIER { bits } + #[inline(always)] + pub fn ackie(&self) -> ACKIE_R { + ACKIE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 7 - USB bus error interrupt enable"] - #[inline] - pub fn usberie(&self) -> USBERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBERIER { bits } + #[inline(always)] + pub fn usberie(&self) -> USBERIE_R { + USBERIE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Babble error interrupt enable"] - #[inline] - pub fn bberie(&self) -> BBERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BBERIER { bits } + #[inline(always)] + pub fn bberie(&self) -> BBERIE_R { + BBERIE_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - request queue overrun interrupt enable"] - #[inline] - pub fn reqovrie(&self) -> REQOVRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - REQOVRIER { bits } + #[inline(always)] + pub fn reqovrie(&self) -> REQOVRIE_R { + REQOVRIE_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Data toggle error interrupt enable"] - #[inline] - pub fn dterie(&self) -> DTERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTERIER { bits } + #[inline(always)] + pub fn dterie(&self) -> DTERIE_R { + DTERIE_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer completed interrupt enable"] - #[inline] - pub fn tfie(&mut self) -> _TFIEW { - _TFIEW { w: self } + #[inline(always)] + pub fn tfie(&mut self) -> TFIE_W { + TFIE_W { w: self } } #[doc = "Bit 1 - Channel halted interrupt enable"] - #[inline] - pub fn chie(&mut self) -> _CHIEW { - _CHIEW { w: self } + #[inline(always)] + pub fn chie(&mut self) -> CHIE_W { + CHIE_W { w: self } } #[doc = "Bit 3 - STALL interrupt enable"] - #[inline] - pub fn stallie(&mut self) -> _STALLIEW { - _STALLIEW { w: self } + #[inline(always)] + pub fn stallie(&mut self) -> STALLIE_W { + STALLIE_W { w: self } } #[doc = "Bit 4 - NAK interrupt enable"] - #[inline] - pub fn nakie(&mut self) -> _NAKIEW { - _NAKIEW { w: self } + #[inline(always)] + pub fn nakie(&mut self) -> NAKIE_W { + NAKIE_W { w: self } } #[doc = "Bit 5 - ACK interrupt enable"] - #[inline] - pub fn ackie(&mut self) -> _ACKIEW { - _ACKIEW { w: self } + #[inline(always)] + pub fn ackie(&mut self) -> ACKIE_W { + ACKIE_W { w: self } } #[doc = "Bit 7 - USB bus error interrupt enable"] - #[inline] - pub fn usberie(&mut self) -> _USBERIEW { - _USBERIEW { w: self } + #[inline(always)] + pub fn usberie(&mut self) -> USBERIE_W { + USBERIE_W { w: self } } #[doc = "Bit 8 - Babble error interrupt enable"] - #[inline] - pub fn bberie(&mut self) -> _BBERIEW { - _BBERIEW { w: self } + #[inline(always)] + pub fn bberie(&mut self) -> BBERIE_W { + BBERIE_W { w: self } } #[doc = "Bit 9 - request queue overrun interrupt enable"] - #[inline] - pub fn reqovrie(&mut self) -> _REQOVRIEW { - _REQOVRIEW { w: self } + #[inline(always)] + pub fn reqovrie(&mut self) -> REQOVRIE_W { + REQOVRIE_W { w: self } } #[doc = "Bit 10 - Data toggle error interrupt enable"] - #[inline] - pub fn dterie(&mut self) -> _DTERIEW { - _DTERIEW { w: self } + #[inline(always)] + pub fn dterie(&mut self) -> DTERIE_W { + DTERIE_W { w: self } } } diff --git a/src/usbfs_host/hch3intf.rs b/src/usbfs_host/hch3intf.rs index 16f6d0d5d156df1dfe88900b7f5504dd2694c9ec..b80fd7460a38a6877582d347e0b3799013880d41 100644 --- a/src/usbfs_host/hch3intf.rs +++ b/src/usbfs_host/hch3intf.rs @@ -1,595 +1,322 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH3INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFR { - bits: bool, -} -impl TFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CHR { - bits: bool, -} -impl CHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLR { - bits: bool, -} -impl STALLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKR { - bits: bool, -} -impl NAKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKR { - bits: bool, -} -impl ACKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBERR { - bits: bool, -} -impl USBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BBERR { - bits: bool, -} -impl BBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct REQOVRR { - bits: bool, -} -impl REQOVRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTERR { - bits: bool, -} -impl DTERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFW<'a> { +#[doc = "Reader of register HCH3INTF"] +pub type R = crate::R; +#[doc = "Writer for register HCH3INTF"] +pub type W = crate::W; +#[doc = "Register HCH3INTF `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH3INTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TF`"] +pub type TF_R = crate::R; +#[doc = "Write proxy for field `TF`"] +pub struct TF_W<'a> { w: &'a mut W, } -impl<'a> _TFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _CHW<'a> { +#[doc = "Reader of field `CH`"] +pub type CH_R = crate::R; +#[doc = "Write proxy for field `CH`"] +pub struct CH_W<'a> { w: &'a mut W, } -impl<'a> _CHW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STALLW<'a> { +#[doc = "Reader of field `STALL`"] +pub type STALL_R = crate::R; +#[doc = "Write proxy for field `STALL`"] +pub struct STALL_W<'a> { w: &'a mut W, } -impl<'a> _STALLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NAKW<'a> { +#[doc = "Reader of field `NAK`"] +pub type NAK_R = crate::R; +#[doc = "Write proxy for field `NAK`"] +pub struct NAK_W<'a> { w: &'a mut W, } -impl<'a> _NAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ACKW<'a> { +#[doc = "Reader of field `ACK`"] +pub type ACK_R = crate::R; +#[doc = "Write proxy for field `ACK`"] +pub struct ACK_W<'a> { w: &'a mut W, } -impl<'a> _ACKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _USBERW<'a> { +#[doc = "Reader of field `USBER`"] +pub type USBER_R = crate::R; +#[doc = "Write proxy for field `USBER`"] +pub struct USBER_W<'a> { w: &'a mut W, } -impl<'a> _USBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BBERW<'a> { +#[doc = "Reader of field `BBER`"] +pub type BBER_R = crate::R; +#[doc = "Write proxy for field `BBER`"] +pub struct BBER_W<'a> { w: &'a mut W, } -impl<'a> _BBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _REQOVRW<'a> { +#[doc = "Reader of field `REQOVR`"] +pub type REQOVR_R = crate::R; +#[doc = "Write proxy for field `REQOVR`"] +pub struct REQOVR_W<'a> { w: &'a mut W, } -impl<'a> _REQOVRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REQOVR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _DTERW<'a> { +#[doc = "Reader of field `DTER`"] +pub type DTER_R = crate::R; +#[doc = "Write proxy for field `DTER`"] +pub struct DTER_W<'a> { w: &'a mut W, } -impl<'a> _DTERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&self) -> TFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFR { bits } + #[inline(always)] + pub fn tf(&self) -> TF_R { + TF_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Channel halted"] - #[inline] - pub fn ch(&self) -> CHR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHR { bits } + #[inline(always)] + pub fn ch(&self) -> CH_R { + CH_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - STALL response received interrupt"] - #[inline] - pub fn stall(&self) -> STALLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLR { bits } + #[inline(always)] + pub fn stall(&self) -> STALL_R { + STALL_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - NAK response received interrupt"] - #[inline] - pub fn nak(&self) -> NAKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKR { bits } + #[inline(always)] + pub fn nak(&self) -> NAK_R { + NAK_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - ACK response received/transmitted interrupt"] - #[inline] - pub fn ack(&self) -> ACKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ACKR { bits } + #[inline(always)] + pub fn ack(&self) -> ACK_R { + ACK_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 7 - USB bus error"] - #[inline] - pub fn usber(&self) -> USBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBERR { bits } + #[inline(always)] + pub fn usber(&self) -> USBER_R { + USBER_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Babble error"] - #[inline] - pub fn bber(&self) -> BBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BBERR { bits } + #[inline(always)] + pub fn bber(&self) -> BBER_R { + BBER_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Request queue overrun"] - #[inline] - pub fn reqovr(&self) -> REQOVRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - REQOVRR { bits } + #[inline(always)] + pub fn reqovr(&self) -> REQOVR_R { + REQOVR_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Data toggle error"] - #[inline] - pub fn dter(&self) -> DTERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTERR { bits } + #[inline(always)] + pub fn dter(&self) -> DTER_R { + DTER_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&mut self) -> _TFW { - _TFW { w: self } + #[inline(always)] + pub fn tf(&mut self) -> TF_W { + TF_W { w: self } } #[doc = "Bit 1 - Channel halted"] - #[inline] - pub fn ch(&mut self) -> _CHW { - _CHW { w: self } + #[inline(always)] + pub fn ch(&mut self) -> CH_W { + CH_W { w: self } } #[doc = "Bit 3 - STALL response received interrupt"] - #[inline] - pub fn stall(&mut self) -> _STALLW { - _STALLW { w: self } + #[inline(always)] + pub fn stall(&mut self) -> STALL_W { + STALL_W { w: self } } #[doc = "Bit 4 - NAK response received interrupt"] - #[inline] - pub fn nak(&mut self) -> _NAKW { - _NAKW { w: self } + #[inline(always)] + pub fn nak(&mut self) -> NAK_W { + NAK_W { w: self } } #[doc = "Bit 5 - ACK response received/transmitted interrupt"] - #[inline] - pub fn ack(&mut self) -> _ACKW { - _ACKW { w: self } + #[inline(always)] + pub fn ack(&mut self) -> ACK_W { + ACK_W { w: self } } #[doc = "Bit 7 - USB bus error"] - #[inline] - pub fn usber(&mut self) -> _USBERW { - _USBERW { w: self } + #[inline(always)] + pub fn usber(&mut self) -> USBER_W { + USBER_W { w: self } } #[doc = "Bit 8 - Babble error"] - #[inline] - pub fn bber(&mut self) -> _BBERW { - _BBERW { w: self } + #[inline(always)] + pub fn bber(&mut self) -> BBER_W { + BBER_W { w: self } } #[doc = "Bit 9 - Request queue overrun"] - #[inline] - pub fn reqovr(&mut self) -> _REQOVRW { - _REQOVRW { w: self } + #[inline(always)] + pub fn reqovr(&mut self) -> REQOVR_W { + REQOVR_W { w: self } } #[doc = "Bit 10 - Data toggle error"] - #[inline] - pub fn dter(&mut self) -> _DTERW { - _DTERW { w: self } + #[inline(always)] + pub fn dter(&mut self) -> DTER_W { + DTER_W { w: self } } } diff --git a/src/usbfs_host/hch3len.rs b/src/usbfs_host/hch3len.rs index 600f4465616290eccfff5d37883ef807b6b5b258..3fb520692ae99ddcd48bf0c0dbcdfe8850622acb 100644 --- a/src/usbfs_host/hch3len.rs +++ b/src/usbfs_host/hch3len.rs @@ -1,187 +1,88 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH3LEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TLENR { - bits: u32, -} -impl TLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PCNTR { - bits: u16, -} -impl PCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DPIDR { - bits: u8, -} -impl DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _TLENW<'a> { +#[doc = "Reader of register HCH3LEN"] +pub type R = crate::R; +#[doc = "Writer for register HCH3LEN"] +pub type W = crate::W; +#[doc = "Register HCH3LEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH3LEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TLEN`"] +pub type TLEN_R = crate::R; +#[doc = "Write proxy for field `TLEN`"] +pub struct TLEN_W<'a> { w: &'a mut W, } -impl<'a> _TLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0007_ffff) | ((value as u32) & 0x0007_ffff); self.w } } -#[doc = r" Proxy"] -pub struct _PCNTW<'a> { +#[doc = "Reader of field `PCNT`"] +pub type PCNT_R = crate::R; +#[doc = "Write proxy for field `PCNT`"] +pub struct PCNT_W<'a> { w: &'a mut W, } -impl<'a> _PCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03ff << 19)) | (((value as u32) & 0x03ff) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _DPIDW<'a> { +#[doc = "Reader of field `DPID`"] +pub type DPID_R = crate::R; +#[doc = "Write proxy for field `DPID`"] +pub struct DPID_W<'a> { w: &'a mut W, } -impl<'a> _DPIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DPID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 29)) | (((value as u32) & 0x03) << 29); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&self) -> TLENR { - let bits = { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - TLENR { bits } + #[inline(always)] + pub fn tlen(&self) -> TLEN_R { + TLEN_R::new((self.bits & 0x0007_ffff) as u32) } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&self) -> PCNTR { - let bits = { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - PCNTR { bits } + #[inline(always)] + pub fn pcnt(&self) -> PCNT_R { + PCNT_R::new(((self.bits >> 19) & 0x03ff) as u16) } #[doc = "Bits 29:30 - Data PID"] - #[inline] - pub fn dpid(&self) -> DPIDR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DPIDR { bits } + #[inline(always)] + pub fn dpid(&self) -> DPID_R { + DPID_R::new(((self.bits >> 29) & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&mut self) -> _TLENW { - _TLENW { w: self } + #[inline(always)] + pub fn tlen(&mut self) -> TLEN_W { + TLEN_W { w: self } } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&mut self) -> _PCNTW { - _PCNTW { w: self } + #[inline(always)] + pub fn pcnt(&mut self) -> PCNT_W { + PCNT_W { w: self } } #[doc = "Bits 29:30 - Data PID"] - #[inline] - pub fn dpid(&mut self) -> _DPIDW { - _DPIDW { w: self } + #[inline(always)] + pub fn dpid(&mut self) -> DPID_W { + DPID_W { w: self } } } diff --git a/src/usbfs_host/hch4ctl.rs b/src/usbfs_host/hch4ctl.rs index f040ffd73032460a0773385478ec47385fee3d2b..ad9497067fba0fb340d86c18088c6ca0a5f09f1e 100644 --- a/src/usbfs_host/hch4ctl.rs +++ b/src/usbfs_host/hch4ctl.rs @@ -1,523 +1,282 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH4CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MPLR { - bits: u16, -} -impl MPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPNUMR { - bits: u8, -} -impl EPNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPDIRR { - bits: bool, -} -impl EPDIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LSDR { - bits: bool, -} -impl LSDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTYPER { - bits: u8, -} -impl EPTYPER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DARR { - bits: u8, -} -impl DARR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ODDFRMR { - bits: bool, -} -impl ODDFRMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CDISR { - bits: bool, -} -impl CDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CENR { - bits: bool, -} -impl CENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _MPLW<'a> { +#[doc = "Reader of register HCH4CTL"] +pub type R = crate::R; +#[doc = "Writer for register HCH4CTL"] +pub type W = crate::W; +#[doc = "Register HCH4CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH4CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MPL`"] +pub type MPL_R = crate::R; +#[doc = "Write proxy for field `MPL`"] +pub struct MPL_W<'a> { w: &'a mut W, } -impl<'a> _MPLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MPL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07ff) | ((value as u32) & 0x07ff); self.w } } -#[doc = r" Proxy"] -pub struct _EPNUMW<'a> { +#[doc = "Reader of field `EPNUM`"] +pub type EPNUM_R = crate::R; +#[doc = "Write proxy for field `EPNUM`"] +pub struct EPNUM_W<'a> { w: &'a mut W, } -impl<'a> _EPNUMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPNUM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 11)) | (((value as u32) & 0x0f) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _EPDIRW<'a> { +#[doc = "Reader of field `EPDIR`"] +pub type EPDIR_R = crate::R; +#[doc = "Write proxy for field `EPDIR`"] +pub struct EPDIR_W<'a> { w: &'a mut W, } -impl<'a> _EPDIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _LSDW<'a> { +#[doc = "Reader of field `LSD`"] +pub type LSD_R = crate::R; +#[doc = "Write proxy for field `LSD`"] +pub struct LSD_W<'a> { w: &'a mut W, } -impl<'a> _LSDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LSD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _EPTYPEW<'a> { +#[doc = "Reader of field `EPTYPE`"] +pub type EPTYPE_R = crate::R; +#[doc = "Write proxy for field `EPTYPE`"] +pub struct EPTYPE_W<'a> { w: &'a mut W, } -impl<'a> _EPTYPEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPTYPE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _DARW<'a> { +#[doc = "Reader of field `DAR`"] +pub type DAR_R = crate::R; +#[doc = "Write proxy for field `DAR`"] +pub struct DAR_W<'a> { w: &'a mut W, } -impl<'a> _DARW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x7f << 22)) | (((value as u32) & 0x7f) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _ODDFRMW<'a> { +#[doc = "Reader of field `ODDFRM`"] +pub type ODDFRM_R = crate::R; +#[doc = "Write proxy for field `ODDFRM`"] +pub struct ODDFRM_W<'a> { w: &'a mut W, } -impl<'a> _ODDFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ODDFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _CDISW<'a> { +#[doc = "Reader of field `CDIS`"] +pub type CDIS_R = crate::R; +#[doc = "Write proxy for field `CDIS`"] +pub struct CDIS_W<'a> { w: &'a mut W, } -impl<'a> _CDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _CENW<'a> { +#[doc = "Reader of field `CEN`"] +pub type CEN_R = crate::R; +#[doc = "Write proxy for field `CEN`"] +pub struct CEN_W<'a> { w: &'a mut W, } -impl<'a> _CENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:10 - Maximum packet size"] - #[inline] - pub fn mpl(&self) -> MPLR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - MPLR { bits } + #[inline(always)] + pub fn mpl(&self) -> MPL_R { + MPL_R::new((self.bits & 0x07ff) as u16) } #[doc = "Bits 11:14 - Endpoint number"] - #[inline] - pub fn epnum(&self) -> EPNUMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPNUMR { bits } + #[inline(always)] + pub fn epnum(&self) -> EPNUM_R { + EPNUM_R::new(((self.bits >> 11) & 0x0f) as u8) } #[doc = "Bit 15 - Endpoint direction"] - #[inline] - pub fn epdir(&self) -> EPDIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDIRR { bits } + #[inline(always)] + pub fn epdir(&self) -> EPDIR_R { + EPDIR_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 17 - Low-speed device"] - #[inline] - pub fn lsd(&self) -> LSDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LSDR { bits } + #[inline(always)] + pub fn lsd(&self) -> LSD_R { + LSD_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&self) -> EPTYPER { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPTYPER { bits } + #[inline(always)] + pub fn eptype(&self) -> EPTYPE_R { + EPTYPE_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bits 22:28 - Device address"] - #[inline] - pub fn dar(&self) -> DARR { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DARR { bits } + #[inline(always)] + pub fn dar(&self) -> DAR_R { + DAR_R::new(((self.bits >> 22) & 0x7f) as u8) } #[doc = "Bit 29 - Odd frame"] - #[inline] - pub fn oddfrm(&self) -> ODDFRMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ODDFRMR { bits } + #[inline(always)] + pub fn oddfrm(&self) -> ODDFRM_R { + ODDFRM_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Channel disable"] - #[inline] - pub fn cdis(&self) -> CDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CDISR { bits } + #[inline(always)] + pub fn cdis(&self) -> CDIS_R { + CDIS_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Channel enable"] - #[inline] - pub fn cen(&self) -> CENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CENR { bits } + #[inline(always)] + pub fn cen(&self) -> CEN_R { + CEN_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:10 - Maximum packet size"] - #[inline] - pub fn mpl(&mut self) -> _MPLW { - _MPLW { w: self } + #[inline(always)] + pub fn mpl(&mut self) -> MPL_W { + MPL_W { w: self } } #[doc = "Bits 11:14 - Endpoint number"] - #[inline] - pub fn epnum(&mut self) -> _EPNUMW { - _EPNUMW { w: self } + #[inline(always)] + pub fn epnum(&mut self) -> EPNUM_W { + EPNUM_W { w: self } } #[doc = "Bit 15 - Endpoint direction"] - #[inline] - pub fn epdir(&mut self) -> _EPDIRW { - _EPDIRW { w: self } + #[inline(always)] + pub fn epdir(&mut self) -> EPDIR_W { + EPDIR_W { w: self } } #[doc = "Bit 17 - Low-speed device"] - #[inline] - pub fn lsd(&mut self) -> _LSDW { - _LSDW { w: self } + #[inline(always)] + pub fn lsd(&mut self) -> LSD_W { + LSD_W { w: self } } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&mut self) -> _EPTYPEW { - _EPTYPEW { w: self } + #[inline(always)] + pub fn eptype(&mut self) -> EPTYPE_W { + EPTYPE_W { w: self } } #[doc = "Bits 22:28 - Device address"] - #[inline] - pub fn dar(&mut self) -> _DARW { - _DARW { w: self } + #[inline(always)] + pub fn dar(&mut self) -> DAR_W { + DAR_W { w: self } } #[doc = "Bit 29 - Odd frame"] - #[inline] - pub fn oddfrm(&mut self) -> _ODDFRMW { - _ODDFRMW { w: self } + #[inline(always)] + pub fn oddfrm(&mut self) -> ODDFRM_W { + ODDFRM_W { w: self } } #[doc = "Bit 30 - Channel disable"] - #[inline] - pub fn cdis(&mut self) -> _CDISW { - _CDISW { w: self } + #[inline(always)] + pub fn cdis(&mut self) -> CDIS_W { + CDIS_W { w: self } } #[doc = "Bit 31 - Channel enable"] - #[inline] - pub fn cen(&mut self) -> _CENW { - _CENW { w: self } + #[inline(always)] + pub fn cen(&mut self) -> CEN_W { + CEN_W { w: self } } } diff --git a/src/usbfs_host/hch4inten.rs b/src/usbfs_host/hch4inten.rs index f34810a7bf6c088330ae2e7bcaf308f87fdf87dc..747a1a1c7502f3a4595d0b90b24cf8637ec017ac 100644 --- a/src/usbfs_host/hch4inten.rs +++ b/src/usbfs_host/hch4inten.rs @@ -1,595 +1,322 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH4INTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFIER { - bits: bool, -} -impl TFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CHIER { - bits: bool, -} -impl CHIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLIER { - bits: bool, -} -impl STALLIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKIER { - bits: bool, -} -impl NAKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKIER { - bits: bool, -} -impl ACKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBERIER { - bits: bool, -} -impl USBERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BBERIER { - bits: bool, -} -impl BBERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct REQOVRIER { - bits: bool, -} -impl REQOVRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTERIER { - bits: bool, -} -impl DTERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFIEW<'a> { +#[doc = "Reader of register HCH4INTEN"] +pub type R = crate::R; +#[doc = "Writer for register HCH4INTEN"] +pub type W = crate::W; +#[doc = "Register HCH4INTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH4INTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TFIE`"] +pub type TFIE_R = crate::R; +#[doc = "Write proxy for field `TFIE`"] +pub struct TFIE_W<'a> { w: &'a mut W, } -impl<'a> _TFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _CHIEW<'a> { +#[doc = "Reader of field `CHIE`"] +pub type CHIE_R = crate::R; +#[doc = "Write proxy for field `CHIE`"] +pub struct CHIE_W<'a> { w: &'a mut W, } -impl<'a> _CHIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STALLIEW<'a> { +#[doc = "Reader of field `STALLIE`"] +pub type STALLIE_R = crate::R; +#[doc = "Write proxy for field `STALLIE`"] +pub struct STALLIE_W<'a> { w: &'a mut W, } -impl<'a> _STALLIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALLIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NAKIEW<'a> { +#[doc = "Reader of field `NAKIE`"] +pub type NAKIE_R = crate::R; +#[doc = "Write proxy for field `NAKIE`"] +pub struct NAKIE_W<'a> { w: &'a mut W, } -impl<'a> _NAKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NAKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ACKIEW<'a> { +#[doc = "Reader of field `ACKIE`"] +pub type ACKIE_R = crate::R; +#[doc = "Write proxy for field `ACKIE`"] +pub struct ACKIE_W<'a> { w: &'a mut W, } -impl<'a> _ACKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _USBERIEW<'a> { +#[doc = "Reader of field `USBERIE`"] +pub type USBERIE_R = crate::R; +#[doc = "Write proxy for field `USBERIE`"] +pub struct USBERIE_W<'a> { w: &'a mut W, } -impl<'a> _USBERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BBERIEW<'a> { +#[doc = "Reader of field `BBERIE`"] +pub type BBERIE_R = crate::R; +#[doc = "Write proxy for field `BBERIE`"] +pub struct BBERIE_W<'a> { w: &'a mut W, } -impl<'a> _BBERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BBERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _REQOVRIEW<'a> { +#[doc = "Reader of field `REQOVRIE`"] +pub type REQOVRIE_R = crate::R; +#[doc = "Write proxy for field `REQOVRIE`"] +pub struct REQOVRIE_W<'a> { w: &'a mut W, } -impl<'a> _REQOVRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REQOVRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _DTERIEW<'a> { +#[doc = "Reader of field `DTERIE`"] +pub type DTERIE_R = crate::R; +#[doc = "Write proxy for field `DTERIE`"] +pub struct DTERIE_W<'a> { w: &'a mut W, } -impl<'a> _DTERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer completed interrupt enable"] - #[inline] - pub fn tfie(&self) -> TFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFIER { bits } + #[inline(always)] + pub fn tfie(&self) -> TFIE_R { + TFIE_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Channel halted interrupt enable"] - #[inline] - pub fn chie(&self) -> CHIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHIER { bits } + #[inline(always)] + pub fn chie(&self) -> CHIE_R { + CHIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - STALL interrupt enable"] - #[inline] - pub fn stallie(&self) -> STALLIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLIER { bits } + #[inline(always)] + pub fn stallie(&self) -> STALLIE_R { + STALLIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - NAK interrupt enable"] - #[inline] - pub fn nakie(&self) -> NAKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKIER { bits } + #[inline(always)] + pub fn nakie(&self) -> NAKIE_R { + NAKIE_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - ACK interrupt enable"] - #[inline] - pub fn ackie(&self) -> ACKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ACKIER { bits } + #[inline(always)] + pub fn ackie(&self) -> ACKIE_R { + ACKIE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 7 - USB bus error interrupt enable"] - #[inline] - pub fn usberie(&self) -> USBERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBERIER { bits } + #[inline(always)] + pub fn usberie(&self) -> USBERIE_R { + USBERIE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Babble error interrupt enable"] - #[inline] - pub fn bberie(&self) -> BBERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BBERIER { bits } + #[inline(always)] + pub fn bberie(&self) -> BBERIE_R { + BBERIE_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - request queue overrun interrupt enable"] - #[inline] - pub fn reqovrie(&self) -> REQOVRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - REQOVRIER { bits } + #[inline(always)] + pub fn reqovrie(&self) -> REQOVRIE_R { + REQOVRIE_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Data toggle error interrupt enable"] - #[inline] - pub fn dterie(&self) -> DTERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTERIER { bits } + #[inline(always)] + pub fn dterie(&self) -> DTERIE_R { + DTERIE_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer completed interrupt enable"] - #[inline] - pub fn tfie(&mut self) -> _TFIEW { - _TFIEW { w: self } + #[inline(always)] + pub fn tfie(&mut self) -> TFIE_W { + TFIE_W { w: self } } #[doc = "Bit 1 - Channel halted interrupt enable"] - #[inline] - pub fn chie(&mut self) -> _CHIEW { - _CHIEW { w: self } + #[inline(always)] + pub fn chie(&mut self) -> CHIE_W { + CHIE_W { w: self } } #[doc = "Bit 3 - STALL interrupt enable"] - #[inline] - pub fn stallie(&mut self) -> _STALLIEW { - _STALLIEW { w: self } + #[inline(always)] + pub fn stallie(&mut self) -> STALLIE_W { + STALLIE_W { w: self } } #[doc = "Bit 4 - NAK interrupt enable"] - #[inline] - pub fn nakie(&mut self) -> _NAKIEW { - _NAKIEW { w: self } + #[inline(always)] + pub fn nakie(&mut self) -> NAKIE_W { + NAKIE_W { w: self } } #[doc = "Bit 5 - ACK interrupt enable"] - #[inline] - pub fn ackie(&mut self) -> _ACKIEW { - _ACKIEW { w: self } + #[inline(always)] + pub fn ackie(&mut self) -> ACKIE_W { + ACKIE_W { w: self } } #[doc = "Bit 7 - USB bus error interrupt enable"] - #[inline] - pub fn usberie(&mut self) -> _USBERIEW { - _USBERIEW { w: self } + #[inline(always)] + pub fn usberie(&mut self) -> USBERIE_W { + USBERIE_W { w: self } } #[doc = "Bit 8 - Babble error interrupt enable"] - #[inline] - pub fn bberie(&mut self) -> _BBERIEW { - _BBERIEW { w: self } + #[inline(always)] + pub fn bberie(&mut self) -> BBERIE_W { + BBERIE_W { w: self } } #[doc = "Bit 9 - request queue overrun interrupt enable"] - #[inline] - pub fn reqovrie(&mut self) -> _REQOVRIEW { - _REQOVRIEW { w: self } + #[inline(always)] + pub fn reqovrie(&mut self) -> REQOVRIE_W { + REQOVRIE_W { w: self } } #[doc = "Bit 10 - Data toggle error interrupt enable"] - #[inline] - pub fn dterie(&mut self) -> _DTERIEW { - _DTERIEW { w: self } + #[inline(always)] + pub fn dterie(&mut self) -> DTERIE_W { + DTERIE_W { w: self } } } diff --git a/src/usbfs_host/hch4intf.rs b/src/usbfs_host/hch4intf.rs index 53792e49cef061d4b885cb2fe309b539bd6faa88..41021d09407c361a724c6d1a378790414113f23e 100644 --- a/src/usbfs_host/hch4intf.rs +++ b/src/usbfs_host/hch4intf.rs @@ -1,595 +1,322 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH4INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFR { - bits: bool, -} -impl TFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CHR { - bits: bool, -} -impl CHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLR { - bits: bool, -} -impl STALLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKR { - bits: bool, -} -impl NAKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKR { - bits: bool, -} -impl ACKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBERR { - bits: bool, -} -impl USBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BBERR { - bits: bool, -} -impl BBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct REQOVRR { - bits: bool, -} -impl REQOVRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTERR { - bits: bool, -} -impl DTERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFW<'a> { +#[doc = "Reader of register HCH4INTF"] +pub type R = crate::R; +#[doc = "Writer for register HCH4INTF"] +pub type W = crate::W; +#[doc = "Register HCH4INTF `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH4INTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TF`"] +pub type TF_R = crate::R; +#[doc = "Write proxy for field `TF`"] +pub struct TF_W<'a> { w: &'a mut W, } -impl<'a> _TFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _CHW<'a> { +#[doc = "Reader of field `CH`"] +pub type CH_R = crate::R; +#[doc = "Write proxy for field `CH`"] +pub struct CH_W<'a> { w: &'a mut W, } -impl<'a> _CHW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STALLW<'a> { +#[doc = "Reader of field `STALL`"] +pub type STALL_R = crate::R; +#[doc = "Write proxy for field `STALL`"] +pub struct STALL_W<'a> { w: &'a mut W, } -impl<'a> _STALLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NAKW<'a> { +#[doc = "Reader of field `NAK`"] +pub type NAK_R = crate::R; +#[doc = "Write proxy for field `NAK`"] +pub struct NAK_W<'a> { w: &'a mut W, } -impl<'a> _NAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ACKW<'a> { +#[doc = "Reader of field `ACK`"] +pub type ACK_R = crate::R; +#[doc = "Write proxy for field `ACK`"] +pub struct ACK_W<'a> { w: &'a mut W, } -impl<'a> _ACKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _USBERW<'a> { +#[doc = "Reader of field `USBER`"] +pub type USBER_R = crate::R; +#[doc = "Write proxy for field `USBER`"] +pub struct USBER_W<'a> { w: &'a mut W, } -impl<'a> _USBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BBERW<'a> { +#[doc = "Reader of field `BBER`"] +pub type BBER_R = crate::R; +#[doc = "Write proxy for field `BBER`"] +pub struct BBER_W<'a> { w: &'a mut W, } -impl<'a> _BBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _REQOVRW<'a> { +#[doc = "Reader of field `REQOVR`"] +pub type REQOVR_R = crate::R; +#[doc = "Write proxy for field `REQOVR`"] +pub struct REQOVR_W<'a> { w: &'a mut W, } -impl<'a> _REQOVRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REQOVR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _DTERW<'a> { +#[doc = "Reader of field `DTER`"] +pub type DTER_R = crate::R; +#[doc = "Write proxy for field `DTER`"] +pub struct DTER_W<'a> { w: &'a mut W, } -impl<'a> _DTERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&self) -> TFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFR { bits } + #[inline(always)] + pub fn tf(&self) -> TF_R { + TF_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Channel halted"] - #[inline] - pub fn ch(&self) -> CHR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHR { bits } + #[inline(always)] + pub fn ch(&self) -> CH_R { + CH_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - STALL response received interrupt"] - #[inline] - pub fn stall(&self) -> STALLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLR { bits } + #[inline(always)] + pub fn stall(&self) -> STALL_R { + STALL_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - NAK response received interrupt"] - #[inline] - pub fn nak(&self) -> NAKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKR { bits } + #[inline(always)] + pub fn nak(&self) -> NAK_R { + NAK_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - ACK response received/transmitted interrupt"] - #[inline] - pub fn ack(&self) -> ACKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ACKR { bits } + #[inline(always)] + pub fn ack(&self) -> ACK_R { + ACK_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 7 - USB bus error"] - #[inline] - pub fn usber(&self) -> USBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBERR { bits } + #[inline(always)] + pub fn usber(&self) -> USBER_R { + USBER_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Babble error"] - #[inline] - pub fn bber(&self) -> BBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BBERR { bits } + #[inline(always)] + pub fn bber(&self) -> BBER_R { + BBER_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Request queue overrun"] - #[inline] - pub fn reqovr(&self) -> REQOVRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - REQOVRR { bits } + #[inline(always)] + pub fn reqovr(&self) -> REQOVR_R { + REQOVR_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Data toggle error"] - #[inline] - pub fn dter(&self) -> DTERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTERR { bits } + #[inline(always)] + pub fn dter(&self) -> DTER_R { + DTER_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&mut self) -> _TFW { - _TFW { w: self } + #[inline(always)] + pub fn tf(&mut self) -> TF_W { + TF_W { w: self } } #[doc = "Bit 1 - Channel halted"] - #[inline] - pub fn ch(&mut self) -> _CHW { - _CHW { w: self } + #[inline(always)] + pub fn ch(&mut self) -> CH_W { + CH_W { w: self } } #[doc = "Bit 3 - STALL response received interrupt"] - #[inline] - pub fn stall(&mut self) -> _STALLW { - _STALLW { w: self } + #[inline(always)] + pub fn stall(&mut self) -> STALL_W { + STALL_W { w: self } } #[doc = "Bit 4 - NAK response received interrupt"] - #[inline] - pub fn nak(&mut self) -> _NAKW { - _NAKW { w: self } + #[inline(always)] + pub fn nak(&mut self) -> NAK_W { + NAK_W { w: self } } #[doc = "Bit 5 - ACK response received/transmitted interrupt"] - #[inline] - pub fn ack(&mut self) -> _ACKW { - _ACKW { w: self } + #[inline(always)] + pub fn ack(&mut self) -> ACK_W { + ACK_W { w: self } } #[doc = "Bit 7 - USB bus error"] - #[inline] - pub fn usber(&mut self) -> _USBERW { - _USBERW { w: self } + #[inline(always)] + pub fn usber(&mut self) -> USBER_W { + USBER_W { w: self } } #[doc = "Bit 8 - Babble error"] - #[inline] - pub fn bber(&mut self) -> _BBERW { - _BBERW { w: self } + #[inline(always)] + pub fn bber(&mut self) -> BBER_W { + BBER_W { w: self } } #[doc = "Bit 9 - Request queue overrun"] - #[inline] - pub fn reqovr(&mut self) -> _REQOVRW { - _REQOVRW { w: self } + #[inline(always)] + pub fn reqovr(&mut self) -> REQOVR_W { + REQOVR_W { w: self } } #[doc = "Bit 10 - Data toggle error"] - #[inline] - pub fn dter(&mut self) -> _DTERW { - _DTERW { w: self } + #[inline(always)] + pub fn dter(&mut self) -> DTER_W { + DTER_W { w: self } } } diff --git a/src/usbfs_host/hch4len.rs b/src/usbfs_host/hch4len.rs index 69895715ce482128e7bf369fd73f02f6edac03b8..40b8a42e63414ca304c5f2e670a6b4b4264fb29e 100644 --- a/src/usbfs_host/hch4len.rs +++ b/src/usbfs_host/hch4len.rs @@ -1,187 +1,88 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH4LEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TLENR { - bits: u32, -} -impl TLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PCNTR { - bits: u16, -} -impl PCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DPIDR { - bits: u8, -} -impl DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _TLENW<'a> { +#[doc = "Reader of register HCH4LEN"] +pub type R = crate::R; +#[doc = "Writer for register HCH4LEN"] +pub type W = crate::W; +#[doc = "Register HCH4LEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH4LEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TLEN`"] +pub type TLEN_R = crate::R; +#[doc = "Write proxy for field `TLEN`"] +pub struct TLEN_W<'a> { w: &'a mut W, } -impl<'a> _TLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0007_ffff) | ((value as u32) & 0x0007_ffff); self.w } } -#[doc = r" Proxy"] -pub struct _PCNTW<'a> { +#[doc = "Reader of field `PCNT`"] +pub type PCNT_R = crate::R; +#[doc = "Write proxy for field `PCNT`"] +pub struct PCNT_W<'a> { w: &'a mut W, } -impl<'a> _PCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03ff << 19)) | (((value as u32) & 0x03ff) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _DPIDW<'a> { +#[doc = "Reader of field `DPID`"] +pub type DPID_R = crate::R; +#[doc = "Write proxy for field `DPID`"] +pub struct DPID_W<'a> { w: &'a mut W, } -impl<'a> _DPIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DPID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 29)) | (((value as u32) & 0x03) << 29); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&self) -> TLENR { - let bits = { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - TLENR { bits } + #[inline(always)] + pub fn tlen(&self) -> TLEN_R { + TLEN_R::new((self.bits & 0x0007_ffff) as u32) } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&self) -> PCNTR { - let bits = { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - PCNTR { bits } + #[inline(always)] + pub fn pcnt(&self) -> PCNT_R { + PCNT_R::new(((self.bits >> 19) & 0x03ff) as u16) } #[doc = "Bits 29:30 - Data PID"] - #[inline] - pub fn dpid(&self) -> DPIDR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DPIDR { bits } + #[inline(always)] + pub fn dpid(&self) -> DPID_R { + DPID_R::new(((self.bits >> 29) & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&mut self) -> _TLENW { - _TLENW { w: self } + #[inline(always)] + pub fn tlen(&mut self) -> TLEN_W { + TLEN_W { w: self } } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&mut self) -> _PCNTW { - _PCNTW { w: self } + #[inline(always)] + pub fn pcnt(&mut self) -> PCNT_W { + PCNT_W { w: self } } #[doc = "Bits 29:30 - Data PID"] - #[inline] - pub fn dpid(&mut self) -> _DPIDW { - _DPIDW { w: self } + #[inline(always)] + pub fn dpid(&mut self) -> DPID_W { + DPID_W { w: self } } } diff --git a/src/usbfs_host/hch5ctl.rs b/src/usbfs_host/hch5ctl.rs index e72e18a17bcb091e7220d1ed16ed462b606647be..cbb0fc4bba80c6fed9ef15580a887fc030c8447b 100644 --- a/src/usbfs_host/hch5ctl.rs +++ b/src/usbfs_host/hch5ctl.rs @@ -1,523 +1,282 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH5CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MPLR { - bits: u16, -} -impl MPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPNUMR { - bits: u8, -} -impl EPNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPDIRR { - bits: bool, -} -impl EPDIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LSDR { - bits: bool, -} -impl LSDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTYPER { - bits: u8, -} -impl EPTYPER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DARR { - bits: u8, -} -impl DARR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ODDFRMR { - bits: bool, -} -impl ODDFRMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CDISR { - bits: bool, -} -impl CDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CENR { - bits: bool, -} -impl CENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _MPLW<'a> { +#[doc = "Reader of register HCH5CTL"] +pub type R = crate::R; +#[doc = "Writer for register HCH5CTL"] +pub type W = crate::W; +#[doc = "Register HCH5CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH5CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MPL`"] +pub type MPL_R = crate::R; +#[doc = "Write proxy for field `MPL`"] +pub struct MPL_W<'a> { w: &'a mut W, } -impl<'a> _MPLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MPL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07ff) | ((value as u32) & 0x07ff); self.w } } -#[doc = r" Proxy"] -pub struct _EPNUMW<'a> { +#[doc = "Reader of field `EPNUM`"] +pub type EPNUM_R = crate::R; +#[doc = "Write proxy for field `EPNUM`"] +pub struct EPNUM_W<'a> { w: &'a mut W, } -impl<'a> _EPNUMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPNUM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 11)) | (((value as u32) & 0x0f) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _EPDIRW<'a> { +#[doc = "Reader of field `EPDIR`"] +pub type EPDIR_R = crate::R; +#[doc = "Write proxy for field `EPDIR`"] +pub struct EPDIR_W<'a> { w: &'a mut W, } -impl<'a> _EPDIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _LSDW<'a> { +#[doc = "Reader of field `LSD`"] +pub type LSD_R = crate::R; +#[doc = "Write proxy for field `LSD`"] +pub struct LSD_W<'a> { w: &'a mut W, } -impl<'a> _LSDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LSD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _EPTYPEW<'a> { +#[doc = "Reader of field `EPTYPE`"] +pub type EPTYPE_R = crate::R; +#[doc = "Write proxy for field `EPTYPE`"] +pub struct EPTYPE_W<'a> { w: &'a mut W, } -impl<'a> _EPTYPEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPTYPE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _DARW<'a> { +#[doc = "Reader of field `DAR`"] +pub type DAR_R = crate::R; +#[doc = "Write proxy for field `DAR`"] +pub struct DAR_W<'a> { w: &'a mut W, } -impl<'a> _DARW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x7f << 22)) | (((value as u32) & 0x7f) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _ODDFRMW<'a> { +#[doc = "Reader of field `ODDFRM`"] +pub type ODDFRM_R = crate::R; +#[doc = "Write proxy for field `ODDFRM`"] +pub struct ODDFRM_W<'a> { w: &'a mut W, } -impl<'a> _ODDFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ODDFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _CDISW<'a> { +#[doc = "Reader of field `CDIS`"] +pub type CDIS_R = crate::R; +#[doc = "Write proxy for field `CDIS`"] +pub struct CDIS_W<'a> { w: &'a mut W, } -impl<'a> _CDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _CENW<'a> { +#[doc = "Reader of field `CEN`"] +pub type CEN_R = crate::R; +#[doc = "Write proxy for field `CEN`"] +pub struct CEN_W<'a> { w: &'a mut W, } -impl<'a> _CENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:10 - Maximum packet size"] - #[inline] - pub fn mpl(&self) -> MPLR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - MPLR { bits } + #[inline(always)] + pub fn mpl(&self) -> MPL_R { + MPL_R::new((self.bits & 0x07ff) as u16) } #[doc = "Bits 11:14 - Endpoint number"] - #[inline] - pub fn epnum(&self) -> EPNUMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPNUMR { bits } + #[inline(always)] + pub fn epnum(&self) -> EPNUM_R { + EPNUM_R::new(((self.bits >> 11) & 0x0f) as u8) } #[doc = "Bit 15 - Endpoint direction"] - #[inline] - pub fn epdir(&self) -> EPDIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDIRR { bits } + #[inline(always)] + pub fn epdir(&self) -> EPDIR_R { + EPDIR_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 17 - Low-speed device"] - #[inline] - pub fn lsd(&self) -> LSDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LSDR { bits } + #[inline(always)] + pub fn lsd(&self) -> LSD_R { + LSD_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&self) -> EPTYPER { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPTYPER { bits } + #[inline(always)] + pub fn eptype(&self) -> EPTYPE_R { + EPTYPE_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bits 22:28 - Device address"] - #[inline] - pub fn dar(&self) -> DARR { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DARR { bits } + #[inline(always)] + pub fn dar(&self) -> DAR_R { + DAR_R::new(((self.bits >> 22) & 0x7f) as u8) } #[doc = "Bit 29 - Odd frame"] - #[inline] - pub fn oddfrm(&self) -> ODDFRMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ODDFRMR { bits } + #[inline(always)] + pub fn oddfrm(&self) -> ODDFRM_R { + ODDFRM_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Channel disable"] - #[inline] - pub fn cdis(&self) -> CDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CDISR { bits } + #[inline(always)] + pub fn cdis(&self) -> CDIS_R { + CDIS_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Channel enable"] - #[inline] - pub fn cen(&self) -> CENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CENR { bits } + #[inline(always)] + pub fn cen(&self) -> CEN_R { + CEN_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:10 - Maximum packet size"] - #[inline] - pub fn mpl(&mut self) -> _MPLW { - _MPLW { w: self } + #[inline(always)] + pub fn mpl(&mut self) -> MPL_W { + MPL_W { w: self } } #[doc = "Bits 11:14 - Endpoint number"] - #[inline] - pub fn epnum(&mut self) -> _EPNUMW { - _EPNUMW { w: self } + #[inline(always)] + pub fn epnum(&mut self) -> EPNUM_W { + EPNUM_W { w: self } } #[doc = "Bit 15 - Endpoint direction"] - #[inline] - pub fn epdir(&mut self) -> _EPDIRW { - _EPDIRW { w: self } + #[inline(always)] + pub fn epdir(&mut self) -> EPDIR_W { + EPDIR_W { w: self } } #[doc = "Bit 17 - Low-speed device"] - #[inline] - pub fn lsd(&mut self) -> _LSDW { - _LSDW { w: self } + #[inline(always)] + pub fn lsd(&mut self) -> LSD_W { + LSD_W { w: self } } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&mut self) -> _EPTYPEW { - _EPTYPEW { w: self } + #[inline(always)] + pub fn eptype(&mut self) -> EPTYPE_W { + EPTYPE_W { w: self } } #[doc = "Bits 22:28 - Device address"] - #[inline] - pub fn dar(&mut self) -> _DARW { - _DARW { w: self } + #[inline(always)] + pub fn dar(&mut self) -> DAR_W { + DAR_W { w: self } } #[doc = "Bit 29 - Odd frame"] - #[inline] - pub fn oddfrm(&mut self) -> _ODDFRMW { - _ODDFRMW { w: self } + #[inline(always)] + pub fn oddfrm(&mut self) -> ODDFRM_W { + ODDFRM_W { w: self } } #[doc = "Bit 30 - Channel disable"] - #[inline] - pub fn cdis(&mut self) -> _CDISW { - _CDISW { w: self } + #[inline(always)] + pub fn cdis(&mut self) -> CDIS_W { + CDIS_W { w: self } } #[doc = "Bit 31 - Channel enable"] - #[inline] - pub fn cen(&mut self) -> _CENW { - _CENW { w: self } + #[inline(always)] + pub fn cen(&mut self) -> CEN_W { + CEN_W { w: self } } } diff --git a/src/usbfs_host/hch5inten.rs b/src/usbfs_host/hch5inten.rs index f981b8808d1fa98c2f5320b352eeb6bc3a4b945b..084075cd43bfdcd4623b6a029bfe43665296e2db 100644 --- a/src/usbfs_host/hch5inten.rs +++ b/src/usbfs_host/hch5inten.rs @@ -1,595 +1,322 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH5INTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFIER { - bits: bool, -} -impl TFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CHIER { - bits: bool, -} -impl CHIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLIER { - bits: bool, -} -impl STALLIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKIER { - bits: bool, -} -impl NAKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKIER { - bits: bool, -} -impl ACKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBERIER { - bits: bool, -} -impl USBERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BBERIER { - bits: bool, -} -impl BBERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct REQOVRIER { - bits: bool, -} -impl REQOVRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTERIER { - bits: bool, -} -impl DTERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFIEW<'a> { +#[doc = "Reader of register HCH5INTEN"] +pub type R = crate::R; +#[doc = "Writer for register HCH5INTEN"] +pub type W = crate::W; +#[doc = "Register HCH5INTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH5INTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TFIE`"] +pub type TFIE_R = crate::R; +#[doc = "Write proxy for field `TFIE`"] +pub struct TFIE_W<'a> { w: &'a mut W, } -impl<'a> _TFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _CHIEW<'a> { +#[doc = "Reader of field `CHIE`"] +pub type CHIE_R = crate::R; +#[doc = "Write proxy for field `CHIE`"] +pub struct CHIE_W<'a> { w: &'a mut W, } -impl<'a> _CHIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STALLIEW<'a> { +#[doc = "Reader of field `STALLIE`"] +pub type STALLIE_R = crate::R; +#[doc = "Write proxy for field `STALLIE`"] +pub struct STALLIE_W<'a> { w: &'a mut W, } -impl<'a> _STALLIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALLIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NAKIEW<'a> { +#[doc = "Reader of field `NAKIE`"] +pub type NAKIE_R = crate::R; +#[doc = "Write proxy for field `NAKIE`"] +pub struct NAKIE_W<'a> { w: &'a mut W, } -impl<'a> _NAKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NAKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ACKIEW<'a> { +#[doc = "Reader of field `ACKIE`"] +pub type ACKIE_R = crate::R; +#[doc = "Write proxy for field `ACKIE`"] +pub struct ACKIE_W<'a> { w: &'a mut W, } -impl<'a> _ACKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _USBERIEW<'a> { +#[doc = "Reader of field `USBERIE`"] +pub type USBERIE_R = crate::R; +#[doc = "Write proxy for field `USBERIE`"] +pub struct USBERIE_W<'a> { w: &'a mut W, } -impl<'a> _USBERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BBERIEW<'a> { +#[doc = "Reader of field `BBERIE`"] +pub type BBERIE_R = crate::R; +#[doc = "Write proxy for field `BBERIE`"] +pub struct BBERIE_W<'a> { w: &'a mut W, } -impl<'a> _BBERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BBERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _REQOVRIEW<'a> { +#[doc = "Reader of field `REQOVRIE`"] +pub type REQOVRIE_R = crate::R; +#[doc = "Write proxy for field `REQOVRIE`"] +pub struct REQOVRIE_W<'a> { w: &'a mut W, } -impl<'a> _REQOVRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REQOVRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _DTERIEW<'a> { +#[doc = "Reader of field `DTERIE`"] +pub type DTERIE_R = crate::R; +#[doc = "Write proxy for field `DTERIE`"] +pub struct DTERIE_W<'a> { w: &'a mut W, } -impl<'a> _DTERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer completed interrupt enable"] - #[inline] - pub fn tfie(&self) -> TFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFIER { bits } + #[inline(always)] + pub fn tfie(&self) -> TFIE_R { + TFIE_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Channel halted interrupt enable"] - #[inline] - pub fn chie(&self) -> CHIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHIER { bits } + #[inline(always)] + pub fn chie(&self) -> CHIE_R { + CHIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - STALL interrupt enable"] - #[inline] - pub fn stallie(&self) -> STALLIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLIER { bits } + #[inline(always)] + pub fn stallie(&self) -> STALLIE_R { + STALLIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - NAK interrupt enable"] - #[inline] - pub fn nakie(&self) -> NAKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKIER { bits } + #[inline(always)] + pub fn nakie(&self) -> NAKIE_R { + NAKIE_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - ACK interrupt enable"] - #[inline] - pub fn ackie(&self) -> ACKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ACKIER { bits } + #[inline(always)] + pub fn ackie(&self) -> ACKIE_R { + ACKIE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 7 - USB bus error interrupt enable"] - #[inline] - pub fn usberie(&self) -> USBERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBERIER { bits } + #[inline(always)] + pub fn usberie(&self) -> USBERIE_R { + USBERIE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Babble error interrupt enable"] - #[inline] - pub fn bberie(&self) -> BBERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BBERIER { bits } + #[inline(always)] + pub fn bberie(&self) -> BBERIE_R { + BBERIE_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - request queue overrun interrupt enable"] - #[inline] - pub fn reqovrie(&self) -> REQOVRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - REQOVRIER { bits } + #[inline(always)] + pub fn reqovrie(&self) -> REQOVRIE_R { + REQOVRIE_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Data toggle error interrupt enable"] - #[inline] - pub fn dterie(&self) -> DTERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTERIER { bits } + #[inline(always)] + pub fn dterie(&self) -> DTERIE_R { + DTERIE_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer completed interrupt enable"] - #[inline] - pub fn tfie(&mut self) -> _TFIEW { - _TFIEW { w: self } + #[inline(always)] + pub fn tfie(&mut self) -> TFIE_W { + TFIE_W { w: self } } #[doc = "Bit 1 - Channel halted interrupt enable"] - #[inline] - pub fn chie(&mut self) -> _CHIEW { - _CHIEW { w: self } + #[inline(always)] + pub fn chie(&mut self) -> CHIE_W { + CHIE_W { w: self } } #[doc = "Bit 3 - STALL interrupt enable"] - #[inline] - pub fn stallie(&mut self) -> _STALLIEW { - _STALLIEW { w: self } + #[inline(always)] + pub fn stallie(&mut self) -> STALLIE_W { + STALLIE_W { w: self } } #[doc = "Bit 4 - NAK interrupt enable"] - #[inline] - pub fn nakie(&mut self) -> _NAKIEW { - _NAKIEW { w: self } + #[inline(always)] + pub fn nakie(&mut self) -> NAKIE_W { + NAKIE_W { w: self } } #[doc = "Bit 5 - ACK interrupt enable"] - #[inline] - pub fn ackie(&mut self) -> _ACKIEW { - _ACKIEW { w: self } + #[inline(always)] + pub fn ackie(&mut self) -> ACKIE_W { + ACKIE_W { w: self } } #[doc = "Bit 7 - USB bus error interrupt enable"] - #[inline] - pub fn usberie(&mut self) -> _USBERIEW { - _USBERIEW { w: self } + #[inline(always)] + pub fn usberie(&mut self) -> USBERIE_W { + USBERIE_W { w: self } } #[doc = "Bit 8 - Babble error interrupt enable"] - #[inline] - pub fn bberie(&mut self) -> _BBERIEW { - _BBERIEW { w: self } + #[inline(always)] + pub fn bberie(&mut self) -> BBERIE_W { + BBERIE_W { w: self } } #[doc = "Bit 9 - request queue overrun interrupt enable"] - #[inline] - pub fn reqovrie(&mut self) -> _REQOVRIEW { - _REQOVRIEW { w: self } + #[inline(always)] + pub fn reqovrie(&mut self) -> REQOVRIE_W { + REQOVRIE_W { w: self } } #[doc = "Bit 10 - Data toggle error interrupt enable"] - #[inline] - pub fn dterie(&mut self) -> _DTERIEW { - _DTERIEW { w: self } + #[inline(always)] + pub fn dterie(&mut self) -> DTERIE_W { + DTERIE_W { w: self } } } diff --git a/src/usbfs_host/hch5intf.rs b/src/usbfs_host/hch5intf.rs index 93bfa4cdbb49edfb95bd7663c126ec0ecedb5c37..9e5b1835abe4ebd98eaf5763be7f8c34393baa75 100644 --- a/src/usbfs_host/hch5intf.rs +++ b/src/usbfs_host/hch5intf.rs @@ -1,595 +1,322 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH5INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFR { - bits: bool, -} -impl TFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CHR { - bits: bool, -} -impl CHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLR { - bits: bool, -} -impl STALLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKR { - bits: bool, -} -impl NAKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKR { - bits: bool, -} -impl ACKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBERR { - bits: bool, -} -impl USBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BBERR { - bits: bool, -} -impl BBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct REQOVRR { - bits: bool, -} -impl REQOVRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTERR { - bits: bool, -} -impl DTERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFW<'a> { +#[doc = "Reader of register HCH5INTF"] +pub type R = crate::R; +#[doc = "Writer for register HCH5INTF"] +pub type W = crate::W; +#[doc = "Register HCH5INTF `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH5INTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TF`"] +pub type TF_R = crate::R; +#[doc = "Write proxy for field `TF`"] +pub struct TF_W<'a> { w: &'a mut W, } -impl<'a> _TFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _CHW<'a> { +#[doc = "Reader of field `CH`"] +pub type CH_R = crate::R; +#[doc = "Write proxy for field `CH`"] +pub struct CH_W<'a> { w: &'a mut W, } -impl<'a> _CHW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STALLW<'a> { +#[doc = "Reader of field `STALL`"] +pub type STALL_R = crate::R; +#[doc = "Write proxy for field `STALL`"] +pub struct STALL_W<'a> { w: &'a mut W, } -impl<'a> _STALLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NAKW<'a> { +#[doc = "Reader of field `NAK`"] +pub type NAK_R = crate::R; +#[doc = "Write proxy for field `NAK`"] +pub struct NAK_W<'a> { w: &'a mut W, } -impl<'a> _NAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ACKW<'a> { +#[doc = "Reader of field `ACK`"] +pub type ACK_R = crate::R; +#[doc = "Write proxy for field `ACK`"] +pub struct ACK_W<'a> { w: &'a mut W, } -impl<'a> _ACKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _USBERW<'a> { +#[doc = "Reader of field `USBER`"] +pub type USBER_R = crate::R; +#[doc = "Write proxy for field `USBER`"] +pub struct USBER_W<'a> { w: &'a mut W, } -impl<'a> _USBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BBERW<'a> { +#[doc = "Reader of field `BBER`"] +pub type BBER_R = crate::R; +#[doc = "Write proxy for field `BBER`"] +pub struct BBER_W<'a> { w: &'a mut W, } -impl<'a> _BBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _REQOVRW<'a> { +#[doc = "Reader of field `REQOVR`"] +pub type REQOVR_R = crate::R; +#[doc = "Write proxy for field `REQOVR`"] +pub struct REQOVR_W<'a> { w: &'a mut W, } -impl<'a> _REQOVRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REQOVR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _DTERW<'a> { +#[doc = "Reader of field `DTER`"] +pub type DTER_R = crate::R; +#[doc = "Write proxy for field `DTER`"] +pub struct DTER_W<'a> { w: &'a mut W, } -impl<'a> _DTERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&self) -> TFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFR { bits } + #[inline(always)] + pub fn tf(&self) -> TF_R { + TF_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Channel halted"] - #[inline] - pub fn ch(&self) -> CHR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHR { bits } + #[inline(always)] + pub fn ch(&self) -> CH_R { + CH_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - STALL response received interrupt"] - #[inline] - pub fn stall(&self) -> STALLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLR { bits } + #[inline(always)] + pub fn stall(&self) -> STALL_R { + STALL_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - NAK response received interrupt"] - #[inline] - pub fn nak(&self) -> NAKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKR { bits } + #[inline(always)] + pub fn nak(&self) -> NAK_R { + NAK_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - ACK response received/transmitted interrupt"] - #[inline] - pub fn ack(&self) -> ACKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ACKR { bits } + #[inline(always)] + pub fn ack(&self) -> ACK_R { + ACK_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 7 - USB bus error"] - #[inline] - pub fn usber(&self) -> USBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBERR { bits } + #[inline(always)] + pub fn usber(&self) -> USBER_R { + USBER_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Babble error"] - #[inline] - pub fn bber(&self) -> BBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BBERR { bits } + #[inline(always)] + pub fn bber(&self) -> BBER_R { + BBER_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Request queue overrun"] - #[inline] - pub fn reqovr(&self) -> REQOVRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - REQOVRR { bits } + #[inline(always)] + pub fn reqovr(&self) -> REQOVR_R { + REQOVR_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Data toggle error"] - #[inline] - pub fn dter(&self) -> DTERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTERR { bits } + #[inline(always)] + pub fn dter(&self) -> DTER_R { + DTER_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&mut self) -> _TFW { - _TFW { w: self } + #[inline(always)] + pub fn tf(&mut self) -> TF_W { + TF_W { w: self } } #[doc = "Bit 1 - Channel halted"] - #[inline] - pub fn ch(&mut self) -> _CHW { - _CHW { w: self } + #[inline(always)] + pub fn ch(&mut self) -> CH_W { + CH_W { w: self } } #[doc = "Bit 3 - STALL response received interrupt"] - #[inline] - pub fn stall(&mut self) -> _STALLW { - _STALLW { w: self } + #[inline(always)] + pub fn stall(&mut self) -> STALL_W { + STALL_W { w: self } } #[doc = "Bit 4 - NAK response received interrupt"] - #[inline] - pub fn nak(&mut self) -> _NAKW { - _NAKW { w: self } + #[inline(always)] + pub fn nak(&mut self) -> NAK_W { + NAK_W { w: self } } #[doc = "Bit 5 - ACK response received/transmitted interrupt"] - #[inline] - pub fn ack(&mut self) -> _ACKW { - _ACKW { w: self } + #[inline(always)] + pub fn ack(&mut self) -> ACK_W { + ACK_W { w: self } } #[doc = "Bit 7 - USB bus error"] - #[inline] - pub fn usber(&mut self) -> _USBERW { - _USBERW { w: self } + #[inline(always)] + pub fn usber(&mut self) -> USBER_W { + USBER_W { w: self } } #[doc = "Bit 8 - Babble error"] - #[inline] - pub fn bber(&mut self) -> _BBERW { - _BBERW { w: self } + #[inline(always)] + pub fn bber(&mut self) -> BBER_W { + BBER_W { w: self } } #[doc = "Bit 9 - Request queue overrun"] - #[inline] - pub fn reqovr(&mut self) -> _REQOVRW { - _REQOVRW { w: self } + #[inline(always)] + pub fn reqovr(&mut self) -> REQOVR_W { + REQOVR_W { w: self } } #[doc = "Bit 10 - Data toggle error"] - #[inline] - pub fn dter(&mut self) -> _DTERW { - _DTERW { w: self } + #[inline(always)] + pub fn dter(&mut self) -> DTER_W { + DTER_W { w: self } } } diff --git a/src/usbfs_host/hch5len.rs b/src/usbfs_host/hch5len.rs index 7a752ea5fb9cf61c00509735a8baaab32753942f..3e168968c6a4ae0d866cd73612609dad78892e23 100644 --- a/src/usbfs_host/hch5len.rs +++ b/src/usbfs_host/hch5len.rs @@ -1,187 +1,88 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH5LEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TLENR { - bits: u32, -} -impl TLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PCNTR { - bits: u16, -} -impl PCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DPIDR { - bits: u8, -} -impl DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _TLENW<'a> { +#[doc = "Reader of register HCH5LEN"] +pub type R = crate::R; +#[doc = "Writer for register HCH5LEN"] +pub type W = crate::W; +#[doc = "Register HCH5LEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH5LEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TLEN`"] +pub type TLEN_R = crate::R; +#[doc = "Write proxy for field `TLEN`"] +pub struct TLEN_W<'a> { w: &'a mut W, } -impl<'a> _TLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0007_ffff) | ((value as u32) & 0x0007_ffff); self.w } } -#[doc = r" Proxy"] -pub struct _PCNTW<'a> { +#[doc = "Reader of field `PCNT`"] +pub type PCNT_R = crate::R; +#[doc = "Write proxy for field `PCNT`"] +pub struct PCNT_W<'a> { w: &'a mut W, } -impl<'a> _PCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03ff << 19)) | (((value as u32) & 0x03ff) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _DPIDW<'a> { +#[doc = "Reader of field `DPID`"] +pub type DPID_R = crate::R; +#[doc = "Write proxy for field `DPID`"] +pub struct DPID_W<'a> { w: &'a mut W, } -impl<'a> _DPIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DPID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 29)) | (((value as u32) & 0x03) << 29); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&self) -> TLENR { - let bits = { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - TLENR { bits } + #[inline(always)] + pub fn tlen(&self) -> TLEN_R { + TLEN_R::new((self.bits & 0x0007_ffff) as u32) } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&self) -> PCNTR { - let bits = { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - PCNTR { bits } + #[inline(always)] + pub fn pcnt(&self) -> PCNT_R { + PCNT_R::new(((self.bits >> 19) & 0x03ff) as u16) } #[doc = "Bits 29:30 - Data PID"] - #[inline] - pub fn dpid(&self) -> DPIDR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DPIDR { bits } + #[inline(always)] + pub fn dpid(&self) -> DPID_R { + DPID_R::new(((self.bits >> 29) & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&mut self) -> _TLENW { - _TLENW { w: self } + #[inline(always)] + pub fn tlen(&mut self) -> TLEN_W { + TLEN_W { w: self } } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&mut self) -> _PCNTW { - _PCNTW { w: self } + #[inline(always)] + pub fn pcnt(&mut self) -> PCNT_W { + PCNT_W { w: self } } #[doc = "Bits 29:30 - Data PID"] - #[inline] - pub fn dpid(&mut self) -> _DPIDW { - _DPIDW { w: self } + #[inline(always)] + pub fn dpid(&mut self) -> DPID_W { + DPID_W { w: self } } } diff --git a/src/usbfs_host/hch6ctl.rs b/src/usbfs_host/hch6ctl.rs index b20ae1250c99a1ba4257a9049914dd2dddcc048d..c78779f8159bcfc6f9ecdaa44ba5bcedc7c46e5c 100644 --- a/src/usbfs_host/hch6ctl.rs +++ b/src/usbfs_host/hch6ctl.rs @@ -1,523 +1,282 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH6CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MPLR { - bits: u16, -} -impl MPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPNUMR { - bits: u8, -} -impl EPNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPDIRR { - bits: bool, -} -impl EPDIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LSDR { - bits: bool, -} -impl LSDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTYPER { - bits: u8, -} -impl EPTYPER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DARR { - bits: u8, -} -impl DARR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ODDFRMR { - bits: bool, -} -impl ODDFRMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CDISR { - bits: bool, -} -impl CDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CENR { - bits: bool, -} -impl CENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _MPLW<'a> { +#[doc = "Reader of register HCH6CTL"] +pub type R = crate::R; +#[doc = "Writer for register HCH6CTL"] +pub type W = crate::W; +#[doc = "Register HCH6CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH6CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MPL`"] +pub type MPL_R = crate::R; +#[doc = "Write proxy for field `MPL`"] +pub struct MPL_W<'a> { w: &'a mut W, } -impl<'a> _MPLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MPL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07ff) | ((value as u32) & 0x07ff); self.w } } -#[doc = r" Proxy"] -pub struct _EPNUMW<'a> { +#[doc = "Reader of field `EPNUM`"] +pub type EPNUM_R = crate::R; +#[doc = "Write proxy for field `EPNUM`"] +pub struct EPNUM_W<'a> { w: &'a mut W, } -impl<'a> _EPNUMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPNUM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 11)) | (((value as u32) & 0x0f) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _EPDIRW<'a> { +#[doc = "Reader of field `EPDIR`"] +pub type EPDIR_R = crate::R; +#[doc = "Write proxy for field `EPDIR`"] +pub struct EPDIR_W<'a> { w: &'a mut W, } -impl<'a> _EPDIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _LSDW<'a> { +#[doc = "Reader of field `LSD`"] +pub type LSD_R = crate::R; +#[doc = "Write proxy for field `LSD`"] +pub struct LSD_W<'a> { w: &'a mut W, } -impl<'a> _LSDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LSD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _EPTYPEW<'a> { +#[doc = "Reader of field `EPTYPE`"] +pub type EPTYPE_R = crate::R; +#[doc = "Write proxy for field `EPTYPE`"] +pub struct EPTYPE_W<'a> { w: &'a mut W, } -impl<'a> _EPTYPEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPTYPE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _DARW<'a> { +#[doc = "Reader of field `DAR`"] +pub type DAR_R = crate::R; +#[doc = "Write proxy for field `DAR`"] +pub struct DAR_W<'a> { w: &'a mut W, } -impl<'a> _DARW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x7f << 22)) | (((value as u32) & 0x7f) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _ODDFRMW<'a> { +#[doc = "Reader of field `ODDFRM`"] +pub type ODDFRM_R = crate::R; +#[doc = "Write proxy for field `ODDFRM`"] +pub struct ODDFRM_W<'a> { w: &'a mut W, } -impl<'a> _ODDFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ODDFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _CDISW<'a> { +#[doc = "Reader of field `CDIS`"] +pub type CDIS_R = crate::R; +#[doc = "Write proxy for field `CDIS`"] +pub struct CDIS_W<'a> { w: &'a mut W, } -impl<'a> _CDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _CENW<'a> { +#[doc = "Reader of field `CEN`"] +pub type CEN_R = crate::R; +#[doc = "Write proxy for field `CEN`"] +pub struct CEN_W<'a> { w: &'a mut W, } -impl<'a> _CENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:10 - Maximum packet size"] - #[inline] - pub fn mpl(&self) -> MPLR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - MPLR { bits } + #[inline(always)] + pub fn mpl(&self) -> MPL_R { + MPL_R::new((self.bits & 0x07ff) as u16) } #[doc = "Bits 11:14 - Endpoint number"] - #[inline] - pub fn epnum(&self) -> EPNUMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPNUMR { bits } + #[inline(always)] + pub fn epnum(&self) -> EPNUM_R { + EPNUM_R::new(((self.bits >> 11) & 0x0f) as u8) } #[doc = "Bit 15 - Endpoint direction"] - #[inline] - pub fn epdir(&self) -> EPDIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDIRR { bits } + #[inline(always)] + pub fn epdir(&self) -> EPDIR_R { + EPDIR_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 17 - Low-speed device"] - #[inline] - pub fn lsd(&self) -> LSDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LSDR { bits } + #[inline(always)] + pub fn lsd(&self) -> LSD_R { + LSD_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&self) -> EPTYPER { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPTYPER { bits } + #[inline(always)] + pub fn eptype(&self) -> EPTYPE_R { + EPTYPE_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bits 22:28 - Device address"] - #[inline] - pub fn dar(&self) -> DARR { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DARR { bits } + #[inline(always)] + pub fn dar(&self) -> DAR_R { + DAR_R::new(((self.bits >> 22) & 0x7f) as u8) } #[doc = "Bit 29 - Odd frame"] - #[inline] - pub fn oddfrm(&self) -> ODDFRMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ODDFRMR { bits } + #[inline(always)] + pub fn oddfrm(&self) -> ODDFRM_R { + ODDFRM_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Channel disable"] - #[inline] - pub fn cdis(&self) -> CDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CDISR { bits } + #[inline(always)] + pub fn cdis(&self) -> CDIS_R { + CDIS_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Channel enable"] - #[inline] - pub fn cen(&self) -> CENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CENR { bits } + #[inline(always)] + pub fn cen(&self) -> CEN_R { + CEN_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:10 - Maximum packet size"] - #[inline] - pub fn mpl(&mut self) -> _MPLW { - _MPLW { w: self } + #[inline(always)] + pub fn mpl(&mut self) -> MPL_W { + MPL_W { w: self } } #[doc = "Bits 11:14 - Endpoint number"] - #[inline] - pub fn epnum(&mut self) -> _EPNUMW { - _EPNUMW { w: self } + #[inline(always)] + pub fn epnum(&mut self) -> EPNUM_W { + EPNUM_W { w: self } } #[doc = "Bit 15 - Endpoint direction"] - #[inline] - pub fn epdir(&mut self) -> _EPDIRW { - _EPDIRW { w: self } + #[inline(always)] + pub fn epdir(&mut self) -> EPDIR_W { + EPDIR_W { w: self } } #[doc = "Bit 17 - Low-speed device"] - #[inline] - pub fn lsd(&mut self) -> _LSDW { - _LSDW { w: self } + #[inline(always)] + pub fn lsd(&mut self) -> LSD_W { + LSD_W { w: self } } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&mut self) -> _EPTYPEW { - _EPTYPEW { w: self } + #[inline(always)] + pub fn eptype(&mut self) -> EPTYPE_W { + EPTYPE_W { w: self } } #[doc = "Bits 22:28 - Device address"] - #[inline] - pub fn dar(&mut self) -> _DARW { - _DARW { w: self } + #[inline(always)] + pub fn dar(&mut self) -> DAR_W { + DAR_W { w: self } } #[doc = "Bit 29 - Odd frame"] - #[inline] - pub fn oddfrm(&mut self) -> _ODDFRMW { - _ODDFRMW { w: self } + #[inline(always)] + pub fn oddfrm(&mut self) -> ODDFRM_W { + ODDFRM_W { w: self } } #[doc = "Bit 30 - Channel disable"] - #[inline] - pub fn cdis(&mut self) -> _CDISW { - _CDISW { w: self } + #[inline(always)] + pub fn cdis(&mut self) -> CDIS_W { + CDIS_W { w: self } } #[doc = "Bit 31 - Channel enable"] - #[inline] - pub fn cen(&mut self) -> _CENW { - _CENW { w: self } + #[inline(always)] + pub fn cen(&mut self) -> CEN_W { + CEN_W { w: self } } } diff --git a/src/usbfs_host/hch6inten.rs b/src/usbfs_host/hch6inten.rs index e53be5e837d074b3283c1bab27a9ee937a886d15..551340ea44e21eda09e7203c235d1d0a56c40b3b 100644 --- a/src/usbfs_host/hch6inten.rs +++ b/src/usbfs_host/hch6inten.rs @@ -1,595 +1,322 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH6INTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFIER { - bits: bool, -} -impl TFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CHIER { - bits: bool, -} -impl CHIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLIER { - bits: bool, -} -impl STALLIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKIER { - bits: bool, -} -impl NAKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKIER { - bits: bool, -} -impl ACKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBERIER { - bits: bool, -} -impl USBERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BBERIER { - bits: bool, -} -impl BBERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct REQOVRIER { - bits: bool, -} -impl REQOVRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTERIER { - bits: bool, -} -impl DTERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFIEW<'a> { +#[doc = "Reader of register HCH6INTEN"] +pub type R = crate::R; +#[doc = "Writer for register HCH6INTEN"] +pub type W = crate::W; +#[doc = "Register HCH6INTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH6INTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TFIE`"] +pub type TFIE_R = crate::R; +#[doc = "Write proxy for field `TFIE`"] +pub struct TFIE_W<'a> { w: &'a mut W, } -impl<'a> _TFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _CHIEW<'a> { +#[doc = "Reader of field `CHIE`"] +pub type CHIE_R = crate::R; +#[doc = "Write proxy for field `CHIE`"] +pub struct CHIE_W<'a> { w: &'a mut W, } -impl<'a> _CHIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STALLIEW<'a> { +#[doc = "Reader of field `STALLIE`"] +pub type STALLIE_R = crate::R; +#[doc = "Write proxy for field `STALLIE`"] +pub struct STALLIE_W<'a> { w: &'a mut W, } -impl<'a> _STALLIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALLIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NAKIEW<'a> { +#[doc = "Reader of field `NAKIE`"] +pub type NAKIE_R = crate::R; +#[doc = "Write proxy for field `NAKIE`"] +pub struct NAKIE_W<'a> { w: &'a mut W, } -impl<'a> _NAKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NAKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ACKIEW<'a> { +#[doc = "Reader of field `ACKIE`"] +pub type ACKIE_R = crate::R; +#[doc = "Write proxy for field `ACKIE`"] +pub struct ACKIE_W<'a> { w: &'a mut W, } -impl<'a> _ACKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _USBERIEW<'a> { +#[doc = "Reader of field `USBERIE`"] +pub type USBERIE_R = crate::R; +#[doc = "Write proxy for field `USBERIE`"] +pub struct USBERIE_W<'a> { w: &'a mut W, } -impl<'a> _USBERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BBERIEW<'a> { +#[doc = "Reader of field `BBERIE`"] +pub type BBERIE_R = crate::R; +#[doc = "Write proxy for field `BBERIE`"] +pub struct BBERIE_W<'a> { w: &'a mut W, } -impl<'a> _BBERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BBERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _REQOVRIEW<'a> { +#[doc = "Reader of field `REQOVRIE`"] +pub type REQOVRIE_R = crate::R; +#[doc = "Write proxy for field `REQOVRIE`"] +pub struct REQOVRIE_W<'a> { w: &'a mut W, } -impl<'a> _REQOVRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REQOVRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _DTERIEW<'a> { +#[doc = "Reader of field `DTERIE`"] +pub type DTERIE_R = crate::R; +#[doc = "Write proxy for field `DTERIE`"] +pub struct DTERIE_W<'a> { w: &'a mut W, } -impl<'a> _DTERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer completed interrupt enable"] - #[inline] - pub fn tfie(&self) -> TFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFIER { bits } + #[inline(always)] + pub fn tfie(&self) -> TFIE_R { + TFIE_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Channel halted interrupt enable"] - #[inline] - pub fn chie(&self) -> CHIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHIER { bits } + #[inline(always)] + pub fn chie(&self) -> CHIE_R { + CHIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - STALL interrupt enable"] - #[inline] - pub fn stallie(&self) -> STALLIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLIER { bits } + #[inline(always)] + pub fn stallie(&self) -> STALLIE_R { + STALLIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - NAK interrupt enable"] - #[inline] - pub fn nakie(&self) -> NAKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKIER { bits } + #[inline(always)] + pub fn nakie(&self) -> NAKIE_R { + NAKIE_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - ACK interrupt enable"] - #[inline] - pub fn ackie(&self) -> ACKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ACKIER { bits } + #[inline(always)] + pub fn ackie(&self) -> ACKIE_R { + ACKIE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 7 - USB bus error interrupt enable"] - #[inline] - pub fn usberie(&self) -> USBERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBERIER { bits } + #[inline(always)] + pub fn usberie(&self) -> USBERIE_R { + USBERIE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Babble error interrupt enable"] - #[inline] - pub fn bberie(&self) -> BBERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BBERIER { bits } + #[inline(always)] + pub fn bberie(&self) -> BBERIE_R { + BBERIE_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - request queue overrun interrupt enable"] - #[inline] - pub fn reqovrie(&self) -> REQOVRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - REQOVRIER { bits } + #[inline(always)] + pub fn reqovrie(&self) -> REQOVRIE_R { + REQOVRIE_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Data toggle error interrupt enable"] - #[inline] - pub fn dterie(&self) -> DTERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTERIER { bits } + #[inline(always)] + pub fn dterie(&self) -> DTERIE_R { + DTERIE_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer completed interrupt enable"] - #[inline] - pub fn tfie(&mut self) -> _TFIEW { - _TFIEW { w: self } + #[inline(always)] + pub fn tfie(&mut self) -> TFIE_W { + TFIE_W { w: self } } #[doc = "Bit 1 - Channel halted interrupt enable"] - #[inline] - pub fn chie(&mut self) -> _CHIEW { - _CHIEW { w: self } + #[inline(always)] + pub fn chie(&mut self) -> CHIE_W { + CHIE_W { w: self } } #[doc = "Bit 3 - STALL interrupt enable"] - #[inline] - pub fn stallie(&mut self) -> _STALLIEW { - _STALLIEW { w: self } + #[inline(always)] + pub fn stallie(&mut self) -> STALLIE_W { + STALLIE_W { w: self } } #[doc = "Bit 4 - NAK interrupt enable"] - #[inline] - pub fn nakie(&mut self) -> _NAKIEW { - _NAKIEW { w: self } + #[inline(always)] + pub fn nakie(&mut self) -> NAKIE_W { + NAKIE_W { w: self } } #[doc = "Bit 5 - ACK interrupt enable"] - #[inline] - pub fn ackie(&mut self) -> _ACKIEW { - _ACKIEW { w: self } + #[inline(always)] + pub fn ackie(&mut self) -> ACKIE_W { + ACKIE_W { w: self } } #[doc = "Bit 7 - USB bus error interrupt enable"] - #[inline] - pub fn usberie(&mut self) -> _USBERIEW { - _USBERIEW { w: self } + #[inline(always)] + pub fn usberie(&mut self) -> USBERIE_W { + USBERIE_W { w: self } } #[doc = "Bit 8 - Babble error interrupt enable"] - #[inline] - pub fn bberie(&mut self) -> _BBERIEW { - _BBERIEW { w: self } + #[inline(always)] + pub fn bberie(&mut self) -> BBERIE_W { + BBERIE_W { w: self } } #[doc = "Bit 9 - request queue overrun interrupt enable"] - #[inline] - pub fn reqovrie(&mut self) -> _REQOVRIEW { - _REQOVRIEW { w: self } + #[inline(always)] + pub fn reqovrie(&mut self) -> REQOVRIE_W { + REQOVRIE_W { w: self } } #[doc = "Bit 10 - Data toggle error interrupt enable"] - #[inline] - pub fn dterie(&mut self) -> _DTERIEW { - _DTERIEW { w: self } + #[inline(always)] + pub fn dterie(&mut self) -> DTERIE_W { + DTERIE_W { w: self } } } diff --git a/src/usbfs_host/hch6intf.rs b/src/usbfs_host/hch6intf.rs index 89168f4d424e6b557cca649fae9302c7da09b81c..b7647d02453df0b1ff747c7f93316698c818d5e7 100644 --- a/src/usbfs_host/hch6intf.rs +++ b/src/usbfs_host/hch6intf.rs @@ -1,595 +1,322 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH6INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFR { - bits: bool, -} -impl TFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CHR { - bits: bool, -} -impl CHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLR { - bits: bool, -} -impl STALLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKR { - bits: bool, -} -impl NAKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKR { - bits: bool, -} -impl ACKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBERR { - bits: bool, -} -impl USBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BBERR { - bits: bool, -} -impl BBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct REQOVRR { - bits: bool, -} -impl REQOVRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTERR { - bits: bool, -} -impl DTERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFW<'a> { +#[doc = "Reader of register HCH6INTF"] +pub type R = crate::R; +#[doc = "Writer for register HCH6INTF"] +pub type W = crate::W; +#[doc = "Register HCH6INTF `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH6INTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TF`"] +pub type TF_R = crate::R; +#[doc = "Write proxy for field `TF`"] +pub struct TF_W<'a> { w: &'a mut W, } -impl<'a> _TFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _CHW<'a> { +#[doc = "Reader of field `CH`"] +pub type CH_R = crate::R; +#[doc = "Write proxy for field `CH`"] +pub struct CH_W<'a> { w: &'a mut W, } -impl<'a> _CHW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STALLW<'a> { +#[doc = "Reader of field `STALL`"] +pub type STALL_R = crate::R; +#[doc = "Write proxy for field `STALL`"] +pub struct STALL_W<'a> { w: &'a mut W, } -impl<'a> _STALLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NAKW<'a> { +#[doc = "Reader of field `NAK`"] +pub type NAK_R = crate::R; +#[doc = "Write proxy for field `NAK`"] +pub struct NAK_W<'a> { w: &'a mut W, } -impl<'a> _NAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ACKW<'a> { +#[doc = "Reader of field `ACK`"] +pub type ACK_R = crate::R; +#[doc = "Write proxy for field `ACK`"] +pub struct ACK_W<'a> { w: &'a mut W, } -impl<'a> _ACKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _USBERW<'a> { +#[doc = "Reader of field `USBER`"] +pub type USBER_R = crate::R; +#[doc = "Write proxy for field `USBER`"] +pub struct USBER_W<'a> { w: &'a mut W, } -impl<'a> _USBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BBERW<'a> { +#[doc = "Reader of field `BBER`"] +pub type BBER_R = crate::R; +#[doc = "Write proxy for field `BBER`"] +pub struct BBER_W<'a> { w: &'a mut W, } -impl<'a> _BBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _REQOVRW<'a> { +#[doc = "Reader of field `REQOVR`"] +pub type REQOVR_R = crate::R; +#[doc = "Write proxy for field `REQOVR`"] +pub struct REQOVR_W<'a> { w: &'a mut W, } -impl<'a> _REQOVRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REQOVR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _DTERW<'a> { +#[doc = "Reader of field `DTER`"] +pub type DTER_R = crate::R; +#[doc = "Write proxy for field `DTER`"] +pub struct DTER_W<'a> { w: &'a mut W, } -impl<'a> _DTERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&self) -> TFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFR { bits } + #[inline(always)] + pub fn tf(&self) -> TF_R { + TF_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Channel halted"] - #[inline] - pub fn ch(&self) -> CHR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHR { bits } + #[inline(always)] + pub fn ch(&self) -> CH_R { + CH_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - STALL response received interrupt"] - #[inline] - pub fn stall(&self) -> STALLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLR { bits } + #[inline(always)] + pub fn stall(&self) -> STALL_R { + STALL_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - NAK response received interrupt"] - #[inline] - pub fn nak(&self) -> NAKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKR { bits } + #[inline(always)] + pub fn nak(&self) -> NAK_R { + NAK_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - ACK response received/transmitted interrupt"] - #[inline] - pub fn ack(&self) -> ACKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ACKR { bits } + #[inline(always)] + pub fn ack(&self) -> ACK_R { + ACK_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 7 - USB bus error"] - #[inline] - pub fn usber(&self) -> USBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBERR { bits } + #[inline(always)] + pub fn usber(&self) -> USBER_R { + USBER_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Babble error"] - #[inline] - pub fn bber(&self) -> BBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BBERR { bits } + #[inline(always)] + pub fn bber(&self) -> BBER_R { + BBER_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Request queue overrun"] - #[inline] - pub fn reqovr(&self) -> REQOVRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - REQOVRR { bits } + #[inline(always)] + pub fn reqovr(&self) -> REQOVR_R { + REQOVR_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Data toggle error"] - #[inline] - pub fn dter(&self) -> DTERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTERR { bits } + #[inline(always)] + pub fn dter(&self) -> DTER_R { + DTER_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&mut self) -> _TFW { - _TFW { w: self } + #[inline(always)] + pub fn tf(&mut self) -> TF_W { + TF_W { w: self } } #[doc = "Bit 1 - Channel halted"] - #[inline] - pub fn ch(&mut self) -> _CHW { - _CHW { w: self } + #[inline(always)] + pub fn ch(&mut self) -> CH_W { + CH_W { w: self } } #[doc = "Bit 3 - STALL response received interrupt"] - #[inline] - pub fn stall(&mut self) -> _STALLW { - _STALLW { w: self } + #[inline(always)] + pub fn stall(&mut self) -> STALL_W { + STALL_W { w: self } } #[doc = "Bit 4 - NAK response received interrupt"] - #[inline] - pub fn nak(&mut self) -> _NAKW { - _NAKW { w: self } + #[inline(always)] + pub fn nak(&mut self) -> NAK_W { + NAK_W { w: self } } #[doc = "Bit 5 - ACK response received/transmitted interrupt"] - #[inline] - pub fn ack(&mut self) -> _ACKW { - _ACKW { w: self } + #[inline(always)] + pub fn ack(&mut self) -> ACK_W { + ACK_W { w: self } } #[doc = "Bit 7 - USB bus error"] - #[inline] - pub fn usber(&mut self) -> _USBERW { - _USBERW { w: self } + #[inline(always)] + pub fn usber(&mut self) -> USBER_W { + USBER_W { w: self } } #[doc = "Bit 8 - Babble error"] - #[inline] - pub fn bber(&mut self) -> _BBERW { - _BBERW { w: self } + #[inline(always)] + pub fn bber(&mut self) -> BBER_W { + BBER_W { w: self } } #[doc = "Bit 9 - Request queue overrun"] - #[inline] - pub fn reqovr(&mut self) -> _REQOVRW { - _REQOVRW { w: self } + #[inline(always)] + pub fn reqovr(&mut self) -> REQOVR_W { + REQOVR_W { w: self } } #[doc = "Bit 10 - Data toggle error"] - #[inline] - pub fn dter(&mut self) -> _DTERW { - _DTERW { w: self } + #[inline(always)] + pub fn dter(&mut self) -> DTER_W { + DTER_W { w: self } } } diff --git a/src/usbfs_host/hch6len.rs b/src/usbfs_host/hch6len.rs index 7fba0047277670cd03cfb506c1ff6de27d619cdd..f164fa68262cc514e0198119de149293b171a605 100644 --- a/src/usbfs_host/hch6len.rs +++ b/src/usbfs_host/hch6len.rs @@ -1,187 +1,88 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH6LEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TLENR { - bits: u32, -} -impl TLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PCNTR { - bits: u16, -} -impl PCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DPIDR { - bits: u8, -} -impl DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _TLENW<'a> { +#[doc = "Reader of register HCH6LEN"] +pub type R = crate::R; +#[doc = "Writer for register HCH6LEN"] +pub type W = crate::W; +#[doc = "Register HCH6LEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH6LEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TLEN`"] +pub type TLEN_R = crate::R; +#[doc = "Write proxy for field `TLEN`"] +pub struct TLEN_W<'a> { w: &'a mut W, } -impl<'a> _TLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0007_ffff) | ((value as u32) & 0x0007_ffff); self.w } } -#[doc = r" Proxy"] -pub struct _PCNTW<'a> { +#[doc = "Reader of field `PCNT`"] +pub type PCNT_R = crate::R; +#[doc = "Write proxy for field `PCNT`"] +pub struct PCNT_W<'a> { w: &'a mut W, } -impl<'a> _PCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03ff << 19)) | (((value as u32) & 0x03ff) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _DPIDW<'a> { +#[doc = "Reader of field `DPID`"] +pub type DPID_R = crate::R; +#[doc = "Write proxy for field `DPID`"] +pub struct DPID_W<'a> { w: &'a mut W, } -impl<'a> _DPIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DPID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 29)) | (((value as u32) & 0x03) << 29); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&self) -> TLENR { - let bits = { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - TLENR { bits } + #[inline(always)] + pub fn tlen(&self) -> TLEN_R { + TLEN_R::new((self.bits & 0x0007_ffff) as u32) } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&self) -> PCNTR { - let bits = { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - PCNTR { bits } + #[inline(always)] + pub fn pcnt(&self) -> PCNT_R { + PCNT_R::new(((self.bits >> 19) & 0x03ff) as u16) } #[doc = "Bits 29:30 - Data PID"] - #[inline] - pub fn dpid(&self) -> DPIDR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DPIDR { bits } + #[inline(always)] + pub fn dpid(&self) -> DPID_R { + DPID_R::new(((self.bits >> 29) & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&mut self) -> _TLENW { - _TLENW { w: self } + #[inline(always)] + pub fn tlen(&mut self) -> TLEN_W { + TLEN_W { w: self } } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&mut self) -> _PCNTW { - _PCNTW { w: self } + #[inline(always)] + pub fn pcnt(&mut self) -> PCNT_W { + PCNT_W { w: self } } #[doc = "Bits 29:30 - Data PID"] - #[inline] - pub fn dpid(&mut self) -> _DPIDW { - _DPIDW { w: self } + #[inline(always)] + pub fn dpid(&mut self) -> DPID_W { + DPID_W { w: self } } } diff --git a/src/usbfs_host/hch7ctl.rs b/src/usbfs_host/hch7ctl.rs index 8beae8a5ad5c0e250e6d896272f9cb71619bbaf7..00b46d8b0b5bbf1e8402d858134e6ff376fe87a6 100644 --- a/src/usbfs_host/hch7ctl.rs +++ b/src/usbfs_host/hch7ctl.rs @@ -1,523 +1,282 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH7CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct MPLR { - bits: u16, -} -impl MPLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPNUMR { - bits: u8, -} -impl EPNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct EPDIRR { - bits: bool, -} -impl EPDIRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct LSDR { - bits: bool, -} -impl LSDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct EPTYPER { - bits: u8, -} -impl EPTYPER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DARR { - bits: u8, -} -impl DARR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct ODDFRMR { - bits: bool, -} -impl ODDFRMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CDISR { - bits: bool, -} -impl CDISR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CENR { - bits: bool, -} -impl CENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _MPLW<'a> { +#[doc = "Reader of register HCH7CTL"] +pub type R = crate::R; +#[doc = "Writer for register HCH7CTL"] +pub type W = crate::W; +#[doc = "Register HCH7CTL `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH7CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `MPL`"] +pub type MPL_R = crate::R; +#[doc = "Write proxy for field `MPL`"] +pub struct MPL_W<'a> { w: &'a mut W, } -impl<'a> _MPLW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> MPL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x07ff) | ((value as u32) & 0x07ff); self.w } } -#[doc = r" Proxy"] -pub struct _EPNUMW<'a> { +#[doc = "Reader of field `EPNUM`"] +pub type EPNUM_R = crate::R; +#[doc = "Write proxy for field `EPNUM`"] +pub struct EPNUM_W<'a> { w: &'a mut W, } -impl<'a> _EPNUMW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPNUM_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 11; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x0f << 11)) | (((value as u32) & 0x0f) << 11); self.w } } -#[doc = r" Proxy"] -pub struct _EPDIRW<'a> { +#[doc = "Reader of field `EPDIR`"] +pub type EPDIR_R = crate::R; +#[doc = "Write proxy for field `EPDIR`"] +pub struct EPDIR_W<'a> { w: &'a mut W, } -impl<'a> _EPDIRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EPDIR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 15; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 15)) | (((value as u32) & 0x01) << 15); self.w } } -#[doc = r" Proxy"] -pub struct _LSDW<'a> { +#[doc = "Reader of field `LSD`"] +pub type LSD_R = crate::R; +#[doc = "Write proxy for field `LSD`"] +pub struct LSD_W<'a> { w: &'a mut W, } -impl<'a> _LSDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> LSD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 17; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 17)) | (((value as u32) & 0x01) << 17); self.w } } -#[doc = r" Proxy"] -pub struct _EPTYPEW<'a> { +#[doc = "Reader of field `EPTYPE`"] +pub type EPTYPE_R = crate::R; +#[doc = "Write proxy for field `EPTYPE`"] +pub struct EPTYPE_W<'a> { w: &'a mut W, } -impl<'a> _EPTYPEW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> EPTYPE_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 18)) | (((value as u32) & 0x03) << 18); self.w } } -#[doc = r" Proxy"] -pub struct _DARW<'a> { +#[doc = "Reader of field `DAR`"] +pub type DAR_R = crate::R; +#[doc = "Write proxy for field `DAR`"] +pub struct DAR_W<'a> { w: &'a mut W, } -impl<'a> _DARW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DAR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 22; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x7f << 22)) | (((value as u32) & 0x7f) << 22); self.w } } -#[doc = r" Proxy"] -pub struct _ODDFRMW<'a> { +#[doc = "Reader of field `ODDFRM`"] +pub type ODDFRM_R = crate::R; +#[doc = "Write proxy for field `ODDFRM`"] +pub struct ODDFRM_W<'a> { w: &'a mut W, } -impl<'a> _ODDFRMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ODDFRM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 29)) | (((value as u32) & 0x01) << 29); self.w } } -#[doc = r" Proxy"] -pub struct _CDISW<'a> { +#[doc = "Reader of field `CDIS`"] +pub type CDIS_R = crate::R; +#[doc = "Write proxy for field `CDIS`"] +pub struct CDIS_W<'a> { w: &'a mut W, } -impl<'a> _CDISW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CDIS_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 30; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 30)) | (((value as u32) & 0x01) << 30); self.w } } -#[doc = r" Proxy"] -pub struct _CENW<'a> { +#[doc = "Reader of field `CEN`"] +pub type CEN_R = crate::R; +#[doc = "Write proxy for field `CEN`"] +pub struct CEN_W<'a> { w: &'a mut W, } -impl<'a> _CENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 31; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 31)) | (((value as u32) & 0x01) << 31); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:10 - Maximum packet size"] - #[inline] - pub fn mpl(&self) -> MPLR { - let bits = { - const MASK: u16 = 0x07ff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - MPLR { bits } + #[inline(always)] + pub fn mpl(&self) -> MPL_R { + MPL_R::new((self.bits & 0x07ff) as u16) } #[doc = "Bits 11:14 - Endpoint number"] - #[inline] - pub fn epnum(&self) -> EPNUMR { - let bits = { - const MASK: u8 = 0x0f; - const OFFSET: u8 = 11; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPNUMR { bits } + #[inline(always)] + pub fn epnum(&self) -> EPNUM_R { + EPNUM_R::new(((self.bits >> 11) & 0x0f) as u8) } #[doc = "Bit 15 - Endpoint direction"] - #[inline] - pub fn epdir(&self) -> EPDIRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 15; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EPDIRR { bits } + #[inline(always)] + pub fn epdir(&self) -> EPDIR_R { + EPDIR_R::new(((self.bits >> 15) & 0x01) != 0) } #[doc = "Bit 17 - Low-speed device"] - #[inline] - pub fn lsd(&self) -> LSDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - LSDR { bits } + #[inline(always)] + pub fn lsd(&self) -> LSD_R { + LSD_R::new(((self.bits >> 17) & 0x01) != 0) } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&self) -> EPTYPER { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 18; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - EPTYPER { bits } + #[inline(always)] + pub fn eptype(&self) -> EPTYPE_R { + EPTYPE_R::new(((self.bits >> 18) & 0x03) as u8) } #[doc = "Bits 22:28 - Device address"] - #[inline] - pub fn dar(&self) -> DARR { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 22; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DARR { bits } + #[inline(always)] + pub fn dar(&self) -> DAR_R { + DAR_R::new(((self.bits >> 22) & 0x7f) as u8) } #[doc = "Bit 29 - Odd frame"] - #[inline] - pub fn oddfrm(&self) -> ODDFRMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ODDFRMR { bits } + #[inline(always)] + pub fn oddfrm(&self) -> ODDFRM_R { + ODDFRM_R::new(((self.bits >> 29) & 0x01) != 0) } #[doc = "Bit 30 - Channel disable"] - #[inline] - pub fn cdis(&self) -> CDISR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 30; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CDISR { bits } + #[inline(always)] + pub fn cdis(&self) -> CDIS_R { + CDIS_R::new(((self.bits >> 30) & 0x01) != 0) } #[doc = "Bit 31 - Channel enable"] - #[inline] - pub fn cen(&self) -> CENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 31; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CENR { bits } + #[inline(always)] + pub fn cen(&self) -> CEN_R { + CEN_R::new(((self.bits >> 31) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:10 - Maximum packet size"] - #[inline] - pub fn mpl(&mut self) -> _MPLW { - _MPLW { w: self } + #[inline(always)] + pub fn mpl(&mut self) -> MPL_W { + MPL_W { w: self } } #[doc = "Bits 11:14 - Endpoint number"] - #[inline] - pub fn epnum(&mut self) -> _EPNUMW { - _EPNUMW { w: self } + #[inline(always)] + pub fn epnum(&mut self) -> EPNUM_W { + EPNUM_W { w: self } } #[doc = "Bit 15 - Endpoint direction"] - #[inline] - pub fn epdir(&mut self) -> _EPDIRW { - _EPDIRW { w: self } + #[inline(always)] + pub fn epdir(&mut self) -> EPDIR_W { + EPDIR_W { w: self } } #[doc = "Bit 17 - Low-speed device"] - #[inline] - pub fn lsd(&mut self) -> _LSDW { - _LSDW { w: self } + #[inline(always)] + pub fn lsd(&mut self) -> LSD_W { + LSD_W { w: self } } #[doc = "Bits 18:19 - Endpoint type"] - #[inline] - pub fn eptype(&mut self) -> _EPTYPEW { - _EPTYPEW { w: self } + #[inline(always)] + pub fn eptype(&mut self) -> EPTYPE_W { + EPTYPE_W { w: self } } #[doc = "Bits 22:28 - Device address"] - #[inline] - pub fn dar(&mut self) -> _DARW { - _DARW { w: self } + #[inline(always)] + pub fn dar(&mut self) -> DAR_W { + DAR_W { w: self } } #[doc = "Bit 29 - Odd frame"] - #[inline] - pub fn oddfrm(&mut self) -> _ODDFRMW { - _ODDFRMW { w: self } + #[inline(always)] + pub fn oddfrm(&mut self) -> ODDFRM_W { + ODDFRM_W { w: self } } #[doc = "Bit 30 - Channel disable"] - #[inline] - pub fn cdis(&mut self) -> _CDISW { - _CDISW { w: self } + #[inline(always)] + pub fn cdis(&mut self) -> CDIS_W { + CDIS_W { w: self } } #[doc = "Bit 31 - Channel enable"] - #[inline] - pub fn cen(&mut self) -> _CENW { - _CENW { w: self } + #[inline(always)] + pub fn cen(&mut self) -> CEN_W { + CEN_W { w: self } } } diff --git a/src/usbfs_host/hch7inten.rs b/src/usbfs_host/hch7inten.rs index a1d7f76bb5d93fc19e01610ba86a511c8f175482..00d94d2a8b94246d0cbb0870fe04ae137c7caa38 100644 --- a/src/usbfs_host/hch7inten.rs +++ b/src/usbfs_host/hch7inten.rs @@ -1,595 +1,322 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH7INTEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFIER { - bits: bool, -} -impl TFIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CHIER { - bits: bool, -} -impl CHIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLIER { - bits: bool, -} -impl STALLIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKIER { - bits: bool, -} -impl NAKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKIER { - bits: bool, -} -impl ACKIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBERIER { - bits: bool, -} -impl USBERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BBERIER { - bits: bool, -} -impl BBERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct REQOVRIER { - bits: bool, -} -impl REQOVRIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTERIER { - bits: bool, -} -impl DTERIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFIEW<'a> { +#[doc = "Reader of register HCH7INTEN"] +pub type R = crate::R; +#[doc = "Writer for register HCH7INTEN"] +pub type W = crate::W; +#[doc = "Register HCH7INTEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH7INTEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TFIE`"] +pub type TFIE_R = crate::R; +#[doc = "Write proxy for field `TFIE`"] +pub struct TFIE_W<'a> { w: &'a mut W, } -impl<'a> _TFIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TFIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _CHIEW<'a> { +#[doc = "Reader of field `CHIE`"] +pub type CHIE_R = crate::R; +#[doc = "Write proxy for field `CHIE`"] +pub struct CHIE_W<'a> { w: &'a mut W, } -impl<'a> _CHIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CHIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STALLIEW<'a> { +#[doc = "Reader of field `STALLIE`"] +pub type STALLIE_R = crate::R; +#[doc = "Write proxy for field `STALLIE`"] +pub struct STALLIE_W<'a> { w: &'a mut W, } -impl<'a> _STALLIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALLIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NAKIEW<'a> { +#[doc = "Reader of field `NAKIE`"] +pub type NAKIE_R = crate::R; +#[doc = "Write proxy for field `NAKIE`"] +pub struct NAKIE_W<'a> { w: &'a mut W, } -impl<'a> _NAKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NAKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ACKIEW<'a> { +#[doc = "Reader of field `ACKIE`"] +pub type ACKIE_R = crate::R; +#[doc = "Write proxy for field `ACKIE`"] +pub struct ACKIE_W<'a> { w: &'a mut W, } -impl<'a> _ACKIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACKIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _USBERIEW<'a> { +#[doc = "Reader of field `USBERIE`"] +pub type USBERIE_R = crate::R; +#[doc = "Write proxy for field `USBERIE`"] +pub struct USBERIE_W<'a> { w: &'a mut W, } -impl<'a> _USBERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BBERIEW<'a> { +#[doc = "Reader of field `BBERIE`"] +pub type BBERIE_R = crate::R; +#[doc = "Write proxy for field `BBERIE`"] +pub struct BBERIE_W<'a> { w: &'a mut W, } -impl<'a> _BBERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BBERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _REQOVRIEW<'a> { +#[doc = "Reader of field `REQOVRIE`"] +pub type REQOVRIE_R = crate::R; +#[doc = "Write proxy for field `REQOVRIE`"] +pub struct REQOVRIE_W<'a> { w: &'a mut W, } -impl<'a> _REQOVRIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REQOVRIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _DTERIEW<'a> { +#[doc = "Reader of field `DTERIE`"] +pub type DTERIE_R = crate::R; +#[doc = "Write proxy for field `DTERIE`"] +pub struct DTERIE_W<'a> { w: &'a mut W, } -impl<'a> _DTERIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTERIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer completed interrupt enable"] - #[inline] - pub fn tfie(&self) -> TFIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFIER { bits } + #[inline(always)] + pub fn tfie(&self) -> TFIE_R { + TFIE_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Channel halted interrupt enable"] - #[inline] - pub fn chie(&self) -> CHIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHIER { bits } + #[inline(always)] + pub fn chie(&self) -> CHIE_R { + CHIE_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - STALL interrupt enable"] - #[inline] - pub fn stallie(&self) -> STALLIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLIER { bits } + #[inline(always)] + pub fn stallie(&self) -> STALLIE_R { + STALLIE_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - NAK interrupt enable"] - #[inline] - pub fn nakie(&self) -> NAKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKIER { bits } + #[inline(always)] + pub fn nakie(&self) -> NAKIE_R { + NAKIE_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - ACK interrupt enable"] - #[inline] - pub fn ackie(&self) -> ACKIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ACKIER { bits } + #[inline(always)] + pub fn ackie(&self) -> ACKIE_R { + ACKIE_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 7 - USB bus error interrupt enable"] - #[inline] - pub fn usberie(&self) -> USBERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBERIER { bits } + #[inline(always)] + pub fn usberie(&self) -> USBERIE_R { + USBERIE_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Babble error interrupt enable"] - #[inline] - pub fn bberie(&self) -> BBERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BBERIER { bits } + #[inline(always)] + pub fn bberie(&self) -> BBERIE_R { + BBERIE_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - request queue overrun interrupt enable"] - #[inline] - pub fn reqovrie(&self) -> REQOVRIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - REQOVRIER { bits } + #[inline(always)] + pub fn reqovrie(&self) -> REQOVRIE_R { + REQOVRIE_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Data toggle error interrupt enable"] - #[inline] - pub fn dterie(&self) -> DTERIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTERIER { bits } + #[inline(always)] + pub fn dterie(&self) -> DTERIE_R { + DTERIE_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer completed interrupt enable"] - #[inline] - pub fn tfie(&mut self) -> _TFIEW { - _TFIEW { w: self } + #[inline(always)] + pub fn tfie(&mut self) -> TFIE_W { + TFIE_W { w: self } } #[doc = "Bit 1 - Channel halted interrupt enable"] - #[inline] - pub fn chie(&mut self) -> _CHIEW { - _CHIEW { w: self } + #[inline(always)] + pub fn chie(&mut self) -> CHIE_W { + CHIE_W { w: self } } #[doc = "Bit 3 - STALL interrupt enable"] - #[inline] - pub fn stallie(&mut self) -> _STALLIEW { - _STALLIEW { w: self } + #[inline(always)] + pub fn stallie(&mut self) -> STALLIE_W { + STALLIE_W { w: self } } #[doc = "Bit 4 - NAK interrupt enable"] - #[inline] - pub fn nakie(&mut self) -> _NAKIEW { - _NAKIEW { w: self } + #[inline(always)] + pub fn nakie(&mut self) -> NAKIE_W { + NAKIE_W { w: self } } #[doc = "Bit 5 - ACK interrupt enable"] - #[inline] - pub fn ackie(&mut self) -> _ACKIEW { - _ACKIEW { w: self } + #[inline(always)] + pub fn ackie(&mut self) -> ACKIE_W { + ACKIE_W { w: self } } #[doc = "Bit 7 - USB bus error interrupt enable"] - #[inline] - pub fn usberie(&mut self) -> _USBERIEW { - _USBERIEW { w: self } + #[inline(always)] + pub fn usberie(&mut self) -> USBERIE_W { + USBERIE_W { w: self } } #[doc = "Bit 8 - Babble error interrupt enable"] - #[inline] - pub fn bberie(&mut self) -> _BBERIEW { - _BBERIEW { w: self } + #[inline(always)] + pub fn bberie(&mut self) -> BBERIE_W { + BBERIE_W { w: self } } #[doc = "Bit 9 - request queue overrun interrupt enable"] - #[inline] - pub fn reqovrie(&mut self) -> _REQOVRIEW { - _REQOVRIEW { w: self } + #[inline(always)] + pub fn reqovrie(&mut self) -> REQOVRIE_W { + REQOVRIE_W { w: self } } #[doc = "Bit 10 - Data toggle error interrupt enable"] - #[inline] - pub fn dterie(&mut self) -> _DTERIEW { - _DTERIEW { w: self } + #[inline(always)] + pub fn dterie(&mut self) -> DTERIE_W { + DTERIE_W { w: self } } } diff --git a/src/usbfs_host/hch7intf.rs b/src/usbfs_host/hch7intf.rs index 002f8ed63df0efcdd60a892136a2153475a0ab83..58a3a96da9d7228b308356c55f350abb7551f82d 100644 --- a/src/usbfs_host/hch7intf.rs +++ b/src/usbfs_host/hch7intf.rs @@ -1,595 +1,322 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH7INTF { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TFR { - bits: bool, -} -impl TFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CHR { - bits: bool, -} -impl CHR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct STALLR { - bits: bool, -} -impl STALLR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct NAKR { - bits: bool, -} -impl NAKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct ACKR { - bits: bool, -} -impl ACKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct USBERR { - bits: bool, -} -impl USBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct BBERR { - bits: bool, -} -impl BBERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct REQOVRR { - bits: bool, -} -impl REQOVRR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct DTERR { - bits: bool, -} -impl DTERR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _TFW<'a> { +#[doc = "Reader of register HCH7INTF"] +pub type R = crate::R; +#[doc = "Writer for register HCH7INTF"] +pub type W = crate::W; +#[doc = "Register HCH7INTF `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH7INTF { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TF`"] +pub type TF_R = crate::R; +#[doc = "Write proxy for field `TF`"] +pub struct TF_W<'a> { w: &'a mut W, } -impl<'a> _TFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> TF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _CHW<'a> { +#[doc = "Reader of field `CH`"] +pub type CH_R = crate::R; +#[doc = "Write proxy for field `CH`"] +pub struct CH_W<'a> { w: &'a mut W, } -impl<'a> _CHW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> CH_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _STALLW<'a> { +#[doc = "Reader of field `STALL`"] +pub type STALL_R = crate::R; +#[doc = "Write proxy for field `STALL`"] +pub struct STALL_W<'a> { w: &'a mut W, } -impl<'a> _STALLW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> STALL_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _NAKW<'a> { +#[doc = "Reader of field `NAK`"] +pub type NAK_R = crate::R; +#[doc = "Write proxy for field `NAK`"] +pub struct NAK_W<'a> { w: &'a mut W, } -impl<'a> _NAKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> NAK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 4; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 4)) | (((value as u32) & 0x01) << 4); self.w } } -#[doc = r" Proxy"] -pub struct _ACKW<'a> { +#[doc = "Reader of field `ACK`"] +pub type ACK_R = crate::R; +#[doc = "Write proxy for field `ACK`"] +pub struct ACK_W<'a> { w: &'a mut W, } -impl<'a> _ACKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> ACK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 5; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 5)) | (((value as u32) & 0x01) << 5); self.w } } -#[doc = r" Proxy"] -pub struct _USBERW<'a> { +#[doc = "Reader of field `USBER`"] +pub type USBER_R = crate::R; +#[doc = "Write proxy for field `USBER`"] +pub struct USBER_W<'a> { w: &'a mut W, } -impl<'a> _USBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> USBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _BBERW<'a> { +#[doc = "Reader of field `BBER`"] +pub type BBER_R = crate::R; +#[doc = "Write proxy for field `BBER`"] +pub struct BBER_W<'a> { w: &'a mut W, } -impl<'a> _BBERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> BBER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _REQOVRW<'a> { +#[doc = "Reader of field `REQOVR`"] +pub type REQOVR_R = crate::R; +#[doc = "Write proxy for field `REQOVR`"] +pub struct REQOVR_W<'a> { w: &'a mut W, } -impl<'a> _REQOVRW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> REQOVR_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _DTERW<'a> { +#[doc = "Reader of field `DTER`"] +pub type DTER_R = crate::R; +#[doc = "Write proxy for field `DTER`"] +pub struct DTER_W<'a> { w: &'a mut W, } -impl<'a> _DTERW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> DTER_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 10; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 10)) | (((value as u32) & 0x01) << 10); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&self) -> TFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - TFR { bits } + #[inline(always)] + pub fn tf(&self) -> TF_R { + TF_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Channel halted"] - #[inline] - pub fn ch(&self) -> CHR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - CHR { bits } + #[inline(always)] + pub fn ch(&self) -> CH_R { + CH_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 3 - STALL response received interrupt"] - #[inline] - pub fn stall(&self) -> STALLR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - STALLR { bits } + #[inline(always)] + pub fn stall(&self) -> STALL_R { + STALL_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 4 - NAK response received interrupt"] - #[inline] - pub fn nak(&self) -> NAKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 4; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - NAKR { bits } + #[inline(always)] + pub fn nak(&self) -> NAK_R { + NAK_R::new(((self.bits >> 4) & 0x01) != 0) } #[doc = "Bit 5 - ACK response received/transmitted interrupt"] - #[inline] - pub fn ack(&self) -> ACKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 5; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - ACKR { bits } + #[inline(always)] + pub fn ack(&self) -> ACK_R { + ACK_R::new(((self.bits >> 5) & 0x01) != 0) } #[doc = "Bit 7 - USB bus error"] - #[inline] - pub fn usber(&self) -> USBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - USBERR { bits } + #[inline(always)] + pub fn usber(&self) -> USBER_R { + USBER_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Babble error"] - #[inline] - pub fn bber(&self) -> BBERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - BBERR { bits } + #[inline(always)] + pub fn bber(&self) -> BBER_R { + BBER_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bit 9 - Request queue overrun"] - #[inline] - pub fn reqovr(&self) -> REQOVRR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - REQOVRR { bits } + #[inline(always)] + pub fn reqovr(&self) -> REQOVR_R { + REQOVR_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bit 10 - Data toggle error"] - #[inline] - pub fn dter(&self) -> DTERR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - DTERR { bits } + #[inline(always)] + pub fn dter(&self) -> DTER_R { + DTER_R::new(((self.bits >> 10) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Transfer finished"] - #[inline] - pub fn tf(&mut self) -> _TFW { - _TFW { w: self } + #[inline(always)] + pub fn tf(&mut self) -> TF_W { + TF_W { w: self } } #[doc = "Bit 1 - Channel halted"] - #[inline] - pub fn ch(&mut self) -> _CHW { - _CHW { w: self } + #[inline(always)] + pub fn ch(&mut self) -> CH_W { + CH_W { w: self } } #[doc = "Bit 3 - STALL response received interrupt"] - #[inline] - pub fn stall(&mut self) -> _STALLW { - _STALLW { w: self } + #[inline(always)] + pub fn stall(&mut self) -> STALL_W { + STALL_W { w: self } } #[doc = "Bit 4 - NAK response received interrupt"] - #[inline] - pub fn nak(&mut self) -> _NAKW { - _NAKW { w: self } + #[inline(always)] + pub fn nak(&mut self) -> NAK_W { + NAK_W { w: self } } #[doc = "Bit 5 - ACK response received/transmitted interrupt"] - #[inline] - pub fn ack(&mut self) -> _ACKW { - _ACKW { w: self } + #[inline(always)] + pub fn ack(&mut self) -> ACK_W { + ACK_W { w: self } } #[doc = "Bit 7 - USB bus error"] - #[inline] - pub fn usber(&mut self) -> _USBERW { - _USBERW { w: self } + #[inline(always)] + pub fn usber(&mut self) -> USBER_W { + USBER_W { w: self } } #[doc = "Bit 8 - Babble error"] - #[inline] - pub fn bber(&mut self) -> _BBERW { - _BBERW { w: self } + #[inline(always)] + pub fn bber(&mut self) -> BBER_W { + BBER_W { w: self } } #[doc = "Bit 9 - Request queue overrun"] - #[inline] - pub fn reqovr(&mut self) -> _REQOVRW { - _REQOVRW { w: self } + #[inline(always)] + pub fn reqovr(&mut self) -> REQOVR_W { + REQOVR_W { w: self } } #[doc = "Bit 10 - Data toggle error"] - #[inline] - pub fn dter(&mut self) -> _DTERW { - _DTERW { w: self } + #[inline(always)] + pub fn dter(&mut self) -> DTER_W { + DTER_W { w: self } } } diff --git a/src/usbfs_host/hch7len.rs b/src/usbfs_host/hch7len.rs index 2a3fc644223045dec55ed2c1506f05509efe5849..92a3e547b109af08b1ce9d416e46a5103495dae7 100644 --- a/src/usbfs_host/hch7len.rs +++ b/src/usbfs_host/hch7len.rs @@ -1,187 +1,88 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCH7LEN { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct TLENR { - bits: u32, -} -impl TLENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PCNTR { - bits: u16, -} -impl PCNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct DPIDR { - bits: u8, -} -impl DPIDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _TLENW<'a> { +#[doc = "Reader of register HCH7LEN"] +pub type R = crate::R; +#[doc = "Writer for register HCH7LEN"] +pub type W = crate::W; +#[doc = "Register HCH7LEN `reset()`'s with value 0"] +impl crate::ResetValue for super::HCH7LEN { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `TLEN`"] +pub type TLEN_R = crate::R; +#[doc = "Write proxy for field `TLEN`"] +pub struct TLEN_W<'a> { w: &'a mut W, } -impl<'a> _TLENW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> TLEN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u32) -> &'a mut W { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x0007_ffff) | ((value as u32) & 0x0007_ffff); self.w } } -#[doc = r" Proxy"] -pub struct _PCNTW<'a> { +#[doc = "Reader of field `PCNT`"] +pub type PCNT_R = crate::R; +#[doc = "Write proxy for field `PCNT`"] +pub struct PCNT_W<'a> { w: &'a mut W, } -impl<'a> _PCNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PCNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03ff << 19)) | (((value as u32) & 0x03ff) << 19); self.w } } -#[doc = r" Proxy"] -pub struct _DPIDW<'a> { +#[doc = "Reader of field `DPID`"] +pub type DPID_R = crate::R; +#[doc = "Write proxy for field `DPID`"] +pub struct DPID_W<'a> { w: &'a mut W, } -impl<'a> _DPIDW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> DPID_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 29)) | (((value as u32) & 0x03) << 29); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&self) -> TLENR { - let bits = { - const MASK: u32 = 0x0007_ffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u32 - }; - TLENR { bits } + #[inline(always)] + pub fn tlen(&self) -> TLEN_R { + TLEN_R::new((self.bits & 0x0007_ffff) as u32) } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&self) -> PCNTR { - let bits = { - const MASK: u16 = 0x03ff; - const OFFSET: u8 = 19; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - PCNTR { bits } + #[inline(always)] + pub fn pcnt(&self) -> PCNT_R { + PCNT_R::new(((self.bits >> 19) & 0x03ff) as u16) } #[doc = "Bits 29:30 - Data PID"] - #[inline] - pub fn dpid(&self) -> DPIDR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 29; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - DPIDR { bits } + #[inline(always)] + pub fn dpid(&self) -> DPID_R { + DPID_R::new(((self.bits >> 29) & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:18 - Transfer length"] - #[inline] - pub fn tlen(&mut self) -> _TLENW { - _TLENW { w: self } + #[inline(always)] + pub fn tlen(&mut self) -> TLEN_W { + TLEN_W { w: self } } #[doc = "Bits 19:28 - Packet count"] - #[inline] - pub fn pcnt(&mut self) -> _PCNTW { - _PCNTW { w: self } + #[inline(always)] + pub fn pcnt(&mut self) -> PCNT_W { + PCNT_W { w: self } } #[doc = "Bits 29:30 - Data PID"] - #[inline] - pub fn dpid(&mut self) -> _DPIDW { - _DPIDW { w: self } + #[inline(always)] + pub fn dpid(&mut self) -> DPID_W { + DPID_W { w: self } } } diff --git a/src/usbfs_host/hctl.rs b/src/usbfs_host/hctl.rs index a5da1599babc35447e983c154e999492b3a4e32b..8aa8ba249df3b2cc50022a23ed82790b7c70b22c 100644 --- a/src/usbfs_host/hctl.rs +++ b/src/usbfs_host/hctl.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HCTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct CLKSELR { - bits: u8, -} -impl CLKSELR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _CLKSELW<'a> { +#[doc = "Reader of register HCTL"] +pub type R = crate::R; +#[doc = "Writer for register HCTL"] +pub type W = crate::W; +#[doc = "Register HCTL `reset()`'s with value 0"] +impl crate::ResetValue for super::HCTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `CLKSEL`"] +pub type CLKSEL_R = crate::R; +#[doc = "Write proxy for field `CLKSEL`"] +pub struct CLKSEL_W<'a> { w: &'a mut W, } -impl<'a> _CLKSELW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CLKSEL_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x03) | ((value as u32) & 0x03); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:1 - clock select for USB clock"] - #[inline] - pub fn clksel(&self) -> CLKSELR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CLKSELR { bits } + #[inline(always)] + pub fn clksel(&self) -> CLKSEL_R { + CLKSEL_R::new((self.bits & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:1 - clock select for USB clock"] - #[inline] - pub fn clksel(&mut self) -> _CLKSELW { - _CLKSELW { w: self } + #[inline(always)] + pub fn clksel(&mut self) -> CLKSEL_W { + CLKSEL_W { w: self } } } diff --git a/src/usbfs_host/hfinfr.rs b/src/usbfs_host/hfinfr.rs index fa10d76c644889222e8fcb9e9a733d3aee4ff9f4..c505d5775e61781ef95f2c1ad60eb0384b402ade 100644 --- a/src/usbfs_host/hfinfr.rs +++ b/src/usbfs_host/hfinfr.rs @@ -1,62 +1,18 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::HFINFR { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct FRNUMR { - bits: u16, -} -impl FRNUMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct FRTR { - bits: u16, -} -impl FRTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} +#[doc = "Reader of register HFINFR"] +pub type R = crate::R; +#[doc = "Reader of field `FRNUM`"] +pub type FRNUM_R = crate::R; +#[doc = "Reader of field `FRT`"] +pub type FRT_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Frame number"] - #[inline] - pub fn frnum(&self) -> FRNUMR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - FRNUMR { bits } + #[inline(always)] + pub fn frnum(&self) -> FRNUM_R { + FRNUM_R::new((self.bits & 0xffff) as u16) } #[doc = "Bits 16:31 - Frame remaining time"] - #[inline] - pub fn frt(&self) -> FRTR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - FRTR { bits } + #[inline(always)] + pub fn frt(&self) -> FRT_R { + FRT_R::new(((self.bits >> 16) & 0xffff) as u16) } } diff --git a/src/usbfs_host/hft.rs b/src/usbfs_host/hft.rs index c90a423d484a8d9af0607d172258855f83c4ac9f..769a1c24bc5443c84f68589cfa385d6c99eb14d6 100644 --- a/src/usbfs_host/hft.rs +++ b/src/usbfs_host/hft.rs @@ -1,105 +1,40 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HFT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct FRIR { - bits: u16, -} -impl FRIR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _FRIW<'a> { +#[doc = "Reader of register HFT"] +pub type R = crate::R; +#[doc = "Writer for register HFT"] +pub type W = crate::W; +#[doc = "Register HFT `reset()`'s with value 0xbb80"] +impl crate::ResetValue for super::HFT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0xbb80 + } +} +#[doc = "Reader of field `FRI`"] +pub type FRI_R = crate::R; +#[doc = "Write proxy for field `FRI`"] +pub struct FRI_W<'a> { w: &'a mut W, } -impl<'a> _FRIW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> FRI_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0xffff) | ((value as u32) & 0xffff); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Frame interval"] - #[inline] - pub fn fri(&self) -> FRIR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - FRIR { bits } + #[inline(always)] + pub fn fri(&self) -> FRI_R { + FRI_R::new((self.bits & 0xffff) as u16) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0xbb80 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bits 0:15 - Frame interval"] - #[inline] - pub fn fri(&mut self) -> _FRIW { - _FRIW { w: self } + #[inline(always)] + pub fn fri(&mut self) -> FRI_W { + FRI_W { w: self } } } diff --git a/src/usbfs_host/hpcs.rs b/src/usbfs_host/hpcs.rs index fa54ce1ce1d93d377b855901becd907fd5157254..e50534290cb3490fdac53eeb0d5e8743f2c73d26 100644 --- a/src/usbfs_host/hpcs.rs +++ b/src/usbfs_host/hpcs.rs @@ -1,550 +1,275 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::HPCS { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct PCSTR { - bits: bool, -} -impl PCSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PCDR { - bits: bool, -} -impl PCDR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PER { - bits: bool, -} -impl PER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PEDCR { - bits: bool, -} -impl PEDCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PREMR { - bits: bool, -} -impl PREMR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PSPR { - bits: bool, -} -impl PSPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PRSTR { - bits: bool, -} -impl PRSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PLSTR { - bits: u8, -} -impl PLSTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PPR { - bits: bool, -} -impl PPR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PSR { - bits: u8, -} -impl PSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _PCDW<'a> { +#[doc = "Reader of register HPCS"] +pub type R = crate::R; +#[doc = "Writer for register HPCS"] +pub type W = crate::W; +#[doc = "Register HPCS `reset()`'s with value 0"] +impl crate::ResetValue for super::HPCS { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `PCST`"] +pub type PCST_R = crate::R; +#[doc = "Reader of field `PCD`"] +pub type PCD_R = crate::R; +#[doc = "Write proxy for field `PCD`"] +pub struct PCD_W<'a> { w: &'a mut W, } -impl<'a> _PCDW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PCD_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } -#[doc = r" Proxy"] -pub struct _PEW<'a> { +#[doc = "Reader of field `PE`"] +pub type PE_R = crate::R; +#[doc = "Write proxy for field `PE`"] +pub struct PE_W<'a> { w: &'a mut W, } -impl<'a> _PEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 2; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 2)) | (((value as u32) & 0x01) << 2); self.w } } -#[doc = r" Proxy"] -pub struct _PEDCW<'a> { +#[doc = "Reader of field `PEDC`"] +pub type PEDC_R = crate::R; +#[doc = "Write proxy for field `PEDC`"] +pub struct PEDC_W<'a> { w: &'a mut W, } -impl<'a> _PEDCW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PEDC_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 3; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 3)) | (((value as u32) & 0x01) << 3); self.w } } -#[doc = r" Proxy"] -pub struct _PREMW<'a> { +#[doc = "Reader of field `PREM`"] +pub type PREM_R = crate::R; +#[doc = "Write proxy for field `PREM`"] +pub struct PREM_W<'a> { w: &'a mut W, } -impl<'a> _PREMW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PREM_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 6; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 6)) | (((value as u32) & 0x01) << 6); self.w } } -#[doc = r" Proxy"] -pub struct _PSPW<'a> { +#[doc = "Reader of field `PSP`"] +pub type PSP_R = crate::R; +#[doc = "Write proxy for field `PSP`"] +pub struct PSP_W<'a> { w: &'a mut W, } -impl<'a> _PSPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PSP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _PRSTW<'a> { +#[doc = "Reader of field `PRST`"] +pub type PRST_R = crate::R; +#[doc = "Write proxy for field `PRST`"] +pub struct PRST_W<'a> { w: &'a mut W, } -impl<'a> _PRSTW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PRST_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 8; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 8)) | (((value as u32) & 0x01) << 8); self.w } } -#[doc = r" Proxy"] -pub struct _PPW<'a> { +#[doc = "Reader of field `PLST`"] +pub type PLST_R = crate::R; +#[doc = "Reader of field `PP`"] +pub type PP_R = crate::R; +#[doc = "Write proxy for field `PP`"] +pub struct PP_W<'a> { w: &'a mut W, } -impl<'a> _PPW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> PP_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 12; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 12)) | (((value as u32) & 0x01) << 12); self.w } } +#[doc = "Reader of field `PS`"] +pub type PS_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Port connect status"] - #[inline] - pub fn pcst(&self) -> PCSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PCSTR { bits } + #[inline(always)] + pub fn pcst(&self) -> PCST_R { + PCST_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Port connect detected"] - #[inline] - pub fn pcd(&self) -> PCDR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PCDR { bits } + #[inline(always)] + pub fn pcd(&self) -> PCD_R { + PCD_R::new(((self.bits >> 1) & 0x01) != 0) } #[doc = "Bit 2 - Port enable"] - #[inline] - pub fn pe(&self) -> PER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 2; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PER { bits } + #[inline(always)] + pub fn pe(&self) -> PE_R { + PE_R::new(((self.bits >> 2) & 0x01) != 0) } #[doc = "Bit 3 - Port enable/disable change"] - #[inline] - pub fn pedc(&self) -> PEDCR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 3; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PEDCR { bits } + #[inline(always)] + pub fn pedc(&self) -> PEDC_R { + PEDC_R::new(((self.bits >> 3) & 0x01) != 0) } #[doc = "Bit 6 - Port resume"] - #[inline] - pub fn prem(&self) -> PREMR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 6; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PREMR { bits } + #[inline(always)] + pub fn prem(&self) -> PREM_R { + PREM_R::new(((self.bits >> 6) & 0x01) != 0) } #[doc = "Bit 7 - Port suspend"] - #[inline] - pub fn psp(&self) -> PSPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PSPR { bits } + #[inline(always)] + pub fn psp(&self) -> PSP_R { + PSP_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bit 8 - Port reset"] - #[inline] - pub fn prst(&self) -> PRSTR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 8; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PRSTR { bits } + #[inline(always)] + pub fn prst(&self) -> PRST_R { + PRST_R::new(((self.bits >> 8) & 0x01) != 0) } #[doc = "Bits 10:11 - Port line status"] - #[inline] - pub fn plst(&self) -> PLSTR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 10; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PLSTR { bits } + #[inline(always)] + pub fn plst(&self) -> PLST_R { + PLST_R::new(((self.bits >> 10) & 0x03) as u8) } #[doc = "Bit 12 - Port power"] - #[inline] - pub fn pp(&self) -> PPR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 12; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - PPR { bits } + #[inline(always)] + pub fn pp(&self) -> PP_R { + PP_R::new(((self.bits >> 12) & 0x01) != 0) } #[doc = "Bits 17:18 - Port speed"] - #[inline] - pub fn ps(&self) -> PSR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 17; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PSR { bits } + #[inline(always)] + pub fn ps(&self) -> PS_R { + PS_R::new(((self.bits >> 17) & 0x03) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 1 - Port connect detected"] - #[inline] - pub fn pcd(&mut self) -> _PCDW { - _PCDW { w: self } + #[inline(always)] + pub fn pcd(&mut self) -> PCD_W { + PCD_W { w: self } } #[doc = "Bit 2 - Port enable"] - #[inline] - pub fn pe(&mut self) -> _PEW { - _PEW { w: self } + #[inline(always)] + pub fn pe(&mut self) -> PE_W { + PE_W { w: self } } #[doc = "Bit 3 - Port enable/disable change"] - #[inline] - pub fn pedc(&mut self) -> _PEDCW { - _PEDCW { w: self } + #[inline(always)] + pub fn pedc(&mut self) -> PEDC_W { + PEDC_W { w: self } } #[doc = "Bit 6 - Port resume"] - #[inline] - pub fn prem(&mut self) -> _PREMW { - _PREMW { w: self } + #[inline(always)] + pub fn prem(&mut self) -> PREM_W { + PREM_W { w: self } } #[doc = "Bit 7 - Port suspend"] - #[inline] - pub fn psp(&mut self) -> _PSPW { - _PSPW { w: self } + #[inline(always)] + pub fn psp(&mut self) -> PSP_W { + PSP_W { w: self } } #[doc = "Bit 8 - Port reset"] - #[inline] - pub fn prst(&mut self) -> _PRSTW { - _PRSTW { w: self } + #[inline(always)] + pub fn prst(&mut self) -> PRST_W { + PRST_W { w: self } } #[doc = "Bit 12 - Port power"] - #[inline] - pub fn pp(&mut self) -> _PPW { - _PPW { w: self } + #[inline(always)] + pub fn pp(&mut self) -> PP_W { + PP_W { w: self } } } diff --git a/src/usbfs_host/hptfqstat.rs b/src/usbfs_host/hptfqstat.rs index b8f454e3200f0af78bdde4d440cf7c59a7f4e565..bb40d13a057ebb9c42584a5d6087935b63d341ac 100644 --- a/src/usbfs_host/hptfqstat.rs +++ b/src/usbfs_host/hptfqstat.rs @@ -1,83 +1,25 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -impl super::HPTFQSTAT { - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } -} -#[doc = r" Value of the field"] -pub struct PTXFSR { - bits: u16, -} -impl PTXFSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u16 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PTXREQSR { - bits: u8, -} -impl PTXREQSR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct PTXREQTR { - bits: u8, -} -impl PTXREQTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} +#[doc = "Reader of register HPTFQSTAT"] +pub type R = crate::R; +#[doc = "Reader of field `PTXFS`"] +pub type PTXFS_R = crate::R; +#[doc = "Reader of field `PTXREQS`"] +pub type PTXREQS_R = crate::R; +#[doc = "Reader of field `PTXREQT`"] +pub type PTXREQT_R = crate::R; impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bits 0:15 - Periodic transmit data FIFO space available"] - #[inline] - pub fn ptxfs(&self) -> PTXFSR { - let bits = { - const MASK: u16 = 0xffff; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u16 - }; - PTXFSR { bits } + #[inline(always)] + pub fn ptxfs(&self) -> PTXFS_R { + PTXFS_R::new((self.bits & 0xffff) as u16) } #[doc = "Bits 16:23 - Periodic transmit request queue space available"] - #[inline] - pub fn ptxreqs(&self) -> PTXREQSR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 16; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PTXREQSR { bits } + #[inline(always)] + pub fn ptxreqs(&self) -> PTXREQS_R { + PTXREQS_R::new(((self.bits >> 16) & 0xff) as u8) } #[doc = "Bits 24:31 - Top of the periodic transmit request queue"] - #[inline] - pub fn ptxreqt(&self) -> PTXREQTR { - let bits = { - const MASK: u8 = 0xff; - const OFFSET: u8 = 24; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PTXREQTR { bits } + #[inline(always)] + pub fn ptxreqt(&self) -> PTXREQT_R { + PTXREQT_R::new(((self.bits >> 24) & 0xff) as u8) } } diff --git a/src/usbfs_pwrclk.rs b/src/usbfs_pwrclk.rs index fe7d55a17b6a6ac863e91d717ebe3b2eda993a09..af21040434080c9e31c5bd1db6982064f62e4f28 100644 --- a/src/usbfs_pwrclk.rs +++ b/src/usbfs_pwrclk.rs @@ -1,12 +1,17 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - power and clock gating control register (PWRCLKCTL)"] pub pwrclkctl: PWRCLKCTL, } -#[doc = "power and clock gating control register (PWRCLKCTL)"] -pub struct PWRCLKCTL { - register: ::vcell::VolatileCell, -} +#[doc = "power and clock gating control register (PWRCLKCTL)\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [pwrclkctl](pwrclkctl) module"] +pub type PWRCLKCTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _PWRCLKCTL; +#[doc = "`read()` method returns [pwrclkctl::R](pwrclkctl::R) reader structure"] +impl crate::Readable for PWRCLKCTL {} +#[doc = "`write(|w| ..)` method takes [pwrclkctl::W](pwrclkctl::W) writer structure"] +impl crate::Writable for PWRCLKCTL {} #[doc = "power and clock gating control register (PWRCLKCTL)"] pub mod pwrclkctl; diff --git a/src/usbfs_pwrclk/pwrclkctl.rs b/src/usbfs_pwrclk/pwrclkctl.rs index 44f17d9eac9abedb668f93902ab64678e0d7204f..528f719deb12c3c3c21ad58b78f1fbf15bc4ea87 100644 --- a/src/usbfs_pwrclk/pwrclkctl.rs +++ b/src/usbfs_pwrclk/pwrclkctl.rs @@ -1,182 +1,84 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::PWRCLKCTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct SUCLKR { - bits: bool, -} -impl SUCLKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() +#[doc = "Reader of register PWRCLKCTL"] +pub type R = crate::R; +#[doc = "Writer for register PWRCLKCTL"] +pub type W = crate::W; +#[doc = "Register PWRCLKCTL `reset()`'s with value 0"] +impl crate::ResetValue for super::PWRCLKCTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct SHCLKR { - bits: bool, } -impl SHCLKR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _SUCLKW<'a> { +#[doc = "Reader of field `SUCLK`"] +pub type SUCLK_R = crate::R; +#[doc = "Write proxy for field `SUCLK`"] +pub struct SUCLK_W<'a> { w: &'a mut W, } -impl<'a> _SUCLKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SUCLK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } -#[doc = r" Proxy"] -pub struct _SHCLKW<'a> { +#[doc = "Reader of field `SHCLK`"] +pub type SHCLK_R = crate::R; +#[doc = "Write proxy for field `SHCLK`"] +pub struct SHCLK_W<'a> { w: &'a mut W, } -impl<'a> _SHCLKW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> SHCLK_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 1; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 1)) | (((value as u32) & 0x01) << 1); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Stop the USB clock"] - #[inline] - pub fn suclk(&self) -> SUCLKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SUCLKR { bits } + #[inline(always)] + pub fn suclk(&self) -> SUCLK_R { + SUCLK_R::new((self.bits & 0x01) != 0) } #[doc = "Bit 1 - Stop HCLK"] - #[inline] - pub fn shclk(&self) -> SHCLKR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 1; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - SHCLKR { bits } + #[inline(always)] + pub fn shclk(&self) -> SHCLK_R { + SHCLK_R::new(((self.bits >> 1) & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Stop the USB clock"] - #[inline] - pub fn suclk(&mut self) -> _SUCLKW { - _SUCLKW { w: self } + #[inline(always)] + pub fn suclk(&mut self) -> SUCLK_W { + SUCLK_W { w: self } } #[doc = "Bit 1 - Stop HCLK"] - #[inline] - pub fn shclk(&mut self) -> _SHCLKW { - _SHCLKW { w: self } + #[inline(always)] + pub fn shclk(&mut self) -> SHCLK_W { + SHCLK_W { w: self } } } diff --git a/src/wwdgt.rs b/src/wwdgt.rs index a163637dd3edbc2773f1cce982e4a48dd4415250..b94645fcc13017794dc3e258296035a32272e64a 100644 --- a/src/wwdgt.rs +++ b/src/wwdgt.rs @@ -1,4 +1,4 @@ -#[doc = r" Register block"] +#[doc = r"Register block"] #[repr(C)] pub struct RegisterBlock { #[doc = "0x00 - Control register"] @@ -8,21 +8,36 @@ pub struct RegisterBlock { #[doc = "0x08 - Status register"] pub stat: STAT, } -#[doc = "Control register"] -pub struct CTL { - register: ::vcell::VolatileCell, -} +#[doc = "Control register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [ctl](ctl) module"] +pub type CTL = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CTL; +#[doc = "`read()` method returns [ctl::R](ctl::R) reader structure"] +impl crate::Readable for CTL {} +#[doc = "`write(|w| ..)` method takes [ctl::W](ctl::W) writer structure"] +impl crate::Writable for CTL {} #[doc = "Control register"] pub mod ctl; -#[doc = "Configuration register"] -pub struct CFG { - register: ::vcell::VolatileCell, -} +#[doc = "Configuration register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."] +pub type CFG = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _CFG; +#[doc = "`read()` method returns [cfg::R](cfg::R) reader structure"] +impl crate::Readable for CFG {} +#[doc = "`write(|w| ..)` method takes [cfg::W](cfg::W) writer structure"] +impl crate::Writable for CFG {} #[doc = "Configuration register"] pub mod cfg; -#[doc = "Status register"] -pub struct STAT { - register: ::vcell::VolatileCell, -} +#[doc = "Status register\n\nThis register you can [`read`](crate::generic::Reg::read), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about avaliable fields see [stat](stat) module"] +pub type STAT = crate::Reg; +#[allow(missing_docs)] +#[doc(hidden)] +pub struct _STAT; +#[doc = "`read()` method returns [stat::R](stat::R) reader structure"] +impl crate::Readable for STAT {} +#[doc = "`write(|w| ..)` method takes [stat::W](stat::W) writer structure"] +impl crate::Writable for STAT {} #[doc = "Status register"] pub mod stat; diff --git a/src/wwdgt/cfg.rs b/src/wwdgt/cfg.rs index 5acef19f7d3a47815759e4900fda117740b1ab1a..da42adc50072779b8f4e5ffe5f5484aa51c9f5aa 100644 --- a/src/wwdgt/cfg.rs +++ b/src/wwdgt/cfg.rs @@ -1,205 +1,98 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CFG { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct EWIER { - bits: bool, -} -impl EWIER { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct PSCR { - bits: u8, -} -impl PSCR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Value of the field"] -pub struct WINR { - bits: u8, -} -impl WINR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits - } -} -#[doc = r" Proxy"] -pub struct _EWIEW<'a> { +#[doc = "Reader of register CFG"] +pub type R = crate::R; +#[doc = "Writer for register CFG"] +pub type W = crate::W; +#[doc = "Register CFG `reset()`'s with value 0x7f"] +impl crate::ResetValue for super::CFG { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x7f + } +} +#[doc = "Reader of field `EWIE`"] +pub type EWIE_R = crate::R; +#[doc = "Write proxy for field `EWIE`"] +pub struct EWIE_W<'a> { w: &'a mut W, } -impl<'a> _EWIEW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EWIE_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 9; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 9)) | (((value as u32) & 0x01) << 9); self.w } } -#[doc = r" Proxy"] -pub struct _PSCW<'a> { +#[doc = "Reader of field `PSC`"] +pub type PSC_R = crate::R; +#[doc = "Write proxy for field `PSC`"] +pub struct PSC_W<'a> { w: &'a mut W, } -impl<'a> _PSCW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> PSC_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x03; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x03 << 7)) | (((value as u32) & 0x03) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _WINW<'a> { +#[doc = "Reader of field `WIN`"] +pub type WIN_R = crate::R; +#[doc = "Write proxy for field `WIN`"] +pub struct WIN_W<'a> { w: &'a mut W, } -impl<'a> _WINW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> WIN_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x7f) | ((value as u32) & 0x7f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 9 - Early wakeup interrupt"] - #[inline] - pub fn ewie(&self) -> EWIER { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 9; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EWIER { bits } + #[inline(always)] + pub fn ewie(&self) -> EWIE_R { + EWIE_R::new(((self.bits >> 9) & 0x01) != 0) } #[doc = "Bits 7:8 - Prescaler"] - #[inline] - pub fn psc(&self) -> PSCR { - let bits = { - const MASK: u8 = 0x03; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - PSCR { bits } + #[inline(always)] + pub fn psc(&self) -> PSC_R { + PSC_R::new(((self.bits >> 7) & 0x03) as u8) } #[doc = "Bits 0:6 - 7-bit window value"] - #[inline] - pub fn win(&self) -> WINR { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - WINR { bits } + #[inline(always)] + pub fn win(&self) -> WIN_R { + WIN_R::new((self.bits & 0x7f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x7f } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 9 - Early wakeup interrupt"] - #[inline] - pub fn ewie(&mut self) -> _EWIEW { - _EWIEW { w: self } + #[inline(always)] + pub fn ewie(&mut self) -> EWIE_W { + EWIE_W { w: self } } #[doc = "Bits 7:8 - Prescaler"] - #[inline] - pub fn psc(&mut self) -> _PSCW { - _PSCW { w: self } + #[inline(always)] + pub fn psc(&mut self) -> PSC_W { + PSC_W { w: self } } #[doc = "Bits 0:6 - 7-bit window value"] - #[inline] - pub fn win(&mut self) -> _WINW { - _WINW { w: self } + #[inline(always)] + pub fn win(&mut self) -> WIN_W { + WIN_W { w: self } } } diff --git a/src/wwdgt/ctl.rs b/src/wwdgt/ctl.rs index b791b9b37d537e5b877b9862d701644294f377dc..b1131ca26f815c31d42d3fc97a1cc58f67497ad4 100644 --- a/src/wwdgt/ctl.rs +++ b/src/wwdgt/ctl.rs @@ -1,164 +1,74 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::CTL { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct WDGTENR { - bits: bool, -} -impl WDGTENR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Value of the field"] -pub struct CNTR { - bits: u8, -} -impl CNTR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bits(&self) -> u8 { - self.bits +#[doc = "Reader of register CTL"] +pub type R = crate::R; +#[doc = "Writer for register CTL"] +pub type W = crate::W; +#[doc = "Register CTL `reset()`'s with value 0x7f"] +impl crate::ResetValue for super::CTL { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0x7f } } -#[doc = r" Proxy"] -pub struct _WDGTENW<'a> { +#[doc = "Reader of field `WDGTEN`"] +pub type WDGTEN_R = crate::R; +#[doc = "Write proxy for field `WDGTEN`"] +pub struct WDGTEN_W<'a> { w: &'a mut W, } -impl<'a> _WDGTENW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> WDGTEN_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 7; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !(0x01 << 7)) | (((value as u32) & 0x01) << 7); self.w } } -#[doc = r" Proxy"] -pub struct _CNTW<'a> { +#[doc = "Reader of field `CNT`"] +pub type CNT_R = crate::R; +#[doc = "Write proxy for field `CNT`"] +pub struct CNT_W<'a> { w: &'a mut W, } -impl<'a> _CNTW<'a> { - #[doc = r" Writes raw bits to the field"] - #[inline] +impl<'a> CNT_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x7f) | ((value as u32) & 0x7f); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 7 - Activation bit"] - #[inline] - pub fn wdgten(&self) -> WDGTENR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 7; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - WDGTENR { bits } + #[inline(always)] + pub fn wdgten(&self) -> WDGTEN_R { + WDGTEN_R::new(((self.bits >> 7) & 0x01) != 0) } #[doc = "Bits 0:6 - 7-bit counter"] - #[inline] - pub fn cnt(&self) -> CNTR { - let bits = { - const MASK: u8 = 0x7f; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) as u8 - }; - CNTR { bits } + #[inline(always)] + pub fn cnt(&self) -> CNT_R { + CNT_R::new((self.bits & 0x7f) as u8) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0x7f } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 7 - Activation bit"] - #[inline] - pub fn wdgten(&mut self) -> _WDGTENW { - _WDGTENW { w: self } + #[inline(always)] + pub fn wdgten(&mut self) -> WDGTEN_W { + WDGTEN_W { w: self } } #[doc = "Bits 0:6 - 7-bit counter"] - #[inline] - pub fn cnt(&mut self) -> _CNTW { - _CNTW { w: self } + #[inline(always)] + pub fn cnt(&mut self) -> CNT_W { + CNT_W { w: self } } } diff --git a/src/wwdgt/stat.rs b/src/wwdgt/stat.rs index 6059b63bf37ba80924094480b69933a52fb264d7..bbc6c00a395eb470d0539574d8e8236b11d7a713 100644 --- a/src/wwdgt/stat.rs +++ b/src/wwdgt/stat.rs @@ -1,123 +1,50 @@ -#[doc = r" Value read from the register"] -pub struct R { - bits: u32, -} -#[doc = r" Value to write to the register"] -pub struct W { - bits: u32, -} -impl super::STAT { - #[doc = r" Modifies the contents of the register"] - #[inline] - pub fn modify(&self, f: F) - where - for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W, - { - let bits = self.register.get(); - let r = R { bits }; - let mut w = W { bits }; - f(&r, &mut w); - self.register.set(w.bits); - } - #[doc = r" Reads the contents of the register"] - #[inline] - pub fn read(&self) -> R { - R { - bits: self.register.get(), - } - } - #[doc = r" Writes to the register"] - #[inline] - pub fn write(&self, f: F) - where - F: FnOnce(&mut W) -> &mut W, - { - let mut w = W::reset_value(); - f(&mut w); - self.register.set(w.bits); - } - #[doc = r" Writes the reset value to the register"] - #[inline] - pub fn reset(&self) { - self.write(|w| w) - } -} -#[doc = r" Value of the field"] -pub struct EWIFR { - bits: bool, -} -impl EWIFR { - #[doc = r" Value of the field as raw bits"] - #[inline] - pub fn bit(&self) -> bool { - self.bits - } - #[doc = r" Returns `true` if the bit is clear (0)"] - #[inline] - pub fn bit_is_clear(&self) -> bool { - !self.bit() - } - #[doc = r" Returns `true` if the bit is set (1)"] - #[inline] - pub fn bit_is_set(&self) -> bool { - self.bit() - } -} -#[doc = r" Proxy"] -pub struct _EWIFW<'a> { +#[doc = "Reader of register STAT"] +pub type R = crate::R; +#[doc = "Writer for register STAT"] +pub type W = crate::W; +#[doc = "Register STAT `reset()`'s with value 0"] +impl crate::ResetValue for super::STAT { + type Type = u32; + #[inline(always)] + fn reset_value() -> Self::Type { + 0 + } +} +#[doc = "Reader of field `EWIF`"] +pub type EWIF_R = crate::R; +#[doc = "Write proxy for field `EWIF`"] +pub struct EWIF_W<'a> { w: &'a mut W, } -impl<'a> _EWIFW<'a> { - #[doc = r" Sets the field bit"] +impl<'a> EWIF_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"] + #[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] + #[doc = r"Writes raw bits to the field"] + #[inline(always)] pub fn bit(self, value: bool) -> &'a mut W { - const MASK: bool = true; - const OFFSET: u8 = 0; - self.w.bits &= !((MASK as u32) << OFFSET); - self.w.bits |= ((value & MASK) as u32) << OFFSET; + self.w.bits = (self.w.bits & !0x01) | ((value as u32) & 0x01); self.w } } impl R { - #[doc = r" Value of the register as raw bits"] - #[inline] - pub fn bits(&self) -> u32 { - self.bits - } #[doc = "Bit 0 - Early wakeup interrupt flag"] - #[inline] - pub fn ewif(&self) -> EWIFR { - let bits = { - const MASK: bool = true; - const OFFSET: u8 = 0; - ((self.bits >> OFFSET) & MASK as u32) != 0 - }; - EWIFR { bits } + #[inline(always)] + pub fn ewif(&self) -> EWIF_R { + EWIF_R::new((self.bits & 0x01) != 0) } } impl W { - #[doc = r" Reset value of the register"] - #[inline] - pub fn reset_value() -> W { - W { bits: 0 } - } - #[doc = r" Writes raw bits to the register"] - #[inline] - pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { - self.bits = bits; - self - } #[doc = "Bit 0 - Early wakeup interrupt flag"] - #[inline] - pub fn ewif(&mut self) -> _EWIFW { - _EWIFW { w: self } + #[inline(always)] + pub fn ewif(&mut self) -> EWIF_W { + EWIF_W { w: self } } }